Description Usage Arguments Value
View source: R/replace_on_condition.R
Mutate column given a condition
1 2 3 4 5 6 7 | replace_on_condition(
df,
condition,
pattern_condition_col,
replacement_value,
pattern_replacement_cols
)
|
df |
A data frame |
condition |
An anonymous Function that evaluates to a boolean. |
pattern_condition_col |
A regex pattern that specifies the column to test the condition. As of now, limit to only one condition column |
replacement_value |
Replacement value if condition is true. |
pattern_replacement_cols |
A regex pattern that specifies the columns to perform replacement |
A data frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.