Closed mbjoseph closed 3 years ago
Hey @mikejohnson51! I'm incorporating climateR into a downstream package, but running into scoping issues.
When my package calls getMACA, the following error is raised:
getMACA
Error in eval(parse(text = paste0("param_meta$", service))) : object 'param_meta' not found
The traceback indicates that this is raised when climateR::define.param is called by climateR::getMACA:
climateR::define.param
climateR::getMACA
Proposed solution
Modifying this line to use climateR::param_meta instead of param_meta solves the issue: https://github.com/mikejohnson51/climateR/blob/master/R/utility_define_param.R#L12
climateR::param_meta
param_meta
I noticed that you've explicitly specified the scope like this elsewhere where eval() is used, e.g.,
eval()
https://github.com/mikejohnson51/climateR/blob/fe7414903aa0f0a5ac3149c36c7e3401e92972c9/R/utility_define_config.R#L10
and
https://github.com/mikejohnson51/climateR/blob/fe7414903aa0f0a5ac3149c36c7e3401e92972c9/R/utility_define_config.R#L34
I think this should be taken care of, thanks again @mbjoseph!
cool - thanks @mikejohnson51! :+1:
Hey @mikejohnson51! I'm incorporating climateR into a downstream package, but running into scoping issues.
When my package calls
getMACA
, the following error is raised:The traceback indicates that this is raised when
climateR::define.param
is called byclimateR::getMACA
:Proposed solution
Modifying this line to use
climateR::param_meta
instead ofparam_meta
solves the issue: https://github.com/mikejohnson51/climateR/blob/master/R/utility_define_param.R#L12I noticed that you've explicitly specified the scope like this elsewhere where
eval()
is used, e.g.,https://github.com/mikejohnson51/climateR/blob/fe7414903aa0f0a5ac3149c36c7e3401e92972c9/R/utility_define_config.R#L10
and
https://github.com/mikejohnson51/climateR/blob/fe7414903aa0f0a5ac3149c36c7e3401e92972c9/R/utility_define_config.R#L34