% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pkgDep3.R
\name{splitKeepOrderAndDTIntegrity}
\alias{splitKeepOrderAndDTIntegrity}
\title{\code{split} for a data.table that keeps integrity of a column of lists of data.table objects}
\usage{
splitKeepOrderAndDTIntegrity(pkgDT, splitOn)
}
\arguments{
\item{pkgDT}{A \code{pkgDT} object e.g., from \code{toPkgDT}}

\item{splitOn}{Character vector passed to \code{data.table::split(..., f = splitOn)}}
}
\value{
A list of \code{data.table} objects of \code{length(unique(splitOn))}.
}
\description{
\code{data.table::split} does 2 bad things:
\enumerate{
\item reorders if using \code{f}
\item destroys the integrity of a column that is a list of data.tables, when using \code{by}
So, to keep order, need \code{by}, but to keep integrity, need \code{f}. This function
}
}
