[R-sig-Geo] Plotting shapefiles in R
celso at stephan.mus.br
celso at stephan.mus.br
Wed Jan 11 20:06:43 CET 2012
Try this:
## read polygon SHP
library(shapefiles)
poli<-read.shapefile("your shp file name")
poli<-convert.to.simple(poli$shp)
poli<-poli[,-1]
plot(poli)
> Hello,
>
> I am trying to perform several spatial analysis on R, based on polygon
> lists. My data come from ArcGIS, being in shape format. I would like to
> create a polygon list from this file. Apparently, R reads properly the
> file
> by using the function "read.shapefile", however when I try the function
> "plot" on this object, the program does not recognize which are the X and
> Y
> coordinates (which -by the way- are in decimal degree units). Should I use
> any specific sintaxis to indicate which columns are my coordinates? or
> maybe I have to project my coordinates somehow?
>
> Thank you very much indeed,
>
> --
> Ester
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
More information about the R-sig-Geo
mailing list