`gadm` silently downloads only the first element of `country`
AMBarbosa opened this issue · 2 comments
AMBarbosa commented
The code below doesn't complain, but silently downloads only the first country:
countries <- gadm(country = c("Portugal", "Spain", "France"), level = 1, path = tempdir())
unique(countries$COUNTRY)
# [1] "Portugal"
It would be helpful to emit at least a warning message about that. Cheers!
rhijmans commented
This is now vectorized. The countries are rbind
ed
countries <- gadm(country = c("Netherlands", "Belgium", "Luxembourg"), level = 1, path = tempdir())
plot(countries)
AMBarbosa commented
Even better! Thanks!