SpatialRingsDataFrame-class {sp}R Documentation

Class "SpatialRingsDataFrame"

Description

class to hold polygons with attributes

Objects from the Class

Objects can be created by calls to the function SpatialRingsDataFrame

Slots

data:
Object of class "data.frame"; attribute table
polygons:
Object of class "list"; see SpatialRings-class
plotOrder:
Object of class "integer"; see SpatialRings-class
bbox:
Object of class "matrix"; see Spatial-class
proj4string:
Object of class "CRS"; see CRS-class

Extends

Class "SpatialRings", directly. Class "Spatial", by class "SpatialRings".

Methods

No methods defined with class "SpatialRingsDataFrame" in the signature.

Note

Author(s)

References

See Also

SpatialRings-class

Examples

data(ncshp)
nc1 <- as.SpatialRings.Shapes(nc.shp$Shapes, as.character(nc.shp$att.data$FIPS))
df <- nc.shp$att.data
rownames(df) <- as.character(nc.shp$att.data$FIPS)
identical(rownames(df), getSRSringsIDSlots(nc1))
ncSRDF <- SpatialRingsDataFrame(nc1, df)
names(as(ncSRDF, "data.frame"))
rrt <- as(ncSRDF, "data.frame")$SID74/as(ncSRDF, "data.frame")$BIR74
brks <- quantile(rrt, seq(0,1,1/7))
cols <- grey((length(brks):2)/length(brks))
dens <- (2:length(brks))*3
plot.SpatialRings(ncSRDF, col=cols[findInterval(rrt, brks, all.inside=TRUE)])
plot.SpatialRings(ncSRDF, density=dens[findInterval(rrt, brks, all.inside=TRUE)])

[Package sp version 0.7-7 Index]