Description Usage Arguments Details See Also Examples
Plots (relative) frequencies of 2- and/or 3- categorical variables stratified for Layer and MAF.
1 2 3 4 |
x |
A |
fun |
The |
row.num, col.num, row.denom, col.denom |
Passed to |
col |
A |
main, ylab, xlim, ylim |
See |
legPos |
The position of the legend. Passed to |
norm.by.nodes |
A |
layerForest |
If |
... |
Further arguments passed to |
If fun == "absolute"
, row.denom
and col.denom
are ignored, and fun simply extracts the frequencies from x
for the according row.num, col.num
combination in all list elements,
i.e. all layers.
If fun == "relative"
, per default you get relative instead
of absolute frequencies when row.denom
and col.denom
are not
specified. Otherwise for all list-elements the quotient
tab[row.nom, col.nom]/tab[row.denom, col.denom]
is returned.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ## data
YX <- simulateSNPdata(seed = 123)
## forest
rF <- randomForest(x = YX[ , -1], y = YX[ , 1], keep.forest = TRUE,
keep.inbag = TRUE, importance = TRUE, ntree = 500)
## category frequencies
cF <- getCategoryFrequenciesForest(rF, YX[ , -1])
## table for all Levels vs. Layer
tab1 <- tableLevelsVsLayerByMAF(cF, rF)
tab2 <- tableSplitVarLevelsVsLayerByMAF(cF, rF)
tab3 <- tableSplitVarsByLayerAndMAF(tab1, tab2)
layout(matrix(1:4, nrow = 2, byrow = TRUE))
plot(tab3, row.num = 1, col.num = 1, legPos = "topleft", norm.by.nodes = FALSE)
plot(tab3, row.num = 2, col.num = 1, legPos = "topleft", norm.by.nodes = FALSE)
plot(tab3, row.num = 3, col.num = 1, legPos = "topleft", norm.by.nodes = FALSE)
plot(tab3, row.num = 1, col.num = 1, fun = "absolute", norm.by.nodes = FALSE)
## normed by number of nodes per layer
lF <- getLayerForest(getAncestryForest(rF))
layout(matrix(1:4, nrow = 2, byrow = TRUE))
plot(tab3, layerForest = lF, row.num = 1, col.num = 1, legPos = "topleft")
plot(tab3, layerForest = lF, row.num = 2, col.num = 1)
plot(tab3, layerForest = lF, row.num = 3, col.num = 1, legPos = "topleft")
plot(tab3, layerForest = lF, row.num = 1, col.num = 1,
fun = "relative", legPos = "topleft")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.