map.cities(x = world.cities, country = "", label = NULL, minpop = 0,
maxpop = Inf, capitals = 0, cex = par("cex"), projection = FALSE,
parameters = NULL, orientation = NULL, ...)world.cities to determine the structure of
the database.TRUE, label all cities. If NULL,
the cities will be labelled unless there are 20 or more.world.cities for further information.FALSE (the default), no
projection is assumed, if TRUE, the previous projection is used,
otherwise a character string that names a map projection to use.
See projection
argument. This argument is optional only in the sense that certain
projections do not require additional parameters. If a projection
does require additional parameters, these must be c(latitude, longitude, rotation) describing where
the map should be centered and a clockwise rotation (in degrees)
about this center.There are three supplied databases, world.cities (the default),
us.cities and canada.cities. The latter two (which need to be made
available by using a data() call, include the state or
province name with the city name (thanks to John Woodruff
Note that if the underlying map is "Pacific-centric", i.e. longitudes exceed 180 degrees, and a projection is used, then the map.cities data must be transformed appropriately.
world.cities, canada.cities,
us.citiesmap("world", "China")
map.cities(country = "China", capitals = 2)
map("state", "New Jersey")
data(us.cities)
map.cities(us.cities, country="NJ")Run the code above in your browser using DataLab