ropensci / rnaturalearth

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

Extract out common get_data() function #7

Closed hadley closed 7 years ago

hadley commented 9 years ago

I think something like this will work:

get_data <- function(type, scale) {
  scale <- check_scale(scale)
  getExportedValue("rnaturalearth", scale)
}
andysouth commented 8 years ago

I have extracted out the function as suggested. 4fa72d59512011925cb09ffec3e9eb6a076ecef5

I have kept longer scale & type checking for now as I am still unsure which data to include in the package. see #3. Some scale+type combinations may be unavailable.