Get package parameters and return error if they do not exist

get_param_strict(param, package = NULL)

Arguments

param

parameter to get

package

package of the parameter (NULL if running from a package)

Value

value of param in package package and error if parameter no found

Examples

register_param('param1', 'tgconfig') set_param('param1', 'value1', 'tgconfig') get_param_strict('param1', 'tgconfig')
#> [1] "value1"
# try to get a parameter that doesn't exist # get_param_strict('other_param', 'tgconfig') # would throw an error