Skip to content

Instantly share code, notes, and snippets.

@joosti
Last active August 29, 2015 14:10
Show Gist options
  • Save joosti/c8e93a7866bebc08c70f to your computer and use it in GitHub Desktop.
Save joosti/c8e93a7866bebc08c70f to your computer and use it in GitHub Desktop.
SAS proc sort, sorting, nodupkey
/* Sort by firm, year and audit fee (highest first) */
proc sort data=dataIn; by gvkey fyear descending auditfee; run;
/* Keep each first firm-year (keeps highest audit fee) */
proc sort data=dataIn nodupkey dupout=dataDropped; by gkvey fyear;run;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment