\Header{maCompInd}{Generate spot indices}
\keyword{manip}{maCompInd}
\keyword{methods}{maCompInd}
\begin{Description}\relax
This function generates spot indices from ranges of rows and columns for
the grid and spot matrices. Spots on the array are numbered consecutively starting
from the top left grid and the top left spot within each grid.
\end{Description}
\begin{Usage}
\begin{verbatim}
maCompInd(grows, gcols, srows, scols, L)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{grows}] numeric vector of grid rows.
\item[\code{gcols}] numeric vector of grid columns.
\item[\code{srows}] numeric vector of spot rows.
\item[\code{scols}] numeric vector of spot columns.
\item[\code{L}] object of class \code{"\Link{marrayLayout}"}.
\end{ldescription}
\end{Arguments}
\begin{Value}
a numeric vector of spot indices.\end{Value}
\begin{Author}\relax
Yee Hwa (Jean) Yang, Sandrine Dudoit, \url{http://www.stat.berkeley.edu/~sandrine}.
\end{Author}
\begin{SeeAlso}\relax
\code{\Link{marrayLayout}}, \code{\Link{maCoord2Ind}},
\code{\Link{maInd2Coord}}, \code{\Link{maCompCoord}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
L <- new("marrayLayout", maNgr=4, maNgc=4, maNsr=22, maNsc=24)
maCompInd(1:2,1,1:4,1:3,L)

\end{ExampleCode}
\end{Examples}

