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.
levels
vector specifying the levels that the categorical variables in x
show. Ignored if 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 respecti
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
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 assume
check
should it be checked whether some of the variables show other levels than the one
specified by levels?