Supposing a data set with several rows and columns with some columns being 0 (I mean all values in the column are 0\'s). How one can filter out those columns? I have tried w
apply(df, 2, Filter, f = function(x){!all(x==0)})
I had the same question.