\HeaderA{dim}{Retrieve the Dimensions of an RGList\_CALIB or SpikeList object}{dim}
\methaliasA{dim.RGList\_CALIB}{dim}{dim.RGList.Rul.CALIB}
\methaliasA{dim.SpikeList}{dim}{dim.SpikeList}
\aliasA{length.RGList\_CALIB}{dim}{length.RGList.Rul.CALIB}
\aliasA{length.SpikeList}{dim}{length.SpikeList}
\keyword{array}{dim}
\begin{Description}\relax
Retrieve the number of rows (genes) and columns (arrays) for an 
RGList\_CALIB or SpikeList
\end{Description}
\begin{Usage}
\begin{verbatim}
 ## S3 method for class 'RGList_CALIB':
 dim(x)
 ## S3 method for class 'RGList_CALIB':
 length(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] an object of class \code{RGList\_CALIB} or \code{SpikeList}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Microarray data objects share many analogies with ordinary
matrices in which the rows correspond to spots or genes and the
columns to arrays. These methods allow one to extract the size of
microarray data objects in the same way that one would do for
ordinary matrices.

A consequence is that row and column commands \code{HYPERLINK(nrow(x))(nrow(x))},
\code{HYPERLINK(ncol(x))(ncol(x))} and so on also work.
\end{Details}
\begin{Value}
Numeric vector of length 2. The first element is the number of rows(genes)
and the second is the number of columns(arrays).
\end{Value}
\begin{Author}\relax
Hui Zhao
\end{Author}
\begin{References}\relax
\code{\LinkA{dim}{dim}} in limma package
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{dim}{dim}} in the base package

\code{\LinkA{dim}{dim}} in the limma package
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

# for RGList_CALIB
R <- G <- matrix(1:8,4,2)
rownames(R) <- rownames(G) <- c("g1","g2","g3","g4")
colnames(R) <- colnames(G) <- c("a1","a2")
RG <- new("RGList_CALIB",list(R=R,G=G))

dim(RG)

# for SpikeList
SR <- SG <- matrix(1:8,4,2)
rownames(SR) <- rownames(SG) <- c("s1","s2","s3","s4")
colnames(SR) <- colnames(SG) <- c("a1","a2")
spike <- new("SpikeList",list(R=SR,G=SG))

dim(spike)
\end{ExampleCode}
\end{Examples}

