Skip to content
Back to formatted view

Raw Message

Message-ID: <alpine.LRH.2.00.1005201450010.28208@reclus.nhh.no>
Date: 2010-05-20T12:50:20Z
From: Roger Bivand
Subject: check all IDs of a spatialPolygons object
In-Reply-To: <AANLkTin5wYf0c99wZiZfnbFnO6PH1x-hjIBdwRF0Cnw0@mail.gmail.com>

On Thu, 20 May 2010, Agustin Lobo wrote:

> Is there a cleaner way to check all IDs of a spatialPolygons object?
> I know how to do it with one:
> > slot(spol at polygons[[2]],"ID")
> [1] "g2"
>
> and for all of them I use
>> sapply(spol at polygons,slot,"ID")
>
> is there something more straightforward, sort of spFIDs() (by analogy
> to spChFIDs() )?

row.names(spol), OK?

Roger

>
> Thanks
>
> Agus
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no