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/surveytools documentation built on Nov. 21, 2024, 10:48 p.m.