I don't want to use setNames function, but do it in the statement:
iris2 <- data.table(iris)
iris2[,.(value = mean(Sepal.Length)), by = "Species"]
For example i want have names: value and group.
PS:
this is crazy! Using agregate cost 1200 ms. Doint the same with data.table cost now 30ms.!!! (on another dataset, my own big one)