Retrieve all sub containers of a parent container (simulation or container instance) matching the given path criteria
Source:R/utilities-container.R
getAllContainersMatching.Rd
Retrieve all sub containers of a parent container (simulation or container instance) matching the given path criteria
Value
A list of containers matching the path criteria. The list is empty if no containers matching were found.
See also
loadSimulation()
and getContainer()
to create objects of type Container or Simulation
Examples
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)