Closed NilsEnevoldsen closed 2 years ago
Thanks a lot for the diagnostic. I hope this is "fixed" by https://github.com/vincentarelbundock/countrycode/commit/6cd1d7877b6f6260f0e0f4de93c300c25c37fb13
Edit: fixed link to wrong commit
closing now but feel free to re-open if it doesn't work on your end.
countryname
(created as a result of #239) gives a warning if the destination is numeric (or more precisely "not character"). This causes a warning (not an error) in one of our tests: https://github.com/vincentarelbundock/countrycode/blob/4c45ec9f346692aaa7eaa0ca8d254b93ba3fa3a6/tests/testthat/test-countryname.R#L13For example:
This happens because
countryname.R
that passes along a parameter tocountrycode_convert
that doesn't make sense for a numeric destination context:https://github.com/vincentarelbundock/countrycode/blob/4c45ec9f346692aaa7eaa0ca8d254b93ba3fa3a6/R/countryname.R#L50
On the other hand, the warning is intended for situations like this: