splitKeepOrderAndDTIntegrity {Require} | R Documentation |
split
for a data.table that keeps integrity of a column of lists of data.table objects
Description
data.table::split
does 2 bad things:
reorders if using
f
destroys the integrity of a column that is a list of data.tables, when using
by
So, to keep order, needby
, but to keep integrity, needf
. This function
Usage
splitKeepOrderAndDTIntegrity(pkgDT, splitOn)
Arguments
pkgDT |
A |
splitOn |
Character vector passed to |
Value
A list of data.table
objects of length(unique(splitOn))
.
[Package Require version 1.0.0 Index]