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
training_data[,apply(training_data, MARGIN = 2, FUN = function(x) !all(x == 0))]