ropensci / rnaturalearth

An R package to hold and facilitate interaction with natural earth map data :earth_africa:
http://ropensci.github.io/rnaturalearth/
Other
214 stars 24 forks source link

`ne_download()` should not warn about `sp` for raster objects or if `load = FALSE` #97

Closed eliocamp closed 7 months ago

eliocamp commented 7 months ago

ne_download()'s returnclass argument is only relevant if load = TRUE and category != "raster", so throwing a warning in other cases might not be relevant. Maybe this

https://github.com/ropensci/rnaturalearth/blob/704772792ecafb0f29b9f68089fdab80ccf4cb43/R/ne_download.R#L99-L101

could be something like this

warn <- returnclass == "sp" & load & category == "raster"
  if (warn) {
    deprecate_sp("ne_download(returnclass = 'sp')")
  }
PMassicotte commented 7 months ago

Fixed, thank you