session: Create or return SyncroSim Session

sessionR Documentation

Create or return SyncroSim Session

Description

Methods to create or return a SyncroSim Session.

Usage

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)

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

session(ssimObject) <- value

## S4 replacement method for signature 'NULLOrChar'
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

## Not run: 
# 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)))

## End(Not run)


rsyncrosim documentation built on Oct. 7, 2023, 9:08 a.m.