Supports both the legacy flat format (top-level settings key) and
the versioned format (top-level current key). For versioned files
the most recent version is returned by default. Use version to
select a specific version by index or comment. The full versioned
object is attached as attribute "versioned" so callers can offer
version selection.
Empty optional units tables are restored as NULL, preserving the default
units when settings are replayed or used to generate an R script.
Arguments
- path
Character string with path to the settings YAML file.
- version
Version selector for versioned settings files. Either an integer index (1 = most recent, 2 = second, etc.) or a character string matched against the version
commentfield. Defaults to1L(most recent). Ignored for non-versioned (legacy) settings files.
Value
A list with parsed settings. For versioned files, the
attribute "versioned" contains the full
read_versioned_settings() result.