rspatial/geodata

`gadm` silently downloads only the first element of `country`

AMBarbosa opened this issue · 2 comments

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!

This is now vectorized. The countries are rbinded

countries <- gadm(country = c("Netherlands", "Belgium", "Luxembourg"), level = 1, path = tempdir())
plot(countries)

Even better! Thanks!