powered by
Unlike mutate(), transmute() keeps only the variables that you create
mutate()
transmute()
transmute.(.df, ..., .by = NULL)
A data.frame or data.table
Columns to create/modify
Columns to group by
df <- data.table( a = 1:3, b = 4:6, c = c("a", "a", "b") ) df %>% transmute(double_a = a * 2)
Run the code above in your browser using DataLab