limpiar_na_cols: Clean NA-heavy columns from a Data Frame or Tibble

View source: R/limpiar_na_cols.R

limpiar_na_colsR Documentation

Clean NA-heavy columns from a Data Frame or Tibble

Description

Remove columns whose proportion of NAs is higher than determined threshold. Setting threshold of 0.25 asks R to remove all columns with 25% or more NA values. Can be useful when dealing with large data frames, where many columns are redundant.

Usage

limpiar_na_cols(df, threshold)

Arguments

df

The Data Frame or Tibble object

threshold

Threshold of non-NA entries a column must exceed to be retained.

Value

Data Frame or Tibble with NA-heavy columns purged

Examples

limpiar_examples

limpiar_examples %>% limpiar_na_cols(0.1)


jpcompartir/LimpiaR documentation built on April 6, 2024, 5:22 a.m.