GetBinNumber(GraphAlignment)
GetBinNumber()所属R语言包:GraphAlignment
Get bin number
获取BIN号
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Get the bin number for the argument using the specified lookup vector.
获取使用指定的查询向量参数的BIN号。
用法----------Usage----------
GetBinNumber(x, lookup, clamp=TRUE)
参数----------Arguments----------
参数:x
value to be binned
价值进行分级
参数:lookup
lookup vector
查找向量
参数:clamp
clamp value to lookup range
钳位值查找范围
Details
详情----------Details----------
The lookup vector defines the lower and upper boundaries for each bin. The first entry in the lookup vector is the lower boundary of the first bin, while the last value in the lookup vector is the upper boundary of the last bin. For all other entries, entry i of the lookup vector defines the upper boundary of the (i-1)-th bin and the lower boundary of the i-th bin. The number of bins is therefore n-1, where n is the length of the lookup vector. A lookup vector must have at least two elements.
查找向量定义为每个垃圾桶的上下界限。在查找向量的第一项是第一斌下边界,而在查找向量的最后一个值是去年斌的上边界。对于所有其他项目,进入我的查找向量定义的bin和(I-1)的第i个箱的下边界上的边界。因此,箱数是N-1,其中n是查找向量的长度。一个查询向量必须至少有两个元素。
If clamping is enabled (clamp=TRUE), arguments which fall below the lower boundary of the first bin are treated as if they are actually in the first bin. Likewise, values which are above the upper boundary of the last bin are treated as if they are actually in the last bin. If clamping is disabled (clamp=FALSE), values outside the lookup range cause an error.
如果启用夹紧(钳= TRUE),低于第一斌下边界的参数都视为他们实际上是在第一槽。同样被视为如果他们实际上是在过去斌,高于去年斌的上边界值。如果夹紧被禁用(钳= FALSE),查找范围之外的值会导致错误。
值----------Value----------
This function returns the bin number corresponding to the input value. The bin number is obtained by performing a lookup in the specified lookup vector.
这个函数返回相应的输入值的BIN号。 BIN号得到执行中查找指定的查询向量。
作者(S)----------Author(s)----------
Joern P. Meier, Michal Kolar, Ville Mustonen, Michael Laessig, and Johannes Berg
举例----------Examples----------
lookup <- c(-1, 0, 1)
GetBinNumber(-0.5, lookup)
GetBinNumber(0.5, lookup)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|