rowTables(scrime)
rowTables()所属R语言包:scrime
Rowwise Tables
Rowwise表
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes a one-dimensional table for each row of a matrix that summarizes the values of the categorical variables represented by the rows of the matrix.
计算总结分类变量的值所表示的矩阵的行的矩阵,该矩阵的每一行的一维表。
用法----------Usage----------
rowTables(x, levels = 1:3, 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。
参数: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----------
rowFreqs, rowScales
rowFreqs,rowScales
实例----------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)
rowTables(mat)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|