Performs initialization for all simulations that use R. This optional function will be executed before executing any of the other user-defined functions.
It can be used for various reasons, such as:
Setting seed for R environment
Loading packages
Usage
InitLoadCyneRgy(Seed, UserParam = NULL)
Arguments
- Seed
An integer value to set the seed used in generating random numbers in R. Default is NULL.
- UserParam
A named list to pass custom scalar variables defined by users. Users should access the variables using names,
for example UserParam$Var1. Default is NULL.
Value
An integer as follows:
0 – No Error
Positive Integer – Non Fatal Error – Particular Simulation will be aborted but Next Simulation will be performed.
Negative Integer – Fatal Error – No further simulation will be attempted.
Note
Do not use install.package or attempt to install new R packages in Solara as this will fail. Please contact help to install libraries.