Next: NULL Up: MacAnova Help File Previous: notes   Contents


nrows(x), x a matrix or generalized matrix

Keywords: variables
nrows(x) returns the number of rows of matrix argument x.  If x has more
than two dimensions, no more than two dimensions may exceed 1 and it is
treated as described in topic 'matrices'.

  Cmd> x <- array(run(24),1,6,1,4); y <- run(7)

  Cmd> vector(nrows(x),ncols(x))
  (1)           6           4

  Cmd> vector(nrows(y),ncols(y))
  (1)            7            1

  Cmd> vector(nrows(y'),ncols(y'))
  (1)           1           7

If x is a structure, nrows(x) is a structure.  If xi is the i-th
component of x, the i-th component of nrows(x) is nrows(xi).

See also topics ncols(), dim(), ndims(), length(), 'structures'.

Gary Oehlert 2003-01-15