1% Generated by roxygen2: do not edit by hand 2% Please edit documentation in R/fortify-spatial.r 3\name{fortify.sp} 4\alias{fortify.sp} 5\alias{fortify.SpatialPolygonsDataFrame} 6\alias{fortify.SpatialPolygons} 7\alias{fortify.Polygons} 8\alias{fortify.Polygon} 9\alias{fortify.SpatialLinesDataFrame} 10\alias{fortify.Lines} 11\alias{fortify.Line} 12\title{Fortify method for classes from the sp package.} 13\usage{ 14\method{fortify}{SpatialPolygonsDataFrame}(model, data, region = NULL, ...) 15 16\method{fortify}{SpatialPolygons}(model, data, ...) 17 18\method{fortify}{Polygons}(model, data, ...) 19 20\method{fortify}{Polygon}(model, data, ...) 21 22\method{fortify}{SpatialLinesDataFrame}(model, data, ...) 23 24\method{fortify}{Lines}(model, data, ...) 25 26\method{fortify}{Line}(model, data, ...) 27} 28\arguments{ 29\item{model}{\code{SpatialPolygonsDataFrame} to convert into a dataframe.} 30 31\item{data}{not used by this method} 32 33\item{region}{name of variable used to split up regions} 34 35\item{...}{not used by this method} 36} 37\description{ 38To figure out the correct variable name for region, inspect 39\code{as.data.frame(model)}. 40} 41\examples{ 42if (require("maptools")) { 43 sids <- system.file("shapes/sids.shp", package="maptools") 44 nc1 <- readShapePoly(sids, 45 proj4string = CRS("+proj=longlat +datum=NAD27")) 46 nc1_df <- fortify(nc1) 47} 48} 49\keyword{internal} 50