[R-sig-Geo] check all IDs of a spatialPolygons object

Roger Bivand Roger.Bivand at nhh.no
Thu May 20 14:50:20 CEST 2010


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



More information about the R-sig-Geo mailing list