Filters out columns from a data frame that have a higher percentage of NA values than the specified threshold.
Examples
filter_na_columns(data.frame(a = c(1, NA, 3), b = c(NA, NA, 3)), max_na_percent = 0.5)
#> a
#> 1 1
#> 2 NA
#> 3 3
Filters out columns from a data frame that have a higher percentage of NA values than the specified threshold.
filter_na_columns(data.frame(a = c(1, NA, 3), b = c(NA, NA, 3)), max_na_percent = 0.5)
#> a
#> 1 1
#> 2 NA
#> 3 3