Skip to contents

A simulator_function is a class that stores a method or data generation function alongside associated metadata.

Usage

simulatr_function(
  f,
  arg_names = NA_character_,
  packages = NA_character_,
  loop = FALSE,
  one_rep_time = NA_real_,
  mult_time_factor = 2,
  add_time_factor = 60
)

Arguments

f

a function with one or more arguments.

arg_names

the (ordered) names of parameters (from the parameter grid or list of fixed parameters) to pass to f.

packages

packages to load before calling f, stored as a character vector.

loop

boolean indicating whether f should be called within a loop.

one_rep_time

amount of time it takes for function to exeecute setting B = 1 (optional)

mult_time_factor

time requested for given function is (one_rep_time)(B)(mult_time_factor)/n_processors + add_time_factor

add_time_factor

see above

Value

A simulatr_function object