sp_tidiers: tidying methods for classes from the sp package.
Description
Tidy classes from the sp package to allow them to be plotted using ggplot2.
To figure out the correct variable name for region, inspect
as.data.frame(x).
Usage
## S3 method for class 'SpatialPolygonsDataFrame':
tidy(x, region = NULL, ...)
## S3 method for class 'SpatialPolygons':
tidy(x, ...)
## S3 method for class 'Polygons':
tidy(x, ...)
## S3 method for class 'Polygon':
tidy(x, ...)
## S3 method for class 'SpatialLinesDataFrame':
tidy(x, ...)
## S3 method for class 'Lines':
tidy(x, ...)
## S3 method for class 'Line':
tidy(x, ...)
Arguments
x
SpatialPolygonsDataFrame to convert into a dataframe.
region
name of variable used to split up regions
...
not used by this method
Details
These functions originated in the ggplot2 package as "fortify" functions.