M01ECF rearranges a vector of character data into the order specified by a vector of ranks.
M01ECF is designed to be used typically in conjunction with the M01D ranking routines. After one of the M01D routines has been called to determine a vector of ranks, M01ECF can be called to rearrange a vector of character data into the rank order. If the vector of ranks has been generated in some other way, then
M01ZBF should be called to check its validity before M01ECF is called.
None.
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
If
or
, elements
M1 to
M2 of
IRANK do not contain a permutation of the integers
M1 to
M2. On exit, the contents of
CH may be corrupted. To check the validity of
IRANK without the risk of corrupting
CH, use
M01ZBF.
Not applicable.
This example reads a file of
-character records, each of which contains in characters
to
a name of a NAG routine, and in characters
to
an integer frequency. The program first calls
M01DBF to rank the integers in descending order, and then calls M01ECF to rearrange the names into the order specified by the ranks.