Retrieves the id of the parent of a SyncroSim results Scenario.

parentId(scenario)

# S4 method for character
parentId(scenario)

# S4 method for Scenario
parentId(scenario)

Arguments

scenario

Scenario object

Value

An integer id of the parent Scenario. If the input Scenario does not have a parent, the function returns NA

Examples

# \donttest{ # Install helloworldSpatial SyncroSim package addPackage("helloworldSpatial")
#> Package <helloworldSpatial> is already installed
# Set the file path and name of the new SsimLibrary myLibraryName <- file.path(tempdir(),"testlib_parentId") # Set the SyncroSim Session, SsimLibrary, Project, and Scenario mySession <- session() myLibrary <- ssimLibrary(name = myLibraryName, session = mySession, package = "helloworldSpatial", template = "example-library")
#> Scenarios available in this template: My Scenario
myProject <- project(myLibrary, project = "Definitions") myScenario <- scenario(myProject, scenario = "My Scenario") # Run Scenario to generate results resultScenario <- run(myScenario)
#> [1] "Running scenario [1] My Scenario"
# Find the parent ID of the Scenario parentId(resultScenario)
#> [1] 1
# }