Make sort stable (PR 12313).
[pspp] / doc / transformation.texi
index 7ad217b3bd03bc227e11a8cdf6cab953c06b81ef..9225ca80009fb325b71206114aff0c12ea2b962c 100644 (file)
@@ -374,10 +374,10 @@ causes cases to be swapped with variables, and vice versa.
 All variables in the transposed active file are numeric.  String
 variables take on the system-missing value in the transposed file.
 
-No subcommands are required.  The VARIABLES subcommand specifies
-variables that will be transformed into cases.  Variables not specified
-are discarded.  By default, all variables are selected for
-transposition.
+No subcommands are required.  If specified, the VARIABLES subcommand
+selects variables to be transformed into cases, and variables not
+specified are discarded.  If the VARIABLES subcommand is omitted, all
+variables are selected for transposition.
 
 The variables specified by NEWNAMES, which must be a string variable, is
 used to give names to the variables created by @cmd{FLIP}.  If
@@ -400,7 +400,8 @@ the active file is subsequently transposed using @cmd{FLIP}, this
 variable can
 be used to recreate the original variable names.
 
-FLIP honors N OF CASES.  It ignores TEMPORARY, so that ``temporary''
+FLIP honors @cmd{N OF CASES} (@pxref{N OF CASES}).  It ignores
+@cmd{TEMPORARY} (@pxref{TEMPORARY}), so that ``temporary''
 transformations become permanent.
 
 @node IF, RECODE, FLIP, Data Manipulation
@@ -526,11 +527,17 @@ are sorted in ascending order.  To override sort order, specify (D) or
 for ascending order.  These apply to the entire list of variables
 preceding them.
 
+The sort algorithms used by @cmd{SORT CASES} are stable.  That is,
+records that have equal values of the sort variables will have the
+same relative order before and after sorting.  As a special case,
+re-sorting an already sorted file will not affect the ordering of
+cases.
+
 @cmd{SORT CASES} is a procedure.  It causes the data to be read.
 
 @cmd{SORT CASES} attempts to sort the entire active file in main memory.
-If main memory is exhausted, it falls back to a merge sort algorithm that
-involves writing and reading numerous temporary files.
+If workspace is exhausted, it falls back to a merge sort algorithm that
+involves creates numerous temporary files.
 
 @cmd{SORT CASES} may not be specified following TEMPORARY.  
 @setfilename ignored