找回密码
 注册
查看: 299|回复: 0

R语言 scrime包 rowFreqs()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-29 23:03:42 | 显示全部楼层 |阅读模式
rowFreqs(scrime)
rowFreqs()所属R语言包:scrime

                                        Rowwise Frequencies
                                         Rowwise频率

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Computes the frequencies of the levels that the categorical variables in a matrix show.
计算的水平频率,以矩阵显示的分类变量。


用法----------Usage----------


rowFreqs(x, levels = 1:3, divide.by.n = FALSE, affy = FALSE,
   includeNA = FALSE, useNN = c("not", "only", "also"), check = TRUE)



参数----------Arguments----------

参数:x
a matrix in which each row represents a categorical variable (e.g., a SNP) and each column an observation, where the variables are assumed to show the levels specified by levels. Missing values are allowed in x.
矩阵中的每一行代表一个分类变量(例如,SNP)和每一列的观察,其中的变量被假设为显示指定的levels的水平。遗漏值被允许在x。


参数:levels
vector specifying the levels that the categorical variables in x show. Ignored if affy = TRUE.
向量确定分类变量x显示的水平。如果忽略affy = TRUE。


参数:divide.by.n
should the numbers of observations showing the respective levels be divided by the total number of observations, i.e.\ by ncol(x)? If FALSE, these numbers are divided by the number of non-missing values of the respective variable. Ignored if includeNA = TRUE.
的观察各自的水平,总分为若干意见,即\ncol(x)?如果FALSE,这些数字除以非缺失的各变量的值的数目。如果忽略includeNA = TRUE。


参数:affy
logical specifying whether the SNPs in x are coded in the Affymetrix standard way. If TRUE, levels = c("AA", "AB", "BB") and useNN = "also" will be used (the latter only when includeNA = TRUE).
逻辑指定是否xAffymetrix公司的标准方式编码的单核苷酸多态性。如果TRUE,levels = c("AA", "AB", "BB")和useNN = "also"将被用于(后者只有当includeNA = TRUE)。


参数:includeNA
should a column be added to the output matrix containing the number of missing values for each variable?
一列被添加到含有缺少的每个变量的值的数目的输出矩阵?


参数:useNN
character specifying whether missing values can also be coded by "NN". If useNN = "not" (default), missing values are assumed to be coded only by NA. If "only", then missing values are assumed to be coded only by "NN" (and not by NA. If "both", both "NN" and NA are considered. Ignored if affy = TRUE.
字符,指定是否缺少值也可以被编码"NN"。如果useNN = "not"(默认),遗漏值被假定为编码只NA。如果"only",然后遗漏值的假设进行编码"NN"(而不是NA。如果"both",两个"NN"和NA 。,如果忽略affy = TRUE。


参数:check
should it be checked whether some of the variables show other levels than the one specified by levels?
它应该检查是否某些变量的显示水平高于一个指定的levels?


值----------Value----------

A matrix with the same number of rows as x containing for each variable the numbers of observations showing the levels specified by levels.
与相同的行数的矩阵作为x含有对于每个变量的数目的观察,示出了水平所指定levels。


(作者)----------Author(s)----------


Holger Schwender, <a href="mailto:holger.schwender@udo.edu">holger.schwender@udo.edu</a>



参见----------See Also----------

rowTables
rowTables


实例----------Examples----------


# Generate a matrix containing data for 10 categorical [包含10分类数据生成矩阵]
# variables with levels 1, 2, 3.[级别1,2,3的变量。]

mat <- matrix(sample(3, 500, TRUE), 10)

rowFreqs(mat)

# leads to the same results as [导致的结果是相同]

rowTables(mat) / ncol(mat)

# If mat contains missing values[如果垫包含缺少值]

mat[sample(500, 20)] <- NA

# then[然后]

rowFreqs(mat)

# leads to the same result as[导致相同的结果]

rowTables(mat) / rowSums(!is.na(mat))



转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-29 22:46 , Processed in 0.020067 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表