View source: R/utilities-quantity.R
getMolWeightFor | R Documentation |
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
).
getMolWeightFor(quantity, unit = NULL, stopIfNotFound = FALSE)
quantity |
A |
unit |
Optional. Target unit for the molecular weight. Defaults to |
stopIfNotFound |
Logical. If |
The molecular weight in the specified unit or NA
if not found.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.