subset.capthist(secr)
subset.capthist()所属R语言包:secr
Subset or Split capthist Object
子集或分割capthist对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Create a new capthist object or list of objects by selecting rows (individuals), columns (occasions) and traps from an existing capthist object.
创建一个新的capthist对象或对象列表中选择行(个人),列(次),从现有的capthist对象的陷阱。
用法----------Usage----------
## S3 method for class 'capthist'
subset(x, subset = NULL, occasions = NULL, traps = NULL,
sessions = NULL, cutval = NULL, dropnullCH = TRUE, dropnullocc = FALSE,
dropunused = TRUE, droplowsignals = TRUE, renumber = FALSE, ...)
## S3 method for class 'capthist'
split(x, f, drop = FALSE, prefix = "S", ...)
参数----------Arguments----------
参数:x
object of class capthist
对象的类capthist
参数:subset
vector of subscripts to select rows (individuals)
向量下标选择行(个人)
参数:occasions
vector of subscripts to select columns (occasions)
向量下标选择列(场合)
参数:traps
vector of subscripts to select detectors (traps)
向量的下标来选择检测器(陷阱)
参数:sessions
vector of subscripts to select sessions
向量下标选择会话
参数:cutval
new threshold for signal strength
新的信号强度阈值
参数:dropnullCH
logical for whether null (all-zero) capture histories should be dropped
是否应该被丢弃空(零)捕获历史的逻辑
参数:dropnullocc
logical for whether occasions with no detections should be dropped
逻辑没有检测是否场合,应被丢弃
参数:dropunused
logical for whether never-used detectors should be dropped
逻辑,从未使用的探测器是否应该被丢弃
参数:droplowsignals
logical for whether cutval should be applied at each microphone rather than to sound as a whole
应适用于每个麦克风的声音,而不是作为一个整体的逻辑是否cutval
参数:renumber
logical for whether row.names should be replaced with sequence number in new capthist
逻辑是否row.names,应更换新的capthist序列号
参数:f
factor or object that may be coerced to a factor
因素或对象,可能被强制转换为一个因素
参数:drop
logical indicating if levels that do not occur should be dropped (if f is a factor)
逻辑表示,如果不发生的水平,应该删除(如果f是一个因素)
参数:prefix
a character prefix to be used for component names when values of f are numeric
字符用于组件名称的前缀时,f值是数字
参数:...
other arguments (not used currently)
其他参数(目前未使用)
Details
详细信息----------Details----------
Subscript vectors may be either logical- (length equal to the relevant dimension of x), character- or integer-valued. Subsetting is applied to attributes (e.g. covariates, traps) as appropriate. The default action is to include all animals, occasions, and detectors if the relevant argument is omitted.
标向量可以是逻辑(长度等于相关维x),字符或整数值。应用子集的属性(如:covariates,traps)适当。如果相关参数被省略,默认的行为是包括所有的动物,场合,和探测器。
When traps is provided, detections at other detectors are set to zero, as if the detector had not been used, and the corresponding rows are removed from traps. If the detector type is "proximity" then selecting traps also reduces the third dimension of the capthist array.
当traps设置,在其他检测器的检测被设置为0,没有被使用,如果检测器,和相应的行被删除从traps。如果检测器类型是“接近性”,然后选择疏水阀也降低了第三个维度的capthist阵列。
split generates a list in which each component is a capthist object. Each component corresponds to a level of f.
split生成一个列表,其中每个组件是一个capthist对象。每个组件对应电平f。
To combine (pool) occasions use reduce.capthist. There is no equivalent of unlist for lists of capthist objects.
要结合(池)的场合使用reduce.capthist。没有等效的unlistcapthist对象名单。
The effect of droplowsignals = FALSE is to retain below-threshold measurements of signal strength on all channels (microphones) as long as the signal is above cutval on at least one. In this case all retained sounds are treated as detected on all microphones. This fails when signals are already missing on some channels.
的效果droplowsignals = FALSE是保留低于阈值的信号强度的测量在所有通道上(麦克风),只要该信号是上述的cutval中的至少一个。在这种情况下,所有保留的声音被视为上检测到的所有麦克风。失败时,信号已经缺少一些渠道。
值----------Value----------
capthist object with the requested subset of observations, or a list of such objects (i.e., a multi-session capthist object). List input results in list output, except when a single session is selected.
capthist对象的意见,或这些对象的列表(即,多会话capthist对象)所要求的子集。列表输入列表中的输出结果,除了当一个会话。
参见----------See Also----------
capthist, rbind.capthist, reduce.capthist
capthist,rbind.capthist,reduce.capthist
实例----------Examples----------
tempcapt <- sim.capthist (make.grid(nx=6, ny=6), nocc=6)
summary(subset(tempcapt, occ=c(1,3,5)))
## Consider `proximity' detections at a random subset of detectors[#注意接近检测探测器的随机子集]
## This would not make sense for `multi' detectors, as the [#这会不会使多探测器的意义,因为]
## excluded detectors influence detection probabilities in [#排除探测器影响的检测概率]
## sim.capthist.[#sim.capthist。]
tempcapt2 <- sim.capthist (make.grid(nx = 6, ny = 6,
detector = "proximity"), nocc = 6)
tempcapt3 <- subset(tempcapt2, traps = sample(1:36, 18,
replace=FALSE))
summary(tempcapt3)
plot(tempcapt3)
split (tempcapt2, f = sample (c("A","B"), nrow(tempcapt2),
replace = TRUE))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|