\HeaderA{exprs-methods}{Get/Set Expression Values}{exprs.Rdash.methods}
\aliasA{exprs}{exprs-methods}{exprs}
\aliasA{exprs<\Rdash}{exprs-methods}{exprs<.Rdash.}
\keyword{methods}{exprs-methods}
\begin{Description}\relax
Get/set expression values from/for class \code{ExprTreeSet}.

\emph{Usage}

\code{exprs(object)} \\
\code{exprs(object, treenames = NULL) <- value}
\end{Description}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] object of class \code{\LinkA{ExprTreeSet}{ExprTreeSet.Rdash.class}}.
\item[\code{treenames}] \code{character} vector containing optional tree names to be used as subset.
\item[\code{value}] \code{data.frame} containing expression values.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Get the expression values from slot \code{data} or set slot \code{data} to \code{value}.

Method \code{exprs} returns the expression values from slot \code{data} as \code{data.frame},
while replacement method \code{exprs<-} allows to replace slot \code{data} with a \code{data.frame}.

In order to create an \code{ExprTreeSet} containing only a subset of slot \code{data}, first
export slot \code{data} using method \code{exprs}, create a \code{character} vector containing
only \code{treenames} to be used in the subset, and then use replacement method \code{exprs<-} to
replace slot \code{data} with the subset. Slots \code{treenames} and \code{numtrees} will be
updated automatically.

Note: When creating \code{character} vector \code{treenames} it is sufficient to use the name
part of the tree name w/o the extension.

Note: If you do not want to replace your current object, create first a copy of type
\code{ExprTreeSet} by simply writing \code{newobj <- oldobj}, and use \code{newobj} for
replacement. This is important since \code{exprs<-} does also update slots \code{treenames}
and \code{numtrees} as already mentioned.
\end{Details}
\begin{Author}\relax
Christian Stratowa
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{pvalData}{pvalData}}, \code{\LinkA{presCall}{presCall}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Not run: 
## load ROOT scheme file and ROOT data file
scheme.test3 <- root.scheme(paste(.path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
data.test3 <- root.data(scheme.test3, paste(.path.package("xps"),"rootdata/DataTest3_cel.root",sep="/"))

## create an ExprTreeSet
data.rma <- rma(data.test3,"tmp_TestRMA",tmpdir="",background="pmonly",normalize=TRUE,verbose=FALSE)

## get expression values
value <- exprs(data.rma)

## selected treenames only
treenames <- c("TestA2", "TestB1")

## make a copy of your object if you do not want to replace it
subset.rma <- data.rma

## replace slot data with subset
exprs(subset.rma, treenames) <- value
str(subset.rma)
## End(Not run)
\end{ExampleCode}
\end{Examples}

