[R-sig-Geo] Plotting shapefiles in R

Thiago Veloso thi_veloso at yahoo.com.br
Fri Jan 13 14:21:43 CET 2012


  Dear Ester,

  This is a simple, yet effective, approach:
 
  library(maptools)
  myshp<-readShapePoly("path_to_your_shapefile")
  plot(myshp)

  Hope it helps,

  Thiago.

--- On Wed, 11/1/12, Ester Polaina Lacambra <e.polaina at gmail.com> wrote:

> From: Ester Polaina Lacambra <e.polaina at gmail.com>
> Subject: [R-sig-Geo] Plotting shapefiles in R
> To: r-sig-geo at r-project.org
> Date: Wednesday, 11 January, 2012, 7:20
> 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