test.dt <- data.table(
a = c(1,2),
b = c(4,5))
a b
1 2
4 5
test.dt %>%
mutate.(c = b * 2)
shows new "c" column
a b c
1 4 8
2 5 10
test.dt
same as original, does not show new "c" column. Why not?
test.dt$c
NULL
test.dt %>% # This works
.[, c := b * 2]