| transmute-table.express {table.express} | R Documentation |
Compute new columns
Description
Compute and keep only new columns.
Usage
## S3 method for class 'ExprBuilder'
transmute(
.data,
...,
.enlist = TRUE,
.sequential = FALSE,
.parse = getOption("table.express.parse", FALSE),
.chain = getOption("table.express.chain", TRUE)
)
## S3 method for class 'EagerExprBuilder'
transmute(.data, ..., .parent_env = rlang::caller_env())
## S3 method for class 'data.table'
transmute(.data, ...)
Arguments
.data |
An instance of ExprBuilder. |
... |
Clauses for transmuting columns. For |
.enlist |
See details. |
.sequential |
If |
.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 |
Details
Everything in ... is wrapped in a call to list by default. If only one expression is given,
you can set .enlist to FALSE to skip the call to list.
To see more examples, check the vignette, or the table.express-package entry.
Examples
data("mtcars")
data.table::as.data.table(mtcars) %>%
transmute(ans = mpg * 2)