fortify.sp

0th

Percentile

Fortify method for classes from the sp package.

To figure out the correct variable name for region, inspect as.data.frame(model).

Keywords
internal
Usage
"fortify"(model, data, region = NULL, ...)
"fortify"(model, data, ...)
"fortify"(model, data, ...)
"fortify"(model, data, ...)
"fortify"(model, data, ...)
"fortify"(model, data, ...)
"fortify"(model, data, ...)
Arguments
model
SpatialPolygonsDataFrame to convert into a dataframe.
data
not used by this method
region
name of variable used to split up regions
...
not used by this method
Aliases
  • fortify.sp
  • fortify.SpatialPolygonsDataFrame
  • fortify.SpatialPolygons
  • fortify.Polygons
  • fortify.Polygon
  • fortify.SpatialLinesDataFrame
  • fortify.Lines
  • fortify.Line
Examples
library(ggplot2) if (require("maptools")) { sids <- system.file("shapes/sids.shp", package="maptools") nc1 <- readShapePoly(sids, proj4string = CRS("+proj=longlat +datum=NAD27")) nc1_df <- fortify(nc1) }
Documentation reproduced from package ggplot2, version 2.2.1, License: GPL-2 | file LICENSE

Community examples

Looks like there are no examples yet.