Description Usage Arguments Details Value Warning Note See Also
For a specified node of a tree this function retrieves the category frequencies for each SNP.
1 | getCategoryFrequenciesNode(SNPmatrix = matrix(), splitVar = numeric())
|
SNPmatrix |
A |
splitVar |
A |
The provided matrix
could technically be any Matrix with categorical
variables. In context of this package it will usually be a subset of the
original SNP data set containing only the observations still 'active'
in the considered node. The splitVar
argument also only makes sense
in this particular setting.
A 5 x
n.snps matrix
, where n.snps
is the number of
SNP variables in SNPmatrix
. The rows contain in this order:
|
An indicator whether a variable was used for splitting in the
considered node; |
|
The number of category 0 ( = AA) observations |
|
The number of category 1 ( = Aa) observations |
|
The number of category 2 ( = aa) observations |
|
Number of levels/different categories a variable/SNP has in the according node. |
This function only counts the instances of observations having one of the
values 0, 1
or 2
. If you provide a SNPmatrix
with
differently coded categories, you will get wrong results.
Calls the underlying Rcpp/C++ function with the same name.
getCategoryFrequenciesTree
,
getCategoryFrequenciesForest
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.