\Header{maCoord2Ind}{Convert grid and spot matrix coordinates to spot indices}
\keyword{manip}{maCoord2Ind}
\keyword{methods}{maCoord2Ind}
\begin{Description}\relax
This functions converts grid and spot matrix coordinates (four
coordinates) to spot
indices, where 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}
maCoord2Ind(x, L)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a matrix of spot four-coordinates, with rows corresponding to
spots and columns to grid row, grid column, spot row, and spot column coordinates.
\item[\code{L}] an 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{maInd2Coord}},
\code{\Link{maCompCoord}}, \code{\Link{maCompInd}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
L <- new("marrayLayout", maNgr=4, maNgc=4, maNsr=22, maNsc=24)
coord<-cbind(rep(2,4),rep(1,4),rep(1,4),1:4)
maCoord2Ind(coord, L)

\end{ExampleCode}
\end{Examples}

