Learn R Programming

KEGGprofile (version 1.14.0)

newIdMatrix: newIdMatrix

Description

A function to convert ID.

Usage

newIdMatrix(x, convertIdTable, genesKept = c("var", "foldchange", "abs", "first", "random"))

Arguments

x
the expression data matrix.
convertIdTable
A vector. The names should be the source IDs, and the values should be the target IDs.
genesKept
The method to select target gene in more than one targets. "var"/"foldchange"/"abs" means selecting the gene with largest variation/fold change/absolute value. "first" means selecting the first target and "random" means randomly selection.

Details

A function to convert ID.

Examples

Run this code
convertIdTable<-paste("New",c(1,2,2,2,1,3,4,4,5,5))
names(convertIdTable)<-paste("Old",1:length(convertIdTable))
temp<-matrix(rnorm(20),ncol=2)
row.names(temp)<-names(convertIdTable)
colnames(temp)<-c("Exp1","Exp2")
newIdMatrix(temp,genesKept="foldchange",convertIdTable)

Run the code above in your browser using DataLab