Next: rft() Up: MacAnova Help File Previous: return   Contents

reverse()

Usage:
reverse(x), x a vector or matrix.



Keywords: time series
reverse(x) reverses the order of the rows of x, where x is a REAL,
LOGICAL or CHARACTER vector or matrix.

The result has the same size and type as x.  When isvector(x) is True,
the result is a pure vector (ndims(x) = 1).  Otherwise, the result has 2
dimensions.

Examples:
  Cmd> reverse(vector(1,3,2,4,7))
  (1)           7           4           2           3           1

  Cmd> reverse(matrix(run(6),3))
  (1,1)           3           6
  (2,1)           2           5
  (3,1)           1           4

  Cmd> reverse(matrix(vector("A","B","C","D")))
  (1) "D"
  (2) "C"
  (3) "B"
  (4) "A"


Gary Oehlert 2003-01-15