Split eventTable into smaller Tables

If the simulation results get very big, e.g. because sim_IQRmodel is called with FLAGoutputsOnly = FALSE, it's faster to split the eventTable into pieces. This can also circumvent RAM limiations. Furthermore, it allows to parallelize the simulations.

split_eventTable(eventTable, ncores = 1, chunksize = 1000)

Arguments

eventTable

Object of class IQReventTable

ncores

Number of cores for parallelization, determining the optimal split size for small eventTables

chunksize

How many IDs should be included in one slice? 1000 proved to be fast for the typical DDI models

Value

list of smaller IQReventTable objects

Details

For few IDs, the function splits the eventTable in chunks of equal size

See also

Other IQReventTable: addTminToEventTable()

Author

Daniel Lill (daniel.lill@intiquan.com)

Examples

if (FALSE) { # \dontrun{
eT <- data.frame(ID = 1:2000, TIME = 0, ADM = 1, AMT = 1, TINF = 1e-4)
eT <- `class<-`(eT, c("IQReventTable", "data.frame"))
split_eventTable(eT, ncores = 10)
split_eventTable(eT, ncores = 10, chunksize = 50)
split_eventTable(eT[eT$ID<=5,], ncores = 10)
} # }