How do you refer to variables in a data.table if the variable names are stored in a character vector? For instance, this works for a data.frame:
data.table
data.frame
colname <- as.name("COL_NAME")
DT2 <- DT[, list(COL_SUM=sum(eval(colname, .SD))), by = c(group)]