Identify and impute missing values in a dataframe and return a new dataframe with imputed missing values.

autoimpute_na(df)

Arguments

df

a dataframe or a tibble

Value

a dataframe or a tibble

Examples

toy_df_na <- data.frame(chocolate_brand = (c("Lindt", "Rakhat", "Lindt", "Richart", "not available")), price = c(3, NA, 4, 6, 3)) autoimpute_na(toy_df_na)
#> chocolate_brand price #> 1 Lindt 3 #> 2 Rakhat 4 #> 3 Lindt 4 #> 4 Richart 6 #> 5 Lindt 3