| SpatialRingsDataFrame-class {sp} | R Documentation |
class to hold polygons with attributes
Objects can be created by calls to the function SpatialRingsDataFrame
data:"data.frame"; attribute table polygons:"list"; see SpatialRings-class plotOrder:"integer"; see SpatialRings-class bbox:"matrix"; see Spatial-classproj4string:"CRS"; see CRS-class
Class "SpatialRings", directly.
Class "Spatial", by class "SpatialRings".
No methods defined with class "SpatialRingsDataFrame" in the signature.
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)])