R/remove_na_only.R

Defines functions remove_na_only

Documented in remove_na_only

#' Remove all columns which contain only NAs
#' Optimised for magrittr / dplyr pipes
#' @param df Data frame to be passed through
#' @export
remove_na_only <- function(df){
  Filter(function(x)!all(is.na(x)),df)
}
martinctc/surveytoolbox documentation built on Feb. 20, 2025, 8:33 p.m.