library(rFtools) 

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

## forest

tab.splits10000<-list()

for (i in 1:250)
 {
 set.seed(i)
 print(i)
 rFi <- randomForest(x = YX[ , -1], y = YX[ , 1], keep.forest = TRUE, 
		keep.inbag = TRUE, importance = TRUE, ntree = 2)
 cFi <- getCategoryFrequenciesForest(rFi, X = YX[ , -1])
 tab.splits10000[[i]] <- tableSplitVarLevelsVsLayerByMAF(cFi, rFi)
 rm(rFi)
 rm(cFi)
 }

save(tab.splits10000,file="tab.splits10000.RData")
