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)
scenario |
|
---|
An integer id of the parent Scenario. If the input Scenario does not have a
parent, the function returns NA
#># 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")#>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# }