session: Create or return SyncroSim Session

Description Usage Arguments Details Value Examples

Description

Methods to create or return a SyncroSim Session.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
session(x = NULL, silent = TRUE, printCmd = FALSE)

## S4 method for signature 'missingOrNULLOrChar'
session(x = NULL, silent = TRUE, printCmd = FALSE)

## S4 method for signature 'SsimObject'
session(x = NULL, silent = TRUE, printCmd = FALSE)

session(ssimObject) <- value

## S4 replacement method for signature 'character'
session(ssimObject) <- value

## S4 replacement method for signature '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 If TRUE, warnings from the console are ignored. Otherwise they are printed. Default is FALSE

printCmd

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

ssimObject

Project or Scenario 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.

Value

A SyncroSim Session object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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)

# Lists the version of SyncroSim Session
version(mySession)

# Data frame of the packages installed with this version of SyncroSim
package(mySession) 

# Data frame of the base packages installed with this version of SyncroSim
package(mySession, installed = "BASE") 

# Set a new SyncroSim Session for the SyncroSim Project
session(myProject) <- session(x = filepath(session(myProject)))

rsyncrosim documentation built on Oct. 28, 2021, 1:07 a.m.