 lapply( split(raw, raw$WorkerId), function(x) x[-NROW(x),] ) $`0`   WorkerId Iteration 0        0         0 0        0         0 0        0         0  $`0`   WorkerId Iteration 0        0         0 0        0         0 0        0         0  $`0`   