The goal of tgconfig is to provide infrastructure for managing package parameters, inspired by pgkconfig


code can be found at


install.packages('tgconfig', repos=c(getOption('repos'), ''))


Parameters are easy to get in relevant functions within a package:

register_param('param', 'scrdb')
set_param('param', 'value', 'scrdb')
get_param_strict('param', 'scrdb')
#> [1] "value"

Error is thrown if a parameter is missing:

Developers are able to register parameters and set their default value in a config file that is part of the package in YAML format:

Users are able to override parameters using their own YAML:

Users get an exception when trying to override a parameter that was not registered:

Users can load multiple parameters to the current environment: