geodata icon indicating copy to clipboard operation
geodata copied to clipboard

`worldclim_country()` for more than one country

Open AMBarbosa opened this issue 1 year ago • 0 comments

When the country argument for worldclim_country() has length >1, only the first element is used, and the other are silently ignored.

tavg <- geodata::worldclim_country(country = c("Luxembourg", "Netherlands", "Belgium"), var = "tavg", path = tempdir())
terra::plot(tavg[[1]])
terra::plot(vect(system.file("ex/lux.shp", package="terra")), add = TRUE)  # only Luxembourg was taken

I think there should be at least a warning about this, or (ideally) the function could take more than one country at a time.

AMBarbosa avatar May 11 '23 09:05 AMBarbosa