[R-sig-Geo] Select polygons
Morten Sickel
Morten.Sickel at nrpa.no
Fri Jul 4 17:04:18 CEST 2008
Great! Thanks, that did it!
Morten
-----Original Message-----
From: Edzer Pebesma [mailto:edzer.pebesma at uni-muenster.de]
Sent: Friday, July 04, 2008 4:51 PM
To: Morten Sickel
Cc: r-sig-geo at stat.math.ethz.ch
Subject: Re: [R-sig-Geo] Select polygons
The "new style" way of doing this, using the classes of package sp, would be reading the shape with readOGR (in package rgdal), and then selecting by
nw2 = nw[nw$FTEMA>0, ]
--
Edzer
Morten Sickel wrote:
> I am reading in a shape file using read.shape() I would like to select some of the polygons in the shape file, depending on data in the att.data ... but for some (probably simple) reason, it doesn't work.
>
> having read the shape file into the object nw, I would believe that
>
> nw2=nw[nw$att.data$FTEMA>0,]
>
> would select those polygons with FTEMA>0 but it give sme the error "incorrect number of dimentions" removing the last , I think I get the selection I wants, but what it returns is no longer a map object...
>
> Any clues anywhere?
>
More information about the R-sig-Geo
mailing list