[R-sig-Geo] "Abridged" description of SpatialPolygonsDataFrame objects?
Agustin Lobo
Agustin.Lobo at ija.csic.es
Tue Oct 30 19:38:39 CET 2007
The problem is that, in such a way, the user
does not get a list (and description) of
slots data, proj4string etc.
According to mail exchanged with Roger,
a good way to start would be:
getSlots(class(d))
and then, as you say,
str(d at polygons[[1]])
Agus
Michael Sumner escribió:
> If "d" is a SPolyDF
>
> ## first row/object
> d[1,]
> str(d[1,])
>
> ## the first Polygons object itself (Polygons can be of many)
> d at polygons[[1]]
> str(d at polygons[[1]])
>
> ## the first Polygon in the first Polygons object
> d at polygons[[1]]@Polygons[[1]]
> str(d at polygons[[1]]@Polygons[[1]])
>
>
>
> Agustin Lobo wrote:
>> Hi!
>>
>> If I do str(a) where a is a SpatialGridDataFrame, I get
>> a description of the structure that is readable,
>> but for SpatialPolygonsDataFrame the output of str() is
>> too long. Is there any way of looking at the
>> structure of a SpatialPolygonsDataFrame object just down to
>> a certain level? For example, not getting the structure of the
>> each polygon but getting the first one only.
>>
>> Thanks
>> Agus
>>
>
>
--
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster
More information about the R-sig-Geo
mailing list