Re: [R-sig-Geo] How to extract coordinates values from a shapefile?

2010-06-09 Thread Matt Beard
> > library(maptools) > > # A simple way to print out a list of coordinates for each polygon in your > shapefile: > > # Path and filename of polygon shapefile > testfile <- '/media/PKBACK# 001/FNR210/QGISLab/habitats/habitats.shp' > > # Read in polygon shapefile using handy maptools function > test

Re: [R-sig-Geo] ReadShapePoly subsetting data

2010-05-30 Thread Matt Beard
setted dim(spdf)# 3141 by 16 dim(subSpdf) # 733 by 16 spplot(spdf,"Lynchings") # original spplot(subSpdf,"Lynchings") # subsetted # Create pdf of results pdf("LynchingResults.pdf") spplot(subSpdf,"Lynchings") dev.o

Re: [R-sig-Geo] ReadShapePoly subsetting data

2010-05-30 Thread Matt Beard
y don't show up as NA's. They are just 0's. The 0 values in the states > I am interested in are correct, however. > > Pete > > > On 2010/05/30 20:28, Matt Beard wrote: > > Have you looked into functions such as na.omit()? > > Matt > > On Sun, May 30, 2

Re: [R-sig-Geo] ReadShapePoly subsetting data

2010-05-30 Thread Matt Beard
Have you looked into functions such as na.omit()? Matt On Sun, May 30, 2010 at 7:54 PM, Peter Larson wrote: > Hello all, > > I have data for several states and no data for most. I just want to subset > the states I have data for and ignore the rest. > > Is there anyway to do this? I have a shap

Re: [R-sig-Geo] Helping with write a function. Merging shape file with all fields?

2010-01-23 Thread Matt Beard
) uid <- uid + n poly.data <- spRbind(poly.data,temp.data) } writeOGR(poly.data, dsn=combinedShp, layer="combined", driver="ESRI Shapefile") Matt Beard Purdue University On Fri, Jan 22, 2010 at 10:45 PM, Zia Ahmed wrote: > Hi Matt: > With help of Jim Holt