Learn R Programming

janitor (version 0.2.1)

remove_empty_cols: Removes empty columns from a data.frame.

Description

Removes all columns from a data.frame that are composed entirely of NA values.

Usage

remove_empty_cols(dat)

Arguments

dat
the input data.frame.

Value

Returns the data.frame with no empty columns.

Examples

Run this code
# called with magrittr pipe %>% :
# library(dplyr)
# not run:
# dat %>% remove_empty_cols

Run the code above in your browser using DataLab