removeColNa: Removes all NA columns of a data frame

View source: R/removeColNa.R

removeColNaR Documentation

Removes all NA columns of a data frame

Description

removeColNa() Removes all columns of a data frame for which all entries are NA, or the default of fct_explict_na

Usage

removeColNa(df)

Arguments

df

a data frame

Value

a data frame

Author(s)

Antoine Levesque

Examples

df <- data.frame(
    character = letters[1:5],
    factor = as.factor(LETTERS[1:5]),
    value = 1:5,
    unit = NA,
    unit2 = forcats::fct_na_value_to_level(factor(NA), level = '(Missing)'),
    stringsAsFactors = FALSE)
str(df)
str(removeColNa(df))

pik-piam/quitte documentation built on April 26, 2024, 12:58 a.m.