std.data(smoothSurv)
std.data()所属R语言包:smoothSurv
Standardization of the Data
数据的标准化
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Chosen columns of a data.frame are standardized by using a sample mean and sample standard deviation.
所选列的一个data.frame是通过使用一个样本均值和样本标准差标准化。
用法----------Usage----------
std.data(datain, cols)
参数----------Arguments----------
参数:datain
Input data frame.
输入的数据框。
参数:cols
A character vector with names of the columns to be standardized.
字符向量的列名是标准化的。
Details
详细信息----------Details----------
For each chosen column the sample mean and the sample standard deviation is computed and then used to standardize the column. Missing values are ignored when computing the mean and the standard deviation.
对于每个所选列的样本均值,样本标准差的计算,然后用规范列。遗漏值计算的均值和标准差时,会忽略。
值----------Value----------
A data.frame with same variables as the input data.frame. Chosen columns are standardized.
Adata.frame与输入data.frame相同的变量。选择列是标准化的。
(作者)----------Author(s)----------
Arno拧t Kom谩rek <a href="mailto:arnost.komarek[AT]mff.cuni.cz">arnost.komarek[AT]mff.cuni.cz</a>
参见----------See Also----------
scale
scale
实例----------Examples----------
variable1 <- rnorm(30)
variable2 <- rbinom(30, 1, 0.4)
variable3 <- runif(30)
data.example <- data.frame(variable1, variable2, variable3)
## We standardize only the first and the third column.[#我们只有第一和第三列的标准化。]
data.std <- std.data(data.example, c("variable1", "variable3"))
print(data.std)
print(c(mean(data.std$variable1), sd(data.std$variable1)))
print(c(mean(data.std$variable3), sd(data.std$variable3)))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|