This creates a very thin wrapper around the function and can store additional arguments, but does not do anything more..

SBC_generator_custom(f, ...)

Arguments

f

function accepting at least an n_sims argument and returning and SBC_datasets object

...

Additional arguments passed to f

Details

Running:

gen <- SBC_generator_custom(f, <<some other args>>)
datasets <- generate_datasets(gen, n_sims = my_n_sims)

is equivalent to just running

datasets <- f(<<some other args>>, n_sims = my_n_sims)

So whenever you control the code calling generate_datasets, it usually makes more sense to just create an SBC_datasets object directly and avoid using SBC_generator_custom and generate_datasets at all. SBC_generator_custom can however be useful, when a code you do not control calls generate_datasets for you and the built-in generators do not provide you with enough flexibility.