[R-sig-Geo] Select polygons
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Fri Jul 4 16:51:28 CEST 2008
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?
>
> --
> Morten Sickel
> Norwegian Radiation Protection Authority
> tel (+47) 6716 2551
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Edzer Pebesma
Institute for Geoinformatics (IfGI)
University of Münster
http://ifgi.uni-muenster.de/
More information about the R-sig-Geo
mailing list