mean(base)
mean()所属R语言包:base
Arithmetic Mean
算术平均数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Generic function for the (trimmed) arithmetic mean.
泛型函数(修剪),算术平均。
用法----------Usage----------
mean(x, ...)
## Default S3 method:[默认方法]
mean(x, trim = 0, na.rm = FALSE, ...)
参数----------Arguments----------
参数:x
An R object. Currently there are methods for numeric/logical vectors and date, date-time and time interval objects, and for data frames all of whose columns have a method. Complex vectors are allowed for trim = 0, only.
一个R对象。目前,有数字/逻辑的向量和日期,日期时间和时间间隔对象的方法,所有的列的数据框有一个方法。复杂的向量,只允许trim = 0。
参数:trim
the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed. Values of trim outside that range are taken as the nearest endpoint.
意见分数(0〜0.5),从每月底修剪x前平均计算。范围之外的装饰值视为最接近的端点。
参数:na.rm
a logical value indicating whether NA values should be stripped before the computation proceeds.
一个逻辑值,指示是否NA值前应计算收益剥离。
参数:...
further arguments passed to or from other methods.
通过进一步的论据或其他方法。
值----------Value----------
If trim is zero (the default), the arithmetic mean of the values in x is computed, as a numeric or complex vector of length one. If x is not logical (coerced to numeric), numeric (including integer) or complex, NA_real_ is returned, with a warning.
trim如果是零(默认),算术平均的中值x,作为一个长度为1的数字或复杂的矢量计算。 x如果是不符合逻辑(裹挟数字),数字(包括整数)或复杂的,NA_real_返回警告。
If trim is non-zero, a symmetrically trimmed mean is computed with a fraction of trim observations deleted from each end before the mean is computed.
trim如果非零,对称修剪平均计算了trim平均计算,每年年底之前删除的意见的一小部分。
参考文献----------References----------
The New S Language. Wadsworth & Brooks/Cole.
参见----------See Also----------
weighted.mean, mean.POSIXct, colMeans for row and column means.
weighted.mean,mean.POSIXct,colMeans行和列的方式。
举例----------Examples----------
x <- c(0:10, 50)
xm <- mean(x)
c(xm, mean(x, trim = 0.10))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|