Description Usage Arguments Value Examples
View source: R/recode_as_na_if.R
Conditionally change all column values to NA
1 | recode_as_na_if(df, sign = "gteq", percent_na = 50, keep_columns = NULL, ...)
|
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" |
A 'data.frame' with the target columns populated with 'NA's.
1 | head(recode_as_na_if(airquality, sign="gt", percent_na=20))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.