\Header{xy2indices}{Functions to convert indices to x/y (and reverse)}
\alias{indices2xy}{xy2indices}
\keyword{manip}{xy2indices}
\begin{Description}\relax
Functions to convert indices to x/y (and reverse)
\end{Description}
\begin{Usage}
\begin{verbatim}
xy2indices(x, y, nr = NULL, cel = NULL, abatch = NULL)
indices2xy(i, nr = NULL, cel = NULL, abatch = NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] \code{X} position for the probes 
\item[\code{y}] \code{Y} position for the probes 
\item[\code{i}] indices in the \code{AffyBatch} for the probes 
\item[\code{nr}] total number of \code{Xs} on the chip 
\item[\code{cel}] a corresponding object of class \code{\Link{Cel}} 
\item[\code{abatch}] a corresponding object of class \code{\Link{AffyBatch}} 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The probes intensities for given probe set ids are extracted from an
\code{AffyBatch} object using the indices stored in the corresponding
\code{cdfenv}.
\end{Details}
\begin{Value}
A vector of indices or a two-columns matrix of Xs and Ys.\end{Value}
\begin{Author}\relax
L.
\end{Author}
\begin{SeeAlso}\relax
\code{\Link{indexProbes}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(affybatch.example)

pm.i <- indexProbes(affybatch.example, which="pm", genenames="AFFX-BioC-5_at")[[1]]
mm.i <- indexProbes(affybatch.example, which="mm", genenames="AFFX-BioC-5_at")[[1]]

pm.i.xy <- indices2xy(pm.i, abatch = affybatch.example)
mm.i.xy <- indices2xy(mm.i, abatch = affybatch.example)

image(affybatch.example[1], transfo=log2)
## plot the pm in red
plotLocation(pm.i.xy, col="red")
plotLocation(mm.i.xy, col="blue")

\end{ExampleCode}
\end{Examples}

