### Name: SpatialPolygonsDataFrame-class
### Title: Class "SpatialPolygonsDataFrame"
### Aliases: SpatialPolygonsDataFrame-class
###   [,SpatialPolygonsDataFrame-method $.SpatialPolygonsDataFrame
###   $<-.SpatialPolygonsDataFrame as.data.frame.SpatialPolygonsDataFrame
###   coerce,SpatialPolygonsDataFrame,data.frame-method
###   getSpPPolygonsIDSlots getSpPPolygonsLabptSlots getSpPnParts
###   getSpPplotOrderSlot getSpPpolygonsSlot getPolygonAreaSlot
###   getPolygonCoordsSlot getPolygonLabptSlot getPolygonHoleSlot
###   getPolygonsIDSlot getPolygonsLabptSlot getPolygonsPolygonsSlot
###   getPolygonsplotOrderSlot
### Keywords: classes

### ** Examples

data(ncshp)
nc1 <- as.SpatialPolygons.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), getSpPPolygonsIDSlots(nc1))
ncSpPDF <- SpatialPolygonsDataFrame(nc1, df)
names(as(ncSpPDF, "data.frame"))
identical(rownames(as(ncSpPDF, "data.frame")), getSpPPolygonsIDSlots(ncSpPDF))
rrt <- as(ncSpPDF, "data.frame")$SID74/as(ncSpPDF, "data.frame")$BIR74
brks <- quantile(rrt, seq(0,1,1/7))
cols <- grey((length(brks):2)/length(brks))
dens <- (2:length(brks))*3
plot.SpatialPolygons(ncSpPDF, col=cols[findInterval(rrt, brks, all.inside=TRUE)])
plot.SpatialPolygons(ncSpPDF, density=dens[findInterval(rrt, brks, all.inside=TRUE)])



