Skip to contents

Creates mcnodes based on mctable specifications and input data. Applies transformations and generates mcnodes in the calling environment.

Usage

create_mcnodes(data, mctable = set_mctable(), envir = parent.frame())

Arguments

data

(data frame). Input data containing variables for mcnode creation.

mctable

(data frame). Configuration table with columns: mcnode, mc_func, transformation, from_variable.

envir

(environment, optional). Environment where nodes are created. Default: parent.frame().

Value

NULL, invisibly. mcnodes are created in envir.

Details

Distribution functions may be supplied as bare (function) or namespace-qualified names (package::function, and package:::function). Configured transformation expressions are evaluated as R code.

See also

eval_module() for creating and evaluating a complete module and matrix_to_mcnodes() for creating nodes from a sampling matrix.

Examples

create_mcnodes(
  data = imports_data,
  mctable = imports_mctable
)