Restore a previously saved set of PKNCA options
restore_pknca_options.RdPKNCA::PKNCA.options() is global, session-wide state. Functions that
change it temporarily (such as run_nca()) should save the options on entry
with PKNCA::PKNCA.options() and call this function on exit, so that the
options seen by any later code are not affected by the analysis.
Arguments
- options
list of PKNCA options, as returned by
PKNCA::PKNCA.options().
Details
The options are first reset to the PKNCA defaults, after which all options
that differ from the defaults are set in a single call to
PKNCA::PKNCA.options(). PKNCA validates all values before storing any of
them, so the restore is atomic: either all options are restored, or (if any
value is rejected) the options are left at the PKNCA defaults. Options
whose saved value is NULL are restored through the reset to defaults,
since PKNCA::PKNCA.options() cannot set an option to NULL.
PKNCA re-validates the saved values when they are set. Any warnings from
that validation (e.g. min.span.ratio below 2) were already shown when the
options were originally set, and are therefore suppressed. A warning is
given if the restored options are not identical to the saved options.