\HeaderA{SpatialPolygonsDataFrame-class}{Class "SpatialPolygonsDataFrame"}{SpatialPolygonsDataFrame.Rdash.class}
\aliasA{\$.SpatialPolygonsDataFrame}{SpatialPolygonsDataFrame-class}{.Rdol..SpatialPolygonsDataFrame}
\aliasA{\$<\Rdash.SpatialPolygonsDataFrame}{SpatialPolygonsDataFrame-class}{.Rdol.<.Rdash..SpatialPolygonsDataFrame}
\aliasA{as.data.frame.SpatialPolygonsDataFrame}{SpatialPolygonsDataFrame-class}{as.data.frame.SpatialPolygonsDataFrame}
\aliasA{coerce,SpatialPolygonsDataFrame,data.frame-method}{SpatialPolygonsDataFrame-class}{coerce,SpatialPolygonsDataFrame,data.frame.Rdash.method}
\aliasA{getPolygonAreaSlot}{SpatialPolygonsDataFrame-class}{getPolygonAreaSlot}
\aliasA{getPolygonCoordsSlot}{SpatialPolygonsDataFrame-class}{getPolygonCoordsSlot}
\aliasA{getPolygonHoleSlot}{SpatialPolygonsDataFrame-class}{getPolygonHoleSlot}
\aliasA{getPolygonLabptSlot}{SpatialPolygonsDataFrame-class}{getPolygonLabptSlot}
\aliasA{getPolygonsIDSlot}{SpatialPolygonsDataFrame-class}{getPolygonsIDSlot}
\aliasA{getPolygonsLabptSlot}{SpatialPolygonsDataFrame-class}{getPolygonsLabptSlot}
\aliasA{getPolygonsplotOrderSlot}{SpatialPolygonsDataFrame-class}{getPolygonsplotOrderSlot}
\aliasA{getPolygonsPolygonsSlot}{SpatialPolygonsDataFrame-class}{getPolygonsPolygonsSlot}
\aliasA{getSpPnParts}{SpatialPolygonsDataFrame-class}{getSpPnParts}
\aliasA{getSpPplotOrderSlot}{SpatialPolygonsDataFrame-class}{getSpPplotOrderSlot}
\aliasA{getSpPPolygonsIDSlots}{SpatialPolygonsDataFrame-class}{getSpPPolygonsIDSlots}
\aliasA{getSpPPolygonsLabptSlots}{SpatialPolygonsDataFrame-class}{getSpPPolygonsLabptSlots}
\aliasA{getSpPpolygonsSlot}{SpatialPolygonsDataFrame-class}{getSpPpolygonsSlot}
\aliasA{[,SpatialPolygonsDataFrame-method}{SpatialPolygonsDataFrame-class}{[,SpatialPolygonsDataFrame.Rdash.method}
\keyword{classes}{SpatialPolygonsDataFrame-class}
\begin{Description}\relax
class to hold polygons with attributes
\end{Description}
\begin{Section}{Objects from the Class}
Objects can be created by calls to the function \LinkA{SpatialPolygonsDataFrame}{SpatialPolygonsDataFrame}
\end{Section}
\begin{Section}{Slots}
\describe{
\item[\code{data}:] Object of class \code{"data.frame"}; attribute table 
\item[\code{polygons}:] Object of class \code{"list"}; see \LinkA{SpatialPolygons-class}{SpatialPolygons.Rdash.class} 
\item[\code{plotOrder}:] Object of class \code{"integer"}; see \LinkA{SpatialPolygons-class}{SpatialPolygons.Rdash.class} 
\item[\code{bbox}:] Object of class \code{"matrix"}; see \LinkA{Spatial-class}{Spatial.Rdash.class}
\item[\code{proj4string}:] Object of class \code{"CRS"}; see \LinkA{CRS-class}{CRS.Rdash.class}
}
\end{Section}
\begin{Section}{Extends}
Class \code{"SpatialPolygons"}, directly.
Class \code{"Spatial"}, by class \code{"SpatialPolygons"}.
\end{Section}
\begin{Section}{Methods}
No methods defined with class "SpatialPolygonsDataFrame" in the signature.
\end{Section}
\begin{Note}\relax
\code{SpatialPolygonsDataFrame} with default ID matching checks the data frame row names against the Polygons ID slots. They must then agree with each other, and be unique (no Polygons objects can share IDs); the data frame rows will be re-ordered if needed to match the Polygons IDs.
\end{Note}
\begin{Author}\relax
\end{Author}
\begin{References}\relax
\end{References}
\begin{SeeAlso}\relax
\LinkA{SpatialPolygons-class}{SpatialPolygons.Rdash.class}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
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)])
\end{ExampleCode}
\end{Examples}

