Description Usage Arguments Examples
Recode NA as another value with some conditions
1 | recode_na_if(df, grouping_cols = NULL, target_groups = NULL, replacement = 0)
|
df |
A data.frame object with missing values |
grouping_cols |
Character columns to use for grouping the data |
target_groups |
Character Recode NA as if and only if the grouping column is in this vector of values |
replacement |
Values to use to replace NAs for IDs that meet the requirements. Defaults to 0. |
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.