R/remove_zero_only.R

Defines functions remove_zero_only

Documented in remove_zero_only

#' Remove all columns which contain only zeros
#' Optimised for magrittr / dplyr pipes
#' @param df Data frame to be passed through  
remove_zero_only <- function(df){
  Filter(function(x)!all(x==0),df)
}
martinctc/surveytools documentation built on Nov. 21, 2024, 10:48 p.m.