module_creators: Create instances of modules

View source: R/module_creators.R

module_creatorsR Documentation

Create instances of modules

Description

Creates pointers to module wrapper objects

Usage

  module_creators(module_names)

Arguments

module_names

A vector of module names

Details

This function is used internally by several other BioCro functions, where its purpose is to create instances of module wrapper pointers using BioCro's module library and return pointers to those wrappers. In turn, module wrappers can be used to obtain information about a module's inputs, outputs, and other properties, and can also be used to create a module instance. The See Also section contains a list of functions that directly rely on module_creators.

Although the description of externalptr objects is sparse, they are briefly mentioned in the R documentation: externalptr-class.

This function should not be used directly, and each module library package must have its own version. For these reasons, this function is not exported to the package namespace and can only be accessed using the package name via the ::: operator.

Value

A vector of R externalptr objects that each point to a module_creator C++ object

See Also

  • run_biocro

  • module_info

  • evaluate_module

Examples

# Example: creating a vector of pointers to several module wrappers representing
# three options for thermal time calculations
module_pointers <- BioCro:::module_creators(c(
  'thermal_time_linear',
  'thermal_time_bilinear',
  'thermal_time_trilinear'
))

ebimodeling/biocro documentation built on April 23, 2024, 7:06 p.m.