Description Usage Arguments Examples
To figure out the correct variable name for region, inspect
as.data.frame(model)
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## S3 method for class 'SpatialPolygonsDataFrame'
fortify(model, data, region = NULL,
...)
## S3 method for class 'SpatialPolygons'
fortify(model, data, ...)
## S3 method for class 'Polygons'
fortify(model, data, ...)
## S3 method for class 'Polygon'
fortify(model, data, ...)
## S3 method for class 'SpatialLinesDataFrame'
fortify(model, data, ...)
## S3 method for class 'Lines'
fortify(model, data, ...)
## S3 method for class 'Line'
fortify(model, data, ...)
|
model |
|
data |
not used by this method |
region |
name of variable used to split up regions |
... |
not used by this method |
1 2 3 4 5 6 | if (require("maptools")) {
sids <- system.file("shapes/sids.shp", package="maptools")
nc1 <- readShapePoly(sids,
proj4string = CRS("+proj=longlat +datum=NAD27"))
nc1_df <- fortify(nc1)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.