topN_variableX: Find top most variable row entries in a microarray data...

Description Usage Arguments Value Examples

View source: R/topN_variableX.R

Description

This function can be used to extract the rows that have the greatest variance for further PCA analysis.

Usage

1
topN_variableX(mat, topN = 1000, plot = T)

Arguments

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.

Value

The input data.frame or matrix containing only the rows that have the highest variance in the data set.

Examples

 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)

LionelRohner/LRTools documentation built on Dec. 17, 2021, 1:10 a.m.