has_data: Check for empty columns in data frame

Description Usage References Examples

Description

Check whether variables in data frame have values other than 'NA'.

Usage

1

References

https://stackoverflow.com/questions/38088329/remove-empty-columns-from-read-csv/38088477

Examples

1
2
3
4
library(dplyr)
# remove empty columns from data frame
mydata <- mydata %>%
  select_if(has_data)

nrkoehler/leipzigr documentation built on June 1, 2019, 12:50 a.m.