fuse_data: Fuse data from to Spatial object

Description Usage Arguments Value Examples

Description

Populate a transformed SpatialPolygons object with data from a matrix or array with a set of names or rownames matching the SpatialPolygons object IDs

Usage

1
2
fuse_data(sp,v)
sp %>% fuse_data(v)

Arguments

sp

a SpatialPolygons object

v

a variables whose names or rownames match thev IDs for sp

Value

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

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.