spCbind-methods

0th

Percentile

cbind for spatial objects

spCbind provides cbind-like methods for Spatial*DataFrame objects in addition to the $, [<- and [[<- methods already available.

Keywords
methods, spatial
See Also

spChFIDs-methods, spRbind-methods

Aliases
  • spCbind-methods
  • spCbind,SpatialPointsDataFrame,data.frame-method
  • spCbind,SpatialPointsDataFrame,vector-method
  • spCbind,SpatialLinesDataFrame,data.frame-method
  • spCbind,SpatialLinesDataFrame,vector-method
  • spCbind,SpatialPolygonsDataFrame,data.frame-method
  • spCbind,SpatialPolygonsDataFrame,vector-method
  • spCbind
Examples
xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1], 
  IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
xtra <- read.dbf(system.file("share/nc_xtra.dbf", package="maptools")[1])
o <- match(xx$CNTY_ID, xtra$CNTY_ID)
xtra1 <- xtra[o,]
row.names(xtra1) <- xx$FIPSNO
xx1 <- spCbind(xx, xtra1)
names(xx1)
identical(xx1$CNTY_ID, xx1$CNTY_ID.1)
Documentation reproduced from package maptools, version 0.8-20, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.