Retrieves the packages installed or available for this version of SyncroSim.

package(ssimObject = NULL, installed = TRUE, listTemplates = NULL)

# S4 method for character
package(ssimObject = NULL, installed = TRUE, listTemplates = NULL)

# S4 method for missingOrNULL
package(ssimObject = NULL, installed = TRUE, listTemplates = NULL)

# S4 method for Session
package(ssimObject = NULL, installed = TRUE, listTemplates = NULL)

# S4 method for SsimLibrary
package(ssimObject)

Arguments

ssimObject

Session or SsimLibrary object. If NULL (default), session() will be used

installed

logical or character. TRUE (default) to list installed packages, FALSE to list available packages, and "BASE" to list installed base packages

listTemplates

character. Name of a SyncroSim package. If not NULL (default), then lists all templates available for that package. The package must be installed in the current Session. Ignored if ssimObject is a SsimLibrary object

Value

Returns a data.frame of packages installed or templates available for a specified package.

Examples

# \donttest{
# Set the file path and name of the new SsimLibrary
myLibraryName <- file.path(tempdir(),"testlib")

# Set the SyncroSim Session and SsimLibrary
mySession <- session()
myLibrary <- ssimLibrary(name = myLibraryName, session = mySession)

# List all installed packages
package(mySession)
#>                    name
#> 1            burnP3Plus
#> 2   burnP3PlusCell2Fire
#> 3  burnP3PlusPrometheus
#> 4            helloworld
#> 5    helloworldPipeline
#> 6     helloworldSpatial
#> 7        helloworldTime
#> 8            prioritizr
#> 9                 stsim
#> 10         stsimcbmcfs3
#> 11              stsimsf
#> 12                wisdm
#>                                                                                                       description
#> 1                                                                  Burn-P3+ package for burn probability modeling
#> 2                                                          Cell2Fire fire growth model add-on package for BurnP3+
#> 3                                                         Prometheus fire growth model add-on package for BurnP3+
#> 4                                                                   Example demonstrating how to create a package
#> 5                                                                      Example demonstrating how to use pipelines
#> 6                                                                   Example demonstrating how to use spatial data
#> 7                                                                      Example demonstrating how to use timesteps
#> 8                                                                                Systematic conservation planning
#> 9                                                                The ST-Sim state-and-transition simulation model
#> 10 Integrates the Carbon Budget Model for the Canadian Forest Sector (CBM-CFS3) into the ST-Sim simulation model.
#> 11                                                   Integrates stocks and flows into the ST-Sim simulation model
#> 12                                                         Workbench for Integrated Species Distribution Modeling
#>    version                                                    location status
#> 1    1.0.0           C:\\Users\\birch\\SyncroSim\\Packages\\burnP3Plus     OK
#> 2    1.0.0  C:\\Users\\birch\\SyncroSim\\Packages\\burnP3PlusCell2Fire     OK
#> 3    1.0.0 C:\\Users\\birch\\SyncroSim\\Packages\\burnP3PlusPrometheus     OK
#> 4    1.0.1           C:\\Users\\birch\\SyncroSim\\Packages\\helloworld     OK
#> 5    1.0.0   C:\\Users\\birch\\SyncroSim\\Packages\\helloworldPipeline     OK
#> 6    1.0.6    C:\\Users\\birch\\SyncroSim\\Packages\\helloworldSpatial     OK
#> 7    1.0.0       C:\\Users\\birch\\SyncroSim\\Packages\\helloworldTime     OK
#> 8    1.0.0           C:\\Users\\birch\\SyncroSim\\Packages\\prioritizr     OK
#> 9   3.3.14                C:\\Users\\birch\\SyncroSim\\Packages\\stsim     OK
#> 10  1.0.17         C:\\Users\\birch\\SyncroSim\\Packages\\stsimcbmcfs3     OK
#> 11  3.3.15              C:\\Users\\birch\\SyncroSim\\Packages\\stsimsf     OK
#> 12  1.0.13                C:\\Users\\birch\\SyncroSim\\Packages\\wisdm     OK

# List all the installed base packages
package(installed = "BASE")
#>                 name                                            description
#> 1         burnP3Plus         Burn-P3+ package for burn probability modeling
#> 2         helloworld          Example demonstrating how to create a package
#> 3 helloworldPipeline             Example demonstrating how to use pipelines
#> 4  helloworldSpatial          Example demonstrating how to use spatial data
#> 5     helloworldTime             Example demonstrating how to use timesteps
#> 6         prioritizr                       Systematic conservation planning
#> 7              stsim       The ST-Sim state-and-transition simulation model
#> 8              wisdm Workbench for Integrated Species Distribution Modeling
#>   version
#> 1   1.0.0
#> 2   1.0.1
#> 3   1.0.0
#> 4   1.0.6
#> 5   1.0.0
#> 6   1.0.0
#> 7  3.3.14
#> 8  1.0.13

# List all available packages on the server (including currently installed)
package(installed = FALSE)
#>                     name
#> 1             burnP3Plus
#> 2    burnP3PlusCell2Fire
#> 3   burnP3PlusPrometheus
#> 4              demosales
#> 5               designer
#> 6                  dgsim
#> 7                    epi
#> 8     epiModelVocVaccine
#> 9             helloworld
#> 10       helloworldConda
#> 11    helloworldPipeline
#> 12     helloworldSpatial
#> 13        helloworldTime
#> 14 helloworldUncertainty
#> 15     landfirevegmodels
#> 16                 lucas
#> 17               netlogo
#> 18             omniscape
#> 19       omniscapeImpact
#> 20             stconnect
#> 21                 stsim
#> 22       stsimBurnP3Plus
#> 23          stsimcbmcfs3
#> 24           stsimecodep
#> 25               stsimsf
#> 26                 wisdm
#>                                                                                                                               description
#> 1                                                                                          Burn-P3+ package for burn probability modeling
#> 2                                                                                  Cell2Fire fire growth model add-on package for BurnP3+
#> 3                                                                                 Prometheus fire growth model add-on package for BurnP3+
#> 4                                                                 Example SyncroSim Base Package of a very simple sales forecasting model
#> 5                                                                                                              SyncroSim Package Designer
#> 6                                                                                          Simulates demographics of wildlife populations
#> 7                                                                                                 Model of epidemic infections and deaths
#> 8                                                                                      Integrates VOCs and vaccination into the Epi model
#> 9                                                                                           Example demonstrating how to create a package
#> 10                                                                                                       Example using conda environments
#> 11                                                                                                                Example using pipelines
#> 12                                                                                                             Example using spatial data
#> 13                                                                                                                Example using timesteps
#> 14                                                                                      Example using iterations to represent uncertainty
#> 15                                                                                                             LANDFIRE vegetation models
#> 16                                                                                         Land Use and Carbon Scenario Simulator (LUCAS)
#> 17                                                                                      Runs the NetLogo agent-based modeling environment
#> 18                                                                          Omni-directional habitat connectivity based on circuit theory
#> 19                                                                          Calculates changes in connectivity categories from a baseline
#> 20                                                                           Connectivity planning for future climate and land-use change
#> 21                                                                                       The ST-Sim state-and-transition simulation model
#> 22                                                       Example library simulating ST-Sim fire events with the BurnP3+ SyncroSim package
#> 23                          Integrates the Carbon Budget Model for the Canadian Forest Sector (CBM-CFS3) into the ST-Sim simulation model
#> 24 Calculates ecological departure in ST-Sim using the LANDFIRE Fire Regime Condition Class [*** REQUIRES SyncroSim v2.2.3 or higher ***]
#> 25                                                                           Integrates stocks and flows into the ST-Sim simulation model
#> 26                                                                                 Workbench for Integrated Species Distribution Modeling
#>    version minimumSyncroSimVersion
#> 1    1.0.0                     N/A
#> 2    1.0.0                     N/A
#> 3    1.0.0                     N/A
#> 4    1.1.1                     N/A
#> 5   1.0.21                     N/A
#> 6    2.3.4                     N/A
#> 7    1.1.3                     N/A
#> 8    1.0.3                     N/A
#> 9    1.0.1                     N/A
#> 10   1.0.2                     N/A
#> 11   1.0.0                     N/A
#> 12   1.0.6                     N/A
#> 13   1.0.0                     N/A
#> 14   1.0.0                     N/A
#> 15   1.1.2                     N/A
#> 16   1.0.6                     N/A
#> 17   1.2.1                     N/A
#> 18   1.1.0                     N/A
#> 19   1.0.0                     N/A
#> 20  1.1.19                     N/A
#> 21  3.3.14                     N/A
#> 22   1.0.4                     N/A
#> 23  1.0.17                     N/A
#> 24   3.3.1                     N/A
#> 25  3.3.15                     N/A
#> 26  1.0.13                     N/A
 
# Check the package you're SsimLibrary is currently using
package(myLibrary)
#>    name                                      description version
#> 1 stsim The ST-Sim state-and-transition simulation model  3.3.14

# Check the templates available for an installed package
installPackage("helloworldSpatial")
#> Package <helloworldSpatial> is already installed
package(listTemplates = "helloworldSpatial")
#>                                name     displayName installed
#> 1 helloworldSpatial_example-library example-library       Yes
# }