Skip to content
Prev 22051 / 29559 Next

How to delete some polygons from 'SpatialPolygonsDataFrame'

Hi Roger,

You are right, it is polygon 1:12 making the remote islands.
Thanks for a very detailed example.
It worked after I tried your method on my shapefile.

I actually used ggplot() after fortify() the data in the first place. The
remote islands were easily deleted from the dataframe. However, as you
illustrated, if I want to plot the neighbour structure, it is such a mess,
and interaction with ggplot is yet unknown to me.

Thanks and Regards

Fred ?
On Fri, Nov 28, 2014 at 9:38 PM, Roger Bivand <Roger.Bivand at nhh.no> wrote:

            

  
  
Message-ID: <CAOMGRDJCj3Z1q2JJP0HqC29Q3EgHtJSCceE-gV35SKj0a3Okkw@mail.gmail.com>
In-Reply-To: <alpine.LRH.2.03.1411281051330.4437@reclus.nhh.no>