sd(stats)
sd()所属R语言包:stats
Standard Deviation
标准偏差
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function computes the standard deviation of the values in x. If na.rm is TRUE then missing values are removed before computation proceeds.
此函数计算的x值的标准偏差。如果na.rm是TRUE然后失踪值计算所得之前删除。
用法----------Usage----------
sd(x, na.rm = FALSE)
参数----------Arguments----------
参数:x
a numeric vector or an R object which is coercible to one by as.vector. Earlier versions of R allowed matrices or data frames for x, see below.
一个数值向量或R为强制到as.vector之一的对象。 R的早期版本允许x,看到下面的矩阵或数据框。
参数:na.rm
logical. Should missing values be removed?
逻辑。应被删除缺失值吗?
Details
详情----------Details----------
Like var this uses denominator n - 1.
像var使用分母n - 1。
The standard deviation of a zero-length vector (after removal of NAs if na.rm = TRUE) is not defined and gives an error. The standard deviation of a length-one vector is NA.
标准差的一个零长度的矢量(去除NAS后如果na.rm = TRUE)没有被定义,并给出了一个错误。一个向量长度的标准差是NA。
In earlier versions R, for a data.frame dfrm, sd(dfrm) worked directly. This is deprecated now, and you are expected to use sapply(dfrm, sd) instead.
在早期版本ŕ,data.frame dfrm,sd(dfrm)直接合作。现在这已经过时,你预计使用sapply(dfrm, sd)代替。
参见----------See Also----------
var for its square, and mad, the most robust alternative.
var,其平方和mad,最强大的替代品。
举例----------Examples----------
sd(1:2) ^ 2
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|