On Sat, Jul 23, 2011 at 10:04 AM, Amy Ruiz <amyrui...@gmail.com> wrote:
>  Hello:
> I'm using the library of maps, however, I need to use a map of Puerto Rico, 
> but
> apparently does not exist. I wanted to know if there is any way that I
> can create
> that map?

 The 'maps' package (not 'library') is a bit old and getting data for
it can be a bit tricky.

 The 'sp' package and its friends such as maptools, rgdal, and raster
are the way to go. They can work with standard geospatial data files,
which are commonly available.

 So, I suggest you install those packages, and then get a shapefile of
Puerto Rico - there's one at www.gadm.org which shows the
administrative regions. Plotting that could be as simple as:

 library(maptools)
 pr = readShapeSpatial("PRI_adm.shp")
 plot(pr)

 - haven't tested that exactly, but its about right.

 Spatial and mapping questions are best directed to the R-Sig-Geo mailing list.

 Hope that helps.

Barry

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to