R/remove_all_na_cols.R

Defines functions remove_all_na_cols

Documented in remove_all_na_cols

#' @title Remove any columns where all the values are missing
#'
#' @description Pass a data frame and returns a version where all columns
#' made up of entirely missing values are removed.
#'
#' @details
#' This is used within `rwa()`.
#'
#' @param df Data frame to be passed through.
#'
#' @export
remove_all_na_cols <- function(df){
  Filter(function(x)!all(is.na(x)),df)
}

Try the rwa package in your browser

Any scripts or data that you put into this service are public.

rwa documentation built on Jan. 13, 2021, 4:20 p.m.