jitter(base)
jitter()所属R语言包:base
‘Jitter’ (Add Noise) to Numbers
“抖动”(添加杂色)数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Add a small amount of noise to a numeric vector.
添加少量的噪音数字向量。
用法----------Usage----------
jitter(x, factor=1, amount = NULL)
参数----------Arguments----------
参数:x
numeric vector to which jitter should be added.
数字矢量抖动应增加。
参数:factor
numeric
数字
参数:amount
numeric; if positive, used as amount (see below), otherwise, if = 0 the default is factor * z/50. Default (NULL): factor * d/5 where d is about the smallest difference between x values.
数字如为正数,用来作为量(见下文),否则,如果= 0默认factor * z/50。默认(NULL)factor * d/5其中dx值之间的差异最小。
Details
详情----------Details----------
The result, say r, is r <- x + runif(n, -a, a) where n <- length(x) and a is the amount argument (if specified).
结果,说r,r <- x + runif(n, -a, a)其中n <- length(x)和aamount参数(如果指定)。
Let z <- max(x) - min(x) (assuming the usual case). The amount a to be added is either provided as positive argument amount or otherwise computed from z, as follows:
让z <- max(x) - min(x)(假设通常情况下)。 金额a要添加可以提供积极的说法amount或z另有计算,具体如下:
If amount == 0, we set a <- factor * z/50 (same as S).
如果amount == 0,我们设置a <- factor * z/50(同为S)。
If amount is NULL (default), we set a <- factor * d/5 where d is the smallest difference between adjacent unique (apart from fuzz) x values.
如果amount是NULL(默认),我们将a <- factor * d/5,其中d是相邻独特的(除了从模糊)x值之间的差异最小。
值----------Value----------
jitter(x,...) returns a numeric of the same length as x, but with an amount of noise added in order to break ties.
jitter(x,...)返回一个相同的长度的x,但是有一个补充,以打破关系的噪声amount的数字。
作者(S)----------Author(s)----------
Werner Stahel and Martin Maechler, ETH Zurich
参考文献----------References----------
Graphical Methods for Data Analysis. Wadsworth; figures 2.8, 4.22, 5.4.
Statistical Models in S. Wadsworth & Brooks/Cole.
参见----------See Also----------
rug which you may want to combine with jitter.
rug你可能想用jitter结合。
举例----------Examples----------
round(jitter(c(rep(1,3), rep(1.2, 4), rep(3,3))), 3)
## These two 'fail' with S-plus 3.x:[#这两个失败,S-PLUS 3.x的:]
jitter(rep(0, 7))
jitter(rep(10000,5))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|