Skip to contents

Construct an instance of a <VarFn> object, which declares the functional properties of a variable of interest to be used in the IBM simulation.

Usage

VarFn(fn = NULL, args_spec = NULL, units = NULL, fn_cmp = NULL)

Arguments

fn

a function, providing the functional relationship between a model variable (the function's output) and its predicting factors (the function's arguments). Note: Default argument values in fn are ignored. Values for inputs must be provided via args_spec.

args_spec

a list containing <ArgSpec> objects and/or name = value pairs, one for each argument of fn. See Details for shortcuts to facilitate the specification of different types of <ArgSpec>.

units

character string defining the output units of fn. Units must be recognized by the units::valid_udunits() database.

fn_cmp

a compiled version fn, resulting from applying e.g. build_cost_fn() to fn.

Details

A <VarFn> object declares the relationship between a response variable and its explanatory variables, allowing to define model variables that are dependent on the

Shortcuts for args_spec

See also

ArgSpec() for creating <ArgSpec> objects.