parentId {rsyncrosim} | R Documentation |
Retrieves the parent Scenario id or parent Folder id
Description
Retrieves the id of the parent of a SyncroSim results Scenario or a SyncroSim Folder.
Usage
parentId(child)
## S4 method for signature 'character'
parentId(child)
## S4 method for signature 'Scenario'
parentId(child)
## S4 method for signature 'Folder'
parentId(child)
Arguments
child |
Value
An integer id of the parent Scenario if input is a Scenario, or an integer
id of the parent Folder if input is a Folder. If the input Scenario or Folder
does not have a parent, the function returns NA
Examples
## Not run:
# Install helloworldSpatial SyncroSim package
addPackage("helloworldSpatial")
# 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",
forceUpdate = TRUE)
myProject <- project(myLibrary, project = "Definitions")
myScenario <- scenario(myProject, scenario = "My Scenario")
# Run Scenario to generate results
resultScenario <- run(myScenario)
# Find the parent ID of the Scenario
parentId(resultScenario)
## End(Not run)
[Package rsyncrosim version 1.5.0 Index]