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/surveytoolbox documentation built on Feb. 20, 2025, 8:33 p.m.