Description Usage Arguments Value See Also Examples
Integrate mutate
and case_when
in dplyr and make
a new tidy verb for data.table.
1 |
data |
data.frame |
... |
the first argument (contents before the first comma) should be the condition, other should be equation(s) just like 'mutate_dt'. |
data.table
1 2 3 4 | iris[3:8,]
iris[3:8,] %>%
mutate_when(Petal.Width == .2,
one = 1,Sepal.Length=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.