Re: [R] Retrieving Vertices Coordinates from SpatialPolygons

2009-03-21 Thread David Winsemius
On Mar 21, 2009, at 10:31 AM, Barry Rowlingson wrote: On Sat, Mar 21, 2009 at 12:33 PM, Enrico R. Crema wrote: Dear List, I'm trying to use different R packages for my Teaching Assistantship classes. And I cam out to an (apparently) very simple problem. I would like to retrieve the verti

Re: [R] Retrieving Vertices Coordinates from SpatialPolygons

2009-03-21 Thread hadley wickham
This came up on R-sig-geo two days ago and this is what I said: I have the following code in ggplot2 for turning a SpatialPolygon into a regular data frame of coordinates. You'll need to load ggplot2, and then run fortify(yoursp). fortify.SpatialPolygonsDataFrame <- function(shape, region = NULL

Re: [R] Retrieving Vertices Coordinates from SpatialPolygons

2009-03-21 Thread Barry Rowlingson
On Sat, Mar 21, 2009 at 12:33 PM, Enrico R. Crema wrote: > Dear List, > > I'm trying to use different R packages for my Teaching Assistantship > classes. And I cam out to an (apparently) very simple problem. I would > like to retrieve the vertices coordinate of a SpatialPolygon data. I > know this

Re: [R] Retrieving Vertices Coordinates from SpatialPolygons

2009-03-21 Thread David Winsemius
If it is in an S4 slot then there should be an extraction function, possibly with an obvious name like coords(). Failing that you could offer the name of the package that you are using. Perhaps that would contain an example to be used for illustration. -- David Winsemius On Mar 21, 2009,

[R] Retrieving Vertices Coordinates from SpatialPolygons

2009-03-21 Thread Enrico R. Crema
Dear List, I'm trying to use different R packages for my Teaching Assistantship classes. And I cam out to an (apparently) very simple problem. I would like to retrieve the vertices coordinate of a SpatialPolygon data. I know this is stored in the "coords" slot, but I can't get access to it