CalculationMethods class for OSP snapshots
CalculationMethods.RdAn R6 class that wraps the set of calculation methods PK-Sim uses to derive compound quantities (e.g. partition coefficient method, cellular permeability method, body surface area method). In an OSP snapshot, the calculation methods are serialised as an array of method name strings. They appear in two places: directly on a Compound and inside an OriginData of an Individual.
Active bindings
namesCharacter vector of method names.
lengthNumber of methods currently held (read-only).
Methods
CalculationMethods$new()
Create a new CalculationMethods object
Usage
CalculationMethods$new(names = character())CalculationMethods$add()
Add a method name. Duplicates are kept to mirror the snapshot's raw representation.
CalculationMethods$remove()
Remove a method name. If name is not present, the set is unchanged.
Note the asymmetry with $add(): $add() keeps duplicates to mirror
the snapshot's raw representation, whereas $remove() deletes every
occurrence of name in a single call.
CalculationMethods$to_list()
Convert back to the raw snapshot representation: a list of method-name
strings, or NULL when empty. A list is used (rather than a character
vector) so that single-method sets round-trip as JSON arrays.