| newIdMatrix {KEGGprofile} | R Documentation |
A function to convert ID.
newIdMatrix(x, convertIdTable, genesKept = c("var", "foldchange", "abs",
"first", "random"))
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. |
A function to convert ID.
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)