# from help(data.table)
DT = data.table(x=rep(c("a","b","c"),each=3), y=c(1,3,6), v=1:9)
DT[,lapply(.SD,sum),by=x] # this works fine# but this fails DT[,lapply(.SD,sum)] # with this message: Error in lapply(.SD, sum) : object '.SD' not found # Am I missing something obvious here?
_______________________________________________ datatable-help mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
