Learn R Programming

recmap (version 1.0.9)

as.SpatialPolygonsDataFrame.recmap: Convert a recmap Object to SpatialPolygonsDataFrame Object

Description

The method generates a SpatialPolygons object of a as input given recmap object. Both data.frames are merged by the index order.

Usage

# S3 method for recmap
as.SpatialPolygonsDataFrame(x, df = NULL, …)

Arguments

x

a recmap object.

df

a data.frame object. default is NULL.

...

Value

returns a SpatialPolygonsDataFrame

References

Roger S. Bivand, Edzer Pebesma, Virgilio Gomez-Rubio, 2013. Applied spatial data analysis with R, Second edition. Springer, NY. https://asdar-book.org/

See Also

Examples

Run this code
# NOT RUN {
  SpDf <- as.SpatialPolygonsDataFrame(recmap(checkerboard(8)))
  summary(SpDf)
  spplot(SpDf)
# }

Run the code above in your browser using DataLab