% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/8_tcga_group_trans_exp.R
\name{trans_array}
\alias{trans_array}
\title{trans_array}
\usage{
trans_array(exp, ids, from = "probe_id", to = "symbol", average = FALSE)
}
\arguments{
\item{exp}{microarray or RNA-seq expression matrix}

\item{ids}{data.frame with original rownames and new rownames}

\item{from}{colname for original rownames}

\item{to}{colname for new rownames}

\item{average}{logical, if TRUE, average rows that map to the same target
symbol; if FALSE, keep the first matched row for each symbol.}
}
\value{
a transformed expression set with new rownames
}
\description{
transform rownames for microarray or rnaseq expression matrix
}
\examples{
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)
}
\seealso{
\code{\link{trans_exp}}
}
\author{
Xiaojie Sun
}
