plot.LevelsVsLayerByMAF: plot levels per layer and minor allel frequency

Description Usage Arguments See Also Examples

Description

A generic function to plot LevelsVsLayerByMAF objects.

Usage

1
2
plot.LevelsVsLayerByMAF(x = list(), 
	main_vec = paste("MAF =", c("0.05", "0.10", "0.25", "0.40")), ...)

Arguments

x

An object of class LevelsVsLayerByMAF that is returned by tableLevelsVsLayerByMAF.

main_vec

A vector of the same length as x. Can be of any type accepted by main in plot.

...

Further arguments passed to plot.

See Also

tableLevelsVsLayerByMAF, plot.LevelsVsLayer

Examples

 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)

adibender/rFtools documentation built on May 14, 2019, 5:13 a.m.