I\'ve got a dataframe dat of size 30000 x 50. I also have a separate list that contains points to groupings of rows from this dataframe, e.g.,
rows <- list(c(
You could try this modification:
system.time(lapply(rows, function(r) {dat[ rownames(dat) %in% r, ]}))