Methods to create or return a SyncroSim Session
.
Usage
session(x = NULL, silent = TRUE, printCmd = FALSE)
# S4 method for class 'missingOrNULLOrChar'
session(x = NULL, silent = TRUE, printCmd = FALSE)
# S4 method for class 'SsimObject'
session(x = NULL, silent = TRUE, printCmd = FALSE)
# S4 method for class 'Folder'
session(x = NULL, silent = TRUE, printCmd = FALSE)
session(ssimObject) <- value
# S4 method for class 'NULLOrChar'
session(ssimObject) <- value
# S4 method for class 'SsimObject'
session(ssimObject) <- value
Arguments
- x
character or SsimObject. Path to SyncroSim installation. If
NULL
(default), then default path is used- silent
logical. Applies only if x is a path or
NULL
IfTRUE
, warnings from the console are ignored. Otherwise they are printed. Default isFALSE
- printCmd
logical. Applies only if x is a path or
NULL
IfTRUE
, arguments passed to the SyncroSim console are also printed. Helpful for debugging. Default isFALSE
- ssimObject
Project
orScenario
object- value
Session
object
Details
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.
Examples
# \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:\\PROGRA~1\\SYNCRO~1"
# Lists the version of SyncroSim Session
version(mySession)
#> [1] "3.1.16"
# Data frame of the packages installed with this version of SyncroSim
packages(mySession)
#> name version
#> 1 burnP3Plus 2.3.0
#> 2 burnP3Plus 2.4.0
#> 3 burnP3Plus 2.4.1
#> 4 burnP3Plus 2.5.0
#> 5 burnP3Plus 2.5.1
#> 6 burnP3PlusCell2Fire 2.2.0
#> 7 burnP3PlusFireSTARR 1.2.0
#> 8 burnP3PlusFireSTARR 1.3.1
#> 9 burnP3PlusFireSTARR 1.4.0
#> 10 burnP3PlusInputBuilder 1.0.0
#> 11 burnP3PlusPostProcess 1.0.0
#> 12 burnP3PlusPrometheus 2.2.0
#> 13 burnP3PlusPrometheus 2.3.0
#> 14 demosales 2.1.0
#> 15 dgsim 3.1.0
#> 16 ecoClassify 2.0.0
#> 17 helloworld 2.1.0
#> 18 helloworldPipeline 2.1.0
#> 19 helloworldSpatial 2.1.0
#> 20 helloworldTime 2.1.0
#> 21 helloworldUncertainty 2.1.0
#> 22 omniscape 2.2.0
#> 23 prioritizr 2.2.2
#> 24 stsim 4.3.8
#> 25 stsim 4.5.0
#> 26 stsim 4.5.1
#> 27 stsimecodep 4.1.0
#> 28 wisdmStsimConnector 1.2.0
#> description
#> 1 Burn probability modeling
#> 2 Burn probability modeling
#> 3 Burn probability modeling
#> 4 Burn probability modeling
#> 5 Burn probability modeling
#> 6 Cell2Fire fire growth model for BurnP3+
#> 7 FireSTARR fire growth model for BurnP3+
#> 8 FireSTARR fire growth model for BurnP3+
#> 9 FireSTARR fire growth model for BurnP3+
#> 10 burnP3PlusInputBuilder
#> 11 Post-process BurnP3+ model results
#> 12 Prometheus fire growth model for BurnP3+
#> 13 Prometheus fire growth model for BurnP3+
#> 14 Demo Sales SyncroSim Package
#> 15 Simulates demographics of wildlife populations
#> 16 Image classifier using semantic image segmentation
#> 17 Example demonstrating how to create a package
#> 18 Example demonstrating how to use pipelines with an R model
#> 19 Example demonstrating how to use spatial data with an R model
#> 20 Example demonstrating how to use timesteps with an R model
#> 21 Example demonstrating how to use iterations with an R model
#> 22 Omni-directional habitat connectivity based on circuit theory
#> 23 Systematic conservation planning
#> 24 The ST-Sim state-and-transition simulation model
#> 25 The ST-Sim state-and-transition simulation model
#> 26 The ST-Sim state-and-transition simulation model
#> 27 Calculates TNC's unified ecological departure from reference conditions in ST-Sim
#> 28 Connector package between WISDM and ST-Sim
#> location
#> 1 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\burnP3Plus\\2.3.0
#> 2 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\burnP3Plus\\2.4.0
#> 3 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\burnP3Plus\\2.4.1
#> 4 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\burnP3Plus\\2.5.0
#> 5 C:\\gitprojects\\BurnP3Plus\\src
#> 6 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\burnP3PlusCell2Fire\\2.2.0
#> 7 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\burnP3PlusFireSTARR\\1.2.0
#> 8 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\burnP3PlusFireSTARR\\1.3.1
#> 9 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\burnP3PlusFireSTARR\\1.4.0
#> 10 C:\\gitprojects\\BurnP3PlusInputBuilder\\src
#> 11 C:\\gitprojects\\BurnP3PlusPostProcess\\src
#> 12 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\burnP3PlusPrometheus\\2.2.0
#> 13 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\burnP3PlusPrometheus\\2.3.0
#> 14 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\demosales\\2.1.0
#> 15 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\dgsim\\3.1.0
#> 16 C:\\gitprojects\\ecoClassify\\src
#> 17 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\helloworld\\2.1.0
#> 18 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\helloworldPipeline\\2.1.0
#> 19 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\helloworldSpatial\\2.1.0
#> 20 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\helloworldTime\\2.1.0
#> 21 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\helloworldUncertainty\\2.1.0
#> 22 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\omniscape\\2.2.0
#> 23 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\prioritizr\\2.2.2
#> 24 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\stsim\\4.3.8
#> 25 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\stsim\\4.5.0
#> 26 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\stsim\\4.5.1
#> 27 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\stsimecodep\\4.1.0
#> 28 C:\\Users\\birch\\AppData\\Local\\SyncroSim\\Packages\\wisdmStsimConnector\\1.2.0
#> status
#> 1 OK
#> 2 OK
#> 3 OK
#> 4 OK
#> 5 OK
#> 6 OK
#> 7 OK
#> 8 OK
#> 9 OK
#> 10 FAILED: Cannot load package. The package location is not valid: 'C:\\gitprojects\\BurnP3PlusInputBuilder\\src'
#> 11 OK
#> 12 OK
#> 13 OK
#> 14 OK
#> 15 OK
#> 16 OK
#> 17 OK
#> 18 OK
#> 19 OK
#> 20 OK
#> 21 OK
#> 22 OK
#> 23 OK
#> 24 OK
#> 25 OK
#> 26 OK
#> 27 OK
#> 28 OK
# Set a new SyncroSim Session for the SyncroSim Project
session(myProject) <- session(x = filepath(session(myProject)))
# }