You can keep all of the numeric or character columns when creating a new data set without listing each one in your KEEP statement:
data test1 (keep = _numeric_); run;
data test2 (keep = _character_); run;
Example:
The work.source data set has three character and five numeric variables. This keep statement keeps one character variable (district) and all of the numeric variables:
data work.mix(keep= distname _numeric_);
set work.source;
run;
This method can also be applied to drop, sum, arrays, etc.
No comments:
Post a Comment