recode_as_na_if: Conditionally change all column values to NA

Description Usage Arguments Value Examples

View source: R/recode_as_na_if.R

Description

Conditionally change all column values to NA

Usage

1
recode_as_na_if(df, sign = "gteq", percent_na = 50, keep_columns = NULL, ...)

Arguments

df

A data.frame object

sign

Character. One of gteq,lteq,lt,gt or eq which refer to greater than(gt) or equal(eq) or less than(lt) or equal to(eq) respectively.

percent_na

The percentage to use when dropping columns with missing values

keep_columns

Columns that should be kept despite meeting the target percent_na criterion(criteria)

...

Other arguments to "percent_missing"

Value

A 'data.frame' with the target columns populated with 'NA's.

Examples

1

mde documentation built on Feb. 10, 2022, 5:08 p.m.

Related to recode_as_na_if in mde...