Description Usage Arguments Examples
mutate_cond
mutates the data.frame
only on the rows that satisfy the
condition.
1 | mutate_cond(.data, condition, ..., envir = parent.frame())
|
.data |
|
condition |
expression with the condition to be evaluated |
1 2 3 4 | data(iris)
iris %>%
mutate(aux = 0) %>%
mutate_cond(Petal.Length > 1.3,aux = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.