Extracts the "all meaningful combinations" factorial-design logic that used to live inside experiment(). Given a simList plus lists of alternative params / modules / inputs / objects, it returns one row per run. Values are stored as indices into the supplied alternatives (because an alternative may itself be a vector and so cannot live in a single data.frame cell); column names are module.parameter, plus a modules index, an expLevel, and (when relevant) input, object and replicate columns.

factorialDesign(sim, params, modules, objects = list(), inputs, replicates = 1)

Arguments

sim

A simList, acting as the basis for the experiment.

params

Like for SpaDES.core::simInit(), but for each parameter, provide a list of alternative values.

modules

Like for SpaDES.core::simInit(), but a list of module names (as strings).

objects

Like for SpaDES.core::simInit(), but a list of named lists of named objects.

inputs

Like for SpaDES.core::simInit(), but a list of inputs data.frames.

replicates

The number of replicates to run of the same simList.

Value

A data.frame, one row per run.

Details

This is the engine behind experiment(). It is exported so the same design can also seed the file-queue experiment_family (experimentFuture() etc.): map each row's indices back to values to build their df.