simulate_data: Simulate data through the unified catalogue

View source: R/api.R

simulate_dataR Documentation

Simulate data through the unified catalogue

Description

simulate_data() is a discoverable dispatcher. Direct verbs remain the preferred interface because they provide explicit, documented arguments.

Usage

simulate_data(type, ...)

Arguments

type

Dispatchable simulator name, taken from the simulator column of list_simulators(). An unknown name, or a name whose dispatchable entry is FALSE, is an error.

...

Arguments passed on to the selected canonical simulation verb, including batch for every verb that produces one dataset.

Value

Whatever the selected verb returns, which for every dispatchable entry is a simulab_sim base data.frame, or a plain list of them when batch is given.

Examples

result <- simulate_data("ttest", n_a = 30, n_b = 30, mean_a = 0, mean_b = 0.5, seed = 1)
head(result)
# Five independent datasets from one call.
datasets <- simulate_data("ttest", n_a = 30, n_b = 30, mean_a = 0,
                          mean_b = 0.5, seed = 1, batch = 5)
length(datasets)

simulab documentation built on Oct. 15, 2026, 5:08 p.m.