\Header{pamr.from.excel}{A function to read in a text file saved from Excel}
\begin{Description}\relax
A function to read in a text file saved from Excel.
The spreadsheet is assumed to be of the format used by the SAM program.\end{Description}
\begin{Usage}
\begin{verbatim}
pamr.from.excel(file, ncols, sample.labels = FALSE, batch.labels = FALSE) 
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{file}] Character name of a text file. This is assumed to be a tab-delimited text file saved from an excel spreadsheet from  "SAM". 
The spreadsheet has one row of expression values per gene. In addition
there is one information row and two information columns.  The first row
has class labels for each of the samples. The first column had gene identifiers,
and the second column has gene names. In the SAM program, for the multiclass
option, the samples must be labelled 1,2,3 etc. Here we allow general labels,
like "lymphoma", "colon cancer" etc 

\item[\code{ncols}] Number of columns in file
\item[\code{sample.labels}] Optional argument. If true, "file" is assumed to
have an additional row at the top, consisting of two blank cells
followed by a sample labels for each of the columns. If available, these sample labels
are used by various plotting routines.
\item[\code{batch.labels}] Optional argument. If true, "file" is assumed to
have an additional row at the top, consisting of two blank cells
followed by a batch labels for each of the columns.
If sample.labels=T as well, the row of batch labels are assumed to 
come after the row of sample labels.
The batch labels are used by the function pamr.batchadjust.

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{pamr.from.excel} {Reads in the  text file "file", and creates an
object with components x (the matrix of expression values), y- a vector of
class labels for each sample, geneid- a vector of gene identifiers and
genenames- a vector of gene names}\end{Details}
\begin{Value}
A list with components
\begin{ldescription}
\item[\code{x}] 
\item[\code{y}] 
\item[\code{geneid}] 
\item[\code{genenames}] a vector of gene names
\item[\code{samplelabels}] a vector of sample labels, if provided in "file"
\item[\code{batchlabels}] a vector of batch labels, if provided in "file"
\end{ldescription}
\end{Value}
\begin{Author}\relax
Trevor Hastie, Robert Tibshirani, Balasubramanian Narasimhan, and Gilbert Chu\end{Author}
\begin{References}\relax
\end{References}

