Given a data table and a factor variable to split on, efficiently divides the table and then writes the different splits to separate files, named with filePrepend and numbered according to split.
writeDataTableSplitByColumn(DT, splitFactor, filePrepend = "", orderColumn = NULL)
DT | data.table to split |
---|---|
splitFactor | column of DT to split on |
filePrepend | notation string to prepend to output files |
orderColumn | column of DT to order on (defaults to the first column) |
number of splits written