|
On Nov 9, 1:19 pm, mhol...@cuesta.edu wrote:
> Hello all,
> I am working with a dataset with ~200 variables and ~100
> observations each. Most of the data are zeros. Is there a way to
> delete all of the variables that have all zero values? The If/then
> only seems to work for individual variables. Thanks.
You can do this by writing a macro. It goes something like this: run
PROC MEANS and find all those variables that have both minimum and
maximum value equal to zero. Make a macro variable containing the list
of those variables, and then use that macro variable in a DELETE
statement in a data step.
I wish there was a simpler way, but I cannot think of one.
--
Paige Miller
paige\dot\miller \at\ kodak\dot\com
|