Would this be possible/advisable even in grouping settings?
I have in mind doing lapply(.SD, ...) for .SD of 100s or 1000s of columns -- fundamentally, IINM, we have to store the output in memory first before assigning, so that the for loop approach would be much more memory-efficient.
Ideally it'd be done without any speed impact. Any considerations I'm missing?
another issue asks for that, also mentioning support for doing that by group, see #1441.