ggmapmerge {eeptools}R Documentation

A depcrecated method for fortifying SpatialPolygonsDataFrames for plotting

Description

Convenience function for fortifying SpatialPolygonsDataFrames for ggplot2 plotting.

Usage

ggmapmerge(mapobj, xid)

Arguments

mapobj

Name of an S4 SpatialPolygonsDataFrame

xid

Name of ID variable in the SpatialPolygonsDataFrame

Details

This function requires maptools to be loaded and gpclibPermit to be TRUE. This is because it depends on the fortify method in ggplot2.

Value

An S3 dataframe suitable for using in a gggplot2 map

Examples

## Not run: 
xx <- maptools::readShapePoly(system.file("shapes/sids.shp", package="maptools")[1], IDvar="FIPSNO")
plotobj <- ggmapmerge(xx,"FIPS")

## End(Not run)

[Package eeptools version 1.2.4 Index]