ashokkrish / spatialEpisim

spatialEpisim: Spatial Tracking of Infectious Disease Epidemics using Mathematical Models
GNU General Public License v3.0
9 stars 5 forks source link

Ambiguous warning on console about unambiguous value matching #28

Closed bryce-carson closed 1 month ago

bryce-carson commented 2 months ago

Warning: Some values were not matched unambiguously:

The warning is clear in that some values should be listed after the warning message, but none are listed; this is ambiguous, which is ironic because the message includes the word "unambiguously".

bryce-carson commented 2 months ago

While refactoring cropBaseRasterHaxby.R this evening, I made a mistake when I called countrycode. This produced the warning this issue was opened for. The tongue-in-cheek reference to the ambiguity of this warning message must, therefore, have been due to a missing or NULL value rather than an incorrect one here, like DRC.

The issue is probably caused by a reactivity issue, where countrycode is called with an input value which is NULL at the time of call. This also makes sense for when the warning is printed, which is almost immediately after the application starts.

countrycode("DRC", "iso3c", "country.name.en")

[1] NA Warning message: Some values were not matched unambiguously: DRC

bryce-carson commented 1 month ago

I'm going to close this until the issue resurfaces, if it does, due to reactivity messing up countrycode functionality.