vecfun.add {simcausal}R Documentation

Add Custom Vectorized Functions

Description

Add user-defined function names to a global list of custom vectorized functions. The functions in vecfun_names are intended for use inside the node formulas. Adding functions to this list will generally greatly expedite the simulation run time. Any node formula calling a function on this list will be evaluated "as is", the function should be written to accept arguments as either vectors of length n or as matrices with n rows. Adding function to this list will effects simulation from all DAG objects that call this function. See vignette for more details.

Usage

vecfun.add(vecfun_names)

Arguments

vecfun_names

A character vector of function names that will be treated as "vectorized" by the node formula R parser

Value

An old vector of user-defined vectorized function names


[Package simcausal version 0.5.6 Index]