\Header{row/colnames}{Row and Columnn Names}
\alias{colnames}{row/colnames}
\alias{colnames<\Rdash}{row/colnames}
\alias{rownames}{row/colnames}
\alias{rownames<\Rdash}{row/colnames}
\keyword{array}{row/colnames}
\keyword{manip}{row/colnames}
\begin{Description}\relax
Retrieve or set the row or column names of an object (the first or
second component of its \code{\Link{dimnames}}).\end{Description}
\begin{Usage}
\begin{verbatim}
rownames(x, do.NULL = TRUE, prefix = "row")
rownames(x) <- namevector

colnames(x, do.NULL = TRUE, prefix = "col")
colnames(x) <- namevector
\end{verbatim}
\end{Usage}
\begin{Details}\relax
If \code{do.NULL} is \code{FALSE}, a character vector (of length
\code{\Link{NROW}(x)} or \code{\Link{NCOL}(x)} is returned in any
case, prepending \code{prefix} to simple numbers, if
\code{dimnames(x)[[i]]} (\code{i =} 1 or 2) is \code{NULL}.\end{Details}
\begin{SeeAlso}\relax
\code{\Link{dimnames}}, \code{\Link{case.names}},
\code{\Link{variable.names}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
m0 <- matrix(NA, 4, 0)
m2 <- cbind(1,1:4)
rownames(m0)

colnames(m2, do.NULL = FALSE)
colnames(m2) <- c("x","Y")
rownames(m2) <- rownames(m2, do.NULL = FALSE, prefix = "Obs.")
m2
\end{ExampleCode}
\end{Examples}

