Description Usage Arguments See Also Examples
A generic function to plot LevelsVsLayerByMAF
objects.
1 2 | plot.LevelsVsLayerByMAF(x = list(),
main_vec = paste("MAF =", c("0.05", "0.10", "0.25", "0.40")), ...)
|
x |
An object of |
main_vec |
A |
... |
Further arguments passed to |
tableLevelsVsLayerByMAF
, plot.LevelsVsLayer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | YX <- simulateSNPdata(n.obs = 500, n.snp = 200, seed = 123,
maf = rep(c(0.05, 0.1, 0.25, 0.4), each = 50))
dim(YX)
X <- matrix(as.integer(as.matrix(YX[ ,-1])), ncol = ncol(YX[ ,-1]))
## forest
rF <- randomForest(x = YX[ , -1], y = YX[ , 1], keep.forest = TRUE,
keep.inbag = TRUE, importance = TRUE, ntree = 500)
## category frequencies
cF <- getCategoryFrequenciesForest(rF, X = YX[ , -1])
## table levels vs. layer by maf
tab.all <- tableLevelsVsLayerByMAF(cF, rF)
## do the plot
plot(tab.all)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.