View source: R/mergeDuplicate.R
mergeDuplicate | R Documentation |
The mergeDuplicate function will merge the duplicate Ids in the matrix data and return the matrix with unique Ids. This function can also used to merge the duplicate mapped Ids when transforming the Ids of data matrix to other Ids.
mergeDuplicate(id, data, collapse_mode="maxSD")
id |
Duplicate Ids that should be a vector object in R. |
data |
the corresponding data matrix that has the same number of rows with |
collapse_mode |
The method to collapse duplicate ids. "mean", "median", "maxSD", "maxIQR", "max" and "min" represent the mean, median, max standard deviation, max interquartile range, maximum and minimum of values for ids in each sample. The default is "maxSD". |
The function will return the data matrix with unique Ids.
Jing Wang
inputMatDir <- system.file("extdata","exampleExpressionData_nonsymbol.cct",package="NetSAM")
inputMat <- read.table(inputMatDir,header=TRUE,sep="\t",stringsAsFactors=FALSE,check.names=FALSE)
mergedData <- mergeDuplicate(id=inputMat[,1],data=inputMat[,2:ncol(inputMat)],collapse_mode="maxSD")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.