Get the default alternative of a compound property
get_default_alternative.RdReturns the name of the default alternative in a compound
physicochemical-property group, for example the Solubility,
Lipophilicity, or FractionUnbound field of a Compound. The default
is the alternative whose IsDefault flag is TRUE (an absent flag is
treated as TRUE, per the snapshot schema); when no alternative sets it,
the "User defined" alternative is used, and a group with no resolvable
default returns NULL.
Value
The default alternative's name as a character string, or NULL
when the group has no resolvable default.
Examples
compound <- create_compound(
name = "Drug X",
solubility = list(
solubility(9999, name = "Aqueous"),
solubility(200, name = "FaSSIF", default = TRUE)
)
)
get_default_alternative(compound$solubility)
#> [1] "FaSSIF"