Split Data Frame into Rows of Fixed Size

I don’t understand why a plyr solution is needed. split works perfectly well and even hadley himself didn’t suggest a plyr/reshape2 solution when he looked at the earlier question:

split(dfrm, (0:nrow(dfrm) %/% 300)  # modulo division

Does produce a warning but since you were expecting a non-evenly divisible result you should ignore it.

Leave a Comment