Closed sbfnk closed 3 years ago
and a deeper issue why is this failing with something related to Colombia when only the UK is used?
https://github.com/epiforecasts/covidregionaldata/commit/1c32cd7e02323845b8b83dcd9b49e12e7a546dc9 should have fixed the surface issue but leaving open as why Colombia interacts with other classes is an issue.
When you call get_regional_data
for any country a side effect of finding out which datasets are available is to try to instantiate a class for every country and this will fail for classes which rely on the data loaded as part of the package. We may need to lighten the instantiation which the check of available datasets provides or make a more specific function which just checks that one particular dataset is available - and then figure out what to do about the dependency on the data if the full library hasn’t been loaded.
Ah, that makes sense Richard, that really is an unintended side effect. I am also surprised it needs to be explicitly loaded in the code (i.e with covidregionaldata::
but perhaps I am not understanding how package namespaces work completely.
I'll open a new issue for this and close this one up as the actual core problem is resolved.
Running
throws an error:
unless the
covidregionaldata
package is loaded first.