\Header{nrow}{The Number of Rows/Columns of an Array}
\alias{NROW}{nrow}
\alias{ncol}{nrow}
\alias{NCOL}{nrow}
\keyword{array}{nrow}
\begin{Usage}
\begin{verbatim}
nrow(x)
ncol(x)
NCOL(x)
NROW(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{x}] a vector, array or data frame
\end{ldescription}
\end{Arguments}
\begin{Description}
\texttt{nrow} and \texttt{ncol} return the number of rows or columns
present in \texttt{x}. 
\texttt{NCOL} and \texttt{NROW} do the same, but treat a vector as
1-column matrix.\end{Description}
\begin{SeeAlso}
\texttt{\Link{dim}} which returns \emph{all} dimensions;
\texttt{\Link{array}}, \texttt{\Link{matrix}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
ma <- matrix(1:12, 3, 4)
nrow(ma)   # 3
ncol(ma)   # 4

ncol(array(1:24, dim = 2:4)) # 3, the second dimension
NCOL(1:12) # 1
NROW(1:12) # 12
\end{ExampleCode}
\end{Examples}

