Retrieve molecular weight for a quantity's molecule
Source:R/utilities-quantity.R
getMolWeightFor.Rd
Returns the molecular weight of the molecule for a given quantity.
If no unit is provided, the value is returned in the base unit (kg/µmol
).
Examples
simPath <- system.file("extdata", "Aciclovir.pkml", package = "ospsuite")
sim <- loadSimulation(simPath)
parameterPath <- "Organism|VenousBlood|Plasma|Aciclovir|Concentration"
quantity <- getQuantity(parameterPath, container = sim)
getMolWeightFor(quantity, unit = "g/mol")
#> [1] 225.21