Description Usage Arguments Details Value See Also Examples
Mutate a data frame by the mutate terms from ...
.
1 2 3 4 5 6 7 8 | mutate_nse(
.data,
...,
mutate_nse_split_terms = TRUE,
mutate_nse_env = parent.frame(),
mutate_nse_warn = TRUE,
mutate_nse_printPlan = FALSE
)
|
.data |
data.frame |
... |
expressions to mutate by. |
mutate_nse_split_terms |
logical, if TRUE into separate mutates (if FALSE instead, pass all at once to dplyr). |
mutate_nse_env |
environment to work in. |
mutate_nse_warn |
logical, if TRUE warn about name re-use. |
mutate_nse_printPlan |
logical, if TRUE print the expression plan |
Note: this method as the default setting mutate_nse_split_terms = TRUE
, which is
safer (avoiding certain known dplyr
/dblyr
issues)
(please see the side-notes of https://winvector.github.io/FluidData/partition_mutate.html for some references).
.data with altered columns.
mutate_se
, mutate
, mutate_at
, :=
1 2 3 4 5 6 7 8 9 10 | limit <- 3.5
datasets::iris %.>%
mutate_nse(., Sepal_Long := Sepal.Length >= 2 * Sepal.Width,
Petal_Short := Petal.Length <= limit) %.>%
head(.)
# generates a warning
data.frame(x = 1, y = 2) %.>%
mutate_nse(., x = y, y = x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.