Skip to contents

This function removes variables from a data.frames when their proportion of missing values is too high.

Usage

remove_vars_with_too_many_missing(df, pmissing = 0.9)

Arguments

df

data.frame

pmissing

(proportion 0-1) maximum proportion of missingness tolerated in each variable

Value

df with variables with too many missing values removed

Examples

df <- df |> remove_vars_with_too_many_missing(pmissing=.80)
#> [1] "Removed variables with more than 80% missing:"
#> character(0)