Methods to create or return a SyncroSim Session
.
session(x = NULL, silent = TRUE, printCmd = FALSE)
# S4 method for missingOrNULLOrChar
session(x = NULL, silent = TRUE, printCmd = FALSE)
# S4 method for SsimObject
session(x = NULL, silent = TRUE, printCmd = FALSE)
# S4 method for Folder
session(x = NULL, silent = TRUE, printCmd = FALSE)
session(ssimObject) <- value
# S4 method for NULLOrChar
session(ssimObject) <- value
# S4 method for SsimObject
session(ssimObject) <- value
character or SsimObject. Path to SyncroSim installation. If NULL
(default), then default path is used
logical. Applies only if x is a path or NULL
If TRUE
, warnings
from the console are ignored. Otherwise they are printed. Default is FALSE
logical. Applies only if x is a path or NULL
If TRUE
,
arguments passed to the SyncroSim console are also printed. Helpful for
debugging. Default is FALSE
Session
object
A SyncroSim Session
object.
In order to avoid problems with SyncroSim version compatibility and SsimLibrary
updating, the new Session must have the same filepath as the Session of the
SsimObject
e.g. filepath(value)==filepath(session(ssimObject))
.
Therefore, the only time when you will need to set a new SyncroSim Session is if you
have updated the SyncroSim software and want to update an existing SsimObject
to use the new software.
# \donttest{
# 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)
myProject <- project(myLibrary, project = "Definitions")
# Lists the folder location of SyncroSim Session
filepath(mySession)
#> [1] "C:/Program Files/SyncroSim"
# Lists the version of SyncroSim Session
version(mySession)
#> [1] "2.4.44"
# Data frame of the packages installed with this version of SyncroSim
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
# Data frame of the base packages installed with this version of SyncroSim
package(mySession, 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
# Set a new SyncroSim Session for the SyncroSim Project
session(myProject) <- session(x = filepath(session(myProject)))
# }