Learn R Programming

maptools (version 1.1-8)

spRbind-methods: rbind for spatial objects

Description

spRbind provides rbind-like methods for Spatial*DataFrame objects

Arguments

Methods

obj = "SpatialPoints", x = "SpatialPoints"

rbind two SpatialPoints objects

obj = "SpatialPointsDataFrame", x = "SpatialPointsDataFrame"

rbind two SpatialPointsDataFrame objects

obj = "SpatialLines", x = "SpatialLines"

rbind two SpatialLines objects

obj = "SpatialLinesDataFrame", x = "SpatialLinesDataFrame"

rbind two SpatialLinesDataFrame objects

obj = "SpatialPolygons", x = "SpatialPolygons"

rbind two SpatialPolygons objects

obj = "SpatialPolygonsDataFrame", x = "SpatialPolygonsDataFrame"

rbind two SpatialPolygonsDataFrame objects

Author

Roger Bivand

See Also

spChFIDs-methods, spCbind-methods

Examples

Run this code
xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1], 
  IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
summary(xx)
xx$FIPSNO
xx1 <- xx[xx$CNTY_ID < 1982,]
xx2 <- xx[xx$CNTY_ID >= 1982,]
xx3 <- spRbind(xx2, xx1)
summary(xx3)
xx3$FIPSNO

Run the code above in your browser using DataLab