setSamplingMethod
[Simulx] Set sampling method
Define which sampling method is used for the simulation. The possibilities are:
keepOrder (default): individual values are taken in the same order as they appear in a table.
withReplacement: individual values are sampled from a table with replacement.
withoutReplacement: individual values are sampled from a table without replacement. This option is available only if tables contain at least the same number of individual values as a group size.
All of the above sampling methods are general and apply to all tables in a simulation scenario.
Usage
setSamplingMethod(method)
Arguments
- method
(character) keepOrder, withReplacement, withoutReplacement
Details
All options of the Simulx scenario are the same as in Simulx GUI. Check the online doc of Simulx to get more guidance on how to use them.
See also
Examples
initializeLixoftConnectors("simulx")
project_name <- file.path(getDemoPath(), "5.simulation", "samplingOptions.smlx")
loadProject(project_name)
setSamplingMethod(method = "withReplacement")