uniqueEntities: Extract Unique Elements of type 'Entity'

View source: R/utilities-entity.R

uniqueEntitiesR Documentation

Extract Unique Elements of type 'Entity'

Description

Extract Unique Elements of type 'Entity'

Usage

uniqueEntities(entities, compareBy = CompareBy$id)

Arguments

entities

List of objects of type 'Entity'

compareBy

A string defining the property that is compared by. Can take values 'id', 'name', and 'path'. Default is 'id'.

Value

List of entities that are unique for the property defined by the argument 'compareBy'.

Examples

simPath <- system.file("extdata", "simple.pkml", package = "ospsuite")
sim <- loadSimulation(simPath)

parameters <- c(
  getParameter(toPathString(c("Organism", "Liver", "Volume")), sim),
  getParameter(toPathString(c("Organism", "Liver", "Volume")), sim),
  getParameter(toPathString(c("Organism", "TableParameter")), sim)
)

# Return a list containing the two parameters 'Volume' and 'Weight (tissue)'
uniqueEntities(parameters, CompareBy$id)


Open-Systems-Pharmacology/OSPSuite-R documentation built on Feb. 14, 2025, 4:48 p.m.