transmute | R Documentation |
Unlike mutate()
, transmute()
keeps only the variables that you create
transmute(.df, ..., .by = NULL)
.df |
A data.frame or data.table |
... |
Columns to create/modify |
.by |
Columns to group by |
df <- data.table(
a = 1:3,
b = 4:6,
c = c("a", "a", "b")
)
df %>%
transmute(double_a = a * 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.