I have a dataset with hundreds of variables where many variables' only value is 0. I'd like to drop these variables without having to manually find each such variable.
Consider the following example:
I want to drop all the variables in this dataset whose only value is 0, without having to manually specify "drop problem_var1 problem_var2".
How would I do this?
Consider the following example:
Code:
sysuse auto, clear gen problem_var1 = 0 gen problem_var2 = 0
How would I do this?
Comment