Does anyone know how one would go about removing columns that consist of entirely either NAs or zeros?
For example, given a dataframe like this:
rv X1 X2 X3 X4
1 M 0 110 0 1
2 J 70 200 0 3
3 J NA 115 NA 4
4 M 65 110 0 9
5 J 70 200 NA 3
6 J 64 115 NA 8
I would want just rv, X1, X2 and X4 columns.