library(rFtools) 

YX <- simulateSNPdata(n.obs = 10000, n.snp = 200, seed = 111, 
		maf = rep(c(0.05, 0.1, 0.25, 0.4), each = 50))

rF <- randomForest(x = YX[ , -1], y = YX[ , 1], keep.forest = TRUE, 
		keep.inbag = TRUE, importance = TRUE, ntree = 500)


cF <- getCategoryFrequenciesForest(rF, X = YX[ , -1])
tab.all  <-  tableLevelsVsLayerByMAF(cF,  rF)

save(tab.all,file="tab.all10000.RData")