Description Usage Arguments Value Examples
View source: R/topN_variableX.R
This function can be used to extract the rows that have the greatest variance for further PCA analysis.
1 | topN_variableX(mat, topN = 1000, plot = T)
|
mat |
A matrix with numerical values. |
topN |
Upper bound of the number of most variable row entries. By default the 1000 most variable entries are considered. |
plot |
Show or hide plot. Is set to "TRUE" by default. |
The input data.frame or matrix containing only the rows that have the highest variance in the data set.
1 2 3 4 5 6 7 8 9 10 11 | A <- data.frame(rnorm(1000,0.2,0.01),runif(1000,0.2,0.75),rnorm(1000,0.75,0.05),
rnorm(1000,0.2,0.01),runif(1000,0.2,0.6),rnorm(1000,0.6,0.05))
rownames(A) <- paste("cg",sample(10000000:99999999,1000,replace = FALSE), sep ="")
colnames(A) <- rep(paste("Sample_",1:6,sep=""))
A <- as.matrix(A)
topN_variableX(mat = A,
topN = 1000,
plot = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.