[R] add city and point in the map

YIHSU CHEN yschen at jhu.edu
Thu Apr 27 16:50:49 CEST 2006


Dear Helpers:

I'm trying to use packages "maps" and "mapdata" (see blow) to display the research resutls on map (Mid-Atlantic region).  In particular, I need to mark a number of points in the map by giving their latitude and longitude information.  For instance, I would like to mark a point on (long, lat) =(75.56027, 39.09271).  Also, I need to mark several cities that I suspect might not in the "world.cities" database such as Baltimore, etc.  Presumably, I can do the same thing by finding out the lat and long infor of Baltimroe and add text next to the point I mark.  

Thanks a billion

Yihsu


library(maps)
library(mapdata)
state.list <- c("maryland","new jersey","west virginia", "virginia","ohio","delaware","pennsylvania","kentucky","indiana","north carlina")
map("state",state.list)
map.cities(x=world.cities, Country="US",minpop=100000)




More information about the R-help mailing list