Learn R Programming

tinyarray (version 3.0.0)

trans_array: trans_array

Description

transform rownames for microarray or rnaseq expression matrix

Usage

trans_array(exp, ids, from = "probe_id", to = "symbol", average = FALSE)

Value

a transformed expression set with new rownames

Arguments

exp

microarray or RNA-seq expression matrix

ids

data.frame with original rownames and new rownames

from

colname for original rownames

to

colname for new rownames

average

logical, if TRUE, average rows that map to the same target symbol; if FALSE, keep the first matched row for each symbol.

Author

Xiaojie Sun

See Also

trans_exp

Examples

Run this code
exp = matrix(1:50,nrow = 10)
rownames(exp) = paste0("g",1:10)
ids = data.frame(probe_id = paste0("g",1:10),
                symbol = paste0("G",c(1:9,9)))
trans_array(exp,ids)
trans_array(exp,ids,average = TRUE)

Run the code above in your browser using DataLab