| parSim_dt | R Documentation |
The function uses the more efficient data.table in its internal code instead of dplyr, thereby speeding up the function itself and also allowing researchers to use data.table to speed up the code they want to simulate with parSim.
parSim_dt(
...,
expression,
replications = 1,
reps,
write = FALSE,
name,
nCores = 1,
export = NULL,
packages = NULL,
exclude,
debug = FALSE,
progress = TRUE,
progressbar,
env = parent.frame(),
seed = NULL
)
... |
Any number of |
expression |
An |
replications |
Integer. The number of replications for each condition. Defaults to |
reps |
Deprecated. Alias for |
write |
Logical, should the results be written to a file? If |
name |
Name of the file if |
nCores |
An integer value indicating the number of cores to use for parallel
execution. Defaults to |
packages |
A character vector containing the names of packages to be loaded on
the parallel backend (only relevant when |
export |
A character vector of global objects to export to the cluster.
Defaults to |
exclude |
A character vector of logical expressions indicating simulation
conditions to exclude. The expressions are combined with |
debug |
Logical. If |
progress |
Logical. If |
progressbar |
Deprecated. Alias for |
seed |
Optional integer. When supplied, one L'Ecuyer-CMRG random-number
substream is derived per simulation condition (per design row), making
the results fully reproducible and identical for any value of
|
env |
The environment from which to export variables specified in the
|
The function uses data.table in its internal code instead of dplyr, thereby speeding up the simulation and allowing researchers to use data.table in the code they want to simulate with parSim.
A data.table with the results of each
iteration in each row, sorted by the id column (the row number of the
condition in the fully expanded design). Besides the simulation conditions,
the replication number and the columns returned by expression,
the output contains: id (integer identifying the design row),
error (logical; TRUE if the expression threw an error) and
message (the error message, NA on success). Check
any(output$error) after a run. When write = TRUE the results
are also written to a file and returned invisibly.
Xinkai Du <xinkai.du.xd@gmail.com>
parSim
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.