View source: R/utilities-container.R
getAllContainersMatching | R Documentation |
Retrieve all sub containers of a parent container (simulation or container instance) matching the given path criteria
getAllContainersMatching(paths, container)
paths |
A vector of strings representing the paths relative to the |
container |
A Container or Simulation used to find the containers |
A list of containers matching the path criteria. The list is empty if no containers matching were found.
loadSimulation()
and getContainer()
to create objects of type Container or Simulation
simPath <- system.file("extdata", "simple.pkml", package = "ospsuite")
sim <- loadSimulation(simPath)
# Return all `Intracellular` containers defined in all direct containers of the organism
containers <- getAllContainersMatching("Organism|*|Intracellular", sim)
# Return all `Intracellular` containers defined in all direct containers of the organism
# and the container "Interstitial" under 'Organism|Brain'
paths <- c("Organism|*|Intracellular", "Organism|Brain|Interstitial")
containers <- getAllContainersMatching(paths, sim)
# Returns all `Intracellular` containers defined in `Organism` and all its subcontainers
containers <- getAllContainersMatching("Organism|**|Intracellular", sim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.