clone_data: Clone data from a SpatialPolygonsDataFrame

Description Usage Arguments Value Examples

Description

Populate a transformed SpatialPolygons object with data from a SpatialPolygonsDataFrame with an identical set of IDs

Usage

1
2
clone_data(sp,spdf)
sp %>% clone_data(spdf)

Arguments

sp

a SpatialPolygons object

spdf

a SpatialPolygonsDataFrame object with matching IDs

Value

a SpatialPolygonsDataFrame object with polygons from sp and data from spdf.

Examples

1
2
3
4
5
data(RA)
RA.spdf %>% small_chop -> RA.sp
class(RA.sp)
RA.sp %>% clone_data(RA.spdf) -> RA.sp2
RA.sp2 %>% data.frame %>% head

chrisbrunsdon/caricRture documentation built on May 13, 2019, 6:52 p.m.