na.col.rm Removes columns from the data frame that does not contain any data.

na_col_rm(data)

Arguments

data

a data.frame

Value

a data frame with no empty columns

Examples

df <- data.frame( ID = 1:3, Age = c(22, 25,17), Sex = NA, group = NA ) na_col_rm(df)
#> ID Age #> 1 1 22 #> 2 2 25 #> 3 3 17