# NOT RUN {
test_df <- data.table(
a = c(1,2,3),
b = c(4,5,6),
c = c("a","a","b"))
test_df %>%
mutate.(double_a = a * 2,
a_plus_b = a + b)
test_df %>%
mutate.(double_a = a * 2,
avg_a = mean(a),
.by = c)
# }
Run the code above in your browser using DataLab