Learn R Programming

rnaturalearth (version 0.1.0)

ne_file_name: return a natural earth filename based on arguments

Description

returns a string that can then be used to download the file.

Usage

ne_file_name(scale = 110, type = "countries", category = c("cultural",
  "physical", "raster"), full_url = FALSE)

Value

string

Arguments

scale

scale of map to return, one of 110, 50, 10 or 'small', 'medium', 'large'

type

type of natural earth file to download one of 'countries', 'map_units', 'map_subunits', 'sovereignty', 'states' OR the portion of any natural earth vector url after the scale and before the . e.g. for 'ne_50m_urban_areas.zip' this would be 'urban_areas' OR the raster filename e.g. for 'MSR_50M.zip' this would be 'MSR_50M'

category

one of natural earth categories : 'cultural', 'physical', 'raster'

full_url

whether to return just the filename [default] or the full URL needed for download

Examples

Run this code
ne_name <- ne_file_name( scale = 110, type = 'countries' )
ne_url  <- ne_file_name( scale = 110, type = 'countries', full_url = TRUE )

Run the code above in your browser using DataLab