Contents - Index


DATA > SORT BY ATTRIBUTE

PURPOSE Re-orders nodes in a network so that they correspond to the monotonic ordering of a prescribed vector.

DESCRIPTION Arranges the nodes of a network so that they are in the same order as an external vector.  
The sort can be either ascending or descending.  Hence if the ASCENDING option is chosen and the external vector is (V1, V2, ... VN), the nodes would be ordered so that node i would be before node j if and only if Vi £ Vj.  The external vector can be selected from the rows or columns of any UCINET data matrix.

PARAMETERS 
Input dataset
Name of dataset to be sorted. Data type: Matrix

Dimensions to be arranged:
Choices are:
   
Both-Both rows and columns are simultaneously sorted
Rows Just the rows are sorted and the column order is preserved
Columns Just the columns are sorted and the row order is preserved
 
Sort order (Default = Ascending)
Choices are:

Ascending
Gives a sort which corresponds to placing the elements of the prescribed vector in the order from smallest to largest.

Descending
Gives a sort which corresponds to placing the elements of the prescribed vector in the order from largest to smallest.

Criterion vector (sort key) :
Either the name of the UCINET dataset from which the prescribed vector will be taken with the row or column specified as follows:

  <dataset> ROW (or COLUMN) <number>

where <dataset> is the name of the dataset containing the criterion vector. The command ROW or COLUMN followed by the appropriate number specifies which row or column of the dataset is to be used.

Alternatively, a list of values may be entered, one for each row or column being sorted. Each list entry is separated by a comma or a space. There must be as many values as rows or columns being sorted.

To sort in ascending or descending order the dataset itself should be used as the key. This is the default. 

Output dataset: (Default = Sorted)
Name of file which will contain sorted dataset.


LOG FILE Sorted dataset.

TIMING O(N*LOG(N)).

COMMENTS User prescribed SORT to a keyboard list is provided by the routine PERMUTE

REFERENCES None.