I looking for a way to efficiently apply a function to each row of data.table. Let\'s consider the following data table:
library(data.table) library(stringr)
x[, .(a,strsplit(b,' ')), by=1:nrow(x)]
by=nrow(x) is a simple way to force 1 row per by-group
by=nrow(x)