Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2023-06-08 19:55:23
Size: 565
Comment:
Revision 4 as of 2025-10-24 17:16:07
Size: 551
Comment: Fix capitalization
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Stata Gsort = = Stata GSort =
Line 3: Line 3:
The '''`gsort`''' command is an extended [[Stata/Sort|sort]] command. '''`-gsort-`''' is an extended [[Stata/Sort|-sort-]].
Line 25: Line 25:
[[https://www.stata.com/manuals/dgsort.pdf|Stata manual for gsort]] [[https://www.stata.com/manuals/dgsort.pdf|Stata manual for -gsort-]]

Stata GSort

-gsort- is an extended -sort-.


Usage

gsort foo +bar -baz

If a key variable is specified without a prefix or with a plus sign (+) prefix, then cases are sorted in ascending order for that variable. If it is specified with a minus sign (-) prefix, cases are instead sorted in descending order for that variable.


See also

Stata manual for -gsort-


CategoryRicottone

Stata/GSort (last edited 2025-10-24 17:16:07 by DominicRicottone)