Enable addon package(s) of a SsimLibrary.

enableAddon(ssimLibrary, name)

# S4 method for character
enableAddon(ssimLibrary, name)

# S4 method for SsimLibrary
enableAddon(ssimLibrary, name)

Arguments

ssimLibrary

SsimLibrary object

name

character string or vector of addon name(s)

Value

Invisibly returns TRUE upon success (i.e.successful activation of the addon) or FALSE upon failure.

See also

Examples

# \donttest{
# Install "stsim" SyncroSim package
installPackage("stsim")
#> Package <stsim> is already installed

# Specify file path and name of new SsimLibrary
myLibraryName <- file.path(tempdir(), "testlib")

# Set up a SyncroSim Session, SsimLibrary, and Project
mySession <- session()
myLibrary <- ssimLibrary(name = myLibraryName, session = mySession, 
                         package = "stsim")

# Enable add on package
enableAddon(myLibrary, c("stsimsf"))
#> Addon <stsimsf> enabled
addon(myLibrary)
#>           name
#> 1 stsimcbmcfs3
#> 2      stsimsf
#>                                                                                                      description
#> 1 Integrates the Carbon Budget Model for the Canadian Forest Sector (CBM-CFS3) into the ST-Sim simulation model.
#> 2                                                   Integrates stocks and flows into the ST-Sim simulation model
#>   enabled currentVersion minimumVersion
#> 1   FALSE         1.0.17            N/A
#> 2    TRUE         3.3.15         3.2.10

# Disable add on package
disableAddon(myLibrary, c("stsimsf"))
#> Addon <stsimsf> disabled
addon(myLibrary)
#>           name
#> 1 stsimcbmcfs3
#> 2      stsimsf
#>                                                                                                      description
#> 1 Integrates the Carbon Budget Model for the Canadian Forest Sector (CBM-CFS3) into the ST-Sim simulation model.
#> 2                                                   Integrates stocks and flows into the ST-Sim simulation model
#>   enabled currentVersion minimumVersion
#> 1   FALSE         1.0.17            N/A
#> 2   FALSE         3.3.15            N/A
# }