The function fun can use variables that are visible to itself.
The names of these variables have to be given in the vector vars.
get_result_list(fun, nsim, vars, parallel, n_cores)The list with all simulation results (one iteration corresponds to one list element).
(function)
the simulation function for a single iteration, which takes as
single parameter the iteration index.
number of simulations to be conducted.
names of the variables.
should the simulation runs be parallelized across the clusters of the computer?
how many cores should be used for parallel computing?