.BG
.FN col
.FN row
.TL
Column and Row Numbers For a Matrix
.CS
col(x)
row(x)
.AG x
matrix.  Missing values (`NA's) are allowed.
.PP
.RT
integer matrix, containing the row number or column number
of each element.  If `z<-row(x)', `z[i,j]' is `i';
if `z<-col(x)', `z[i,j]' is `j'.
.SA
`diag' for diagonal of matrix.
(Do not confuse this function with the `col' parameter in graphics functions;
see `par' for that use of `col'.)
.EX
x[row(x)>col(x)] <- 0     # zero the strict lower triangle of x
x[row(x)\-col(x)==1]     # first sub-diagonal
.KW array
.KW attribute
.WR
