mutate.duckplyr_df | R Documentation |
This is a method for the dplyr::mutate()
generic.
mutate()
creates new columns that are functions of existing variables.
It can also modify (if the name is the same as an existing column)
and delete columns (by setting their value to NULL
).
## S3 method for class 'duckplyr_df'
mutate(
.data,
...,
.by = NULL,
.keep = c("all", "used", "unused", "none"),
.before = NULL,
.after = NULL
)
.data |
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details. |
... |
< The value can be:
|
.by |
< |
.keep |
Control which columns from
|
.before , .after |
< |
dplyr::mutate()
library(duckplyr)
df <- data.frame(x = c(1, 2))
df <- mutate(df, y = 2)
df
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.