mutate-table.express | R Documentation |
Add or update columns of a data.table::data.table, possibly by reference using
:=
.
## S3 method for class 'ExprBuilder'
mutate(
.data,
...,
.sequential = FALSE,
.unquote_names = TRUE,
.parse = getOption("table.express.parse", FALSE),
.chain = getOption("table.express.chain", TRUE)
)
## S3 method for class 'EagerExprBuilder'
mutate(.data, ..., .parent_env = rlang::caller_env())
## S3 method for class 'data.table'
mutate(.data, ...)
.data |
An instance of ExprBuilder. |
... |
Mutation clauses. |
.sequential |
If |
.unquote_names |
Passed to |
.parse |
Logical. Whether to apply |
.chain |
Logical. Should a new frame be automatically chained to the expression if the clause being set already exists? |
.parent_env |
See |
To see more examples, check the vignette, or the table.express-package entry.
data("mtcars")
data.table::as.data.table(mtcars) %>%
start_expr %>%
mutate(mpg_squared = mpg ^ 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.