dependency | R Documentation |
List dependencies, set dependencies, or remove dependencies from a SyncroSim
Scenario
. Setting dependencies is a way of linking together
Scenario Datafeeds, such that a change in the Scenario that is the source
dependency will update the dependent Scenario as well.
dependency(ssimObject)
## S4 method for signature 'character'
dependency(ssimObject)
## S4 method for signature 'Scenario'
dependency(ssimObject)
dependency(ssimObject) <- value
## S4 replacement method for signature 'Scenario'
dependency(ssimObject) <- value
ssimObject |
|
value |
|
If dependency==NULL
, other arguments are ignored, and set of existing dependencies
is returned in order of precedence (from highest to lowest precedence).
Otherwise, returns list of saved or error messages for each dependency of each
scenario.
Note that the order of dependencies can be important - dependencies added most recently take precedence over existing dependencies. So, dependencies included in the dependency argument take precedence over any other existing dependencies. If the dependency argument includes more than one element, elements are ordered from lowest to highest precedence.
A data.frame: all dependencies for a given Scenario
## Not run:
# Specify file path and name of new SsimLibrary
myLibraryName <- file.path(tempdir(), "testlib")
# Set up a SyncroSim Session, SsimLibrary, Project, and 2 Scenarios
mySession <- session()
myLibrary <- ssimLibrary(name = myLibraryName, session = mySession)
myProject <- project(myLibrary, project = "Definitions")
myScenario <- scenario(myProject, scenario = "My Scenario")
myNewScenario <- scenario(myProject,
scenario = "my New Scenario")
# Set myScenario as a dependency of myNewScenario
dependency(myNewScenario) <- myScenario
# Get all dependencies info
dependency(myNewScenario)
# Remove all dependencies
dependency(myNewScenario) <- c()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.