Re: [R-sig-Geo] How to remove polygons according to their attributes?

2008-09-05 Thread James Nylen
In the past I have encountered numerical shapefile attributes stored as factors, not numbers. So you would have to make the following change to Friderike's code to select by area: require(rgdal) Ctries=readOGR(dsn='C:/data/datasets/HornOfAfrica', layer='HornOfAfrica', p4s=NULL) str([EMAIL PROTECT

Re: [R-sig-Geo] How to remove polygons according to their attributes?

2008-09-05 Thread Oehler, Friderike (AGPP)
, Friderike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Xin LIN Sent: 05 September 2008 10:07 To: r-sig-geo@stat.math.ethz.ch Subject: [R-sig-Geo] How to remove polygons according to their attributes? Hi, everyone I have a shapefile with many adjace

[R-sig-Geo] How to remove polygons according to their attributes?

2008-09-05 Thread Xin LIN
Hi, everyone I have a shapefile with many adjacent polygons in. Each has a series of attributes such as ID and area. Now I want to remove some of them based on attributes, e.g. to remove polygons with areas less than a given value. How can I proceed? Thanks a lot.=) Lin Xin -- Lin Xin Departme