REVERSE
Name:
Type:
Purpose:
Reverse the order of the elements in a variable.
That is, if Y has N elements, Y(1) = Y(N), Y(2)=Y(N-1),
... , Y(N)=Y(1).
Syntax:
LET <y2> = REVERSE <y1>
<SUBSET/EXCEPT/FOR qualification>
where <y1> is a response variable;
<y2> is a variable where the reversed data is
stored;
and where the <SUBSET/EXCEPT/FOR qualification>
is optional.
Examples:
LET Y2 = REVERSE Y
LET Y2 = REVERSE Y FOR I = 1 1 30
Default:
Synonyms:
FLIP is a synonym for REVERSE.
Related Commands:
SORT
|
= Sort the elements in a variable.
|
RANK
|
= Rank the elements in a variable.
|
SORT DIRECTION
|
= Specify whether sorting is done in a
descending or ascending order.
|
Applications:
Implementation Date:
Program:
LET Y = NORMAL RANDOM NUMBERS FOR I = 1 1 100
LET Y2 = RANK Y
LET Y3 = REVERSE Y2
Date created: 6/5/2001
Last updated: 4/4/2003
Please email comments on this WWW page to
[email protected].
|