Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

spRbind-methods

rbind for spatial objects


Description

spRbind provides rbind-like methods for Spatial*DataFrame objects

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

Note

In addition to the spRbind-methods, there are also rbind-methods for Spatial* objects. The differences are:

  1. spRbind-methods can bind 2 objects, whereas rbind-methods can bind multiple object

  2. some rbind can accept objects with duplicated IDs, for all spRbind-methods these have to be modified explicitly, e.g. by calling spChFIDs-methods

Author(s)

Roger Bivand

See Also

Examples

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

maptools

Tools for Handling Spatial Objects

v1.1-1
GPL (>= 2)
Authors
Roger Bivand [cre, aut] (<https://orcid.org/0000-0003-2392-6140>), Nicholas Lewin-Koh [aut], Edzer Pebesma [ctb], Eric Archer [ctb], Adrian Baddeley [ctb], Nick Bearman [ctb], Hans-Jörg Bibiko [ctb], Steven Brey [ctb], Jonathan Callahan [ctb], German Carrillo [ctb], Stéphane Dray [ctb], David Forrest [ctb], Michael Friendly [ctb], Patrick Giraudoux [ctb], Duncan Golicher [ctb], Virgilio Gómez Rubio [ctb], Patrick Hausmann [ctb], Karl Ove Hufthammer [ctb], Thomas Jagger [ctb], Kent Johnson [ctb], Matthew Lewis [ctb] (<https://orcid.org/0000-0003-2244-4078>), Sebastian Luque [ctb], Don MacQueen [ctb], Andrew Niccolai [ctb], Edzer Pebesma [ctb], Oscar Perpiñán Lamigueiro [ctb], Ethan Plunkett [ctb], Ege Rubak [ctb] (<https://orcid.org/0000-0002-6675-533X>), Tom Short [ctb], Greg Snow [ctb], Ben Stabler [ctb], Murray Stokely [ctb], Rolf Turner [ctb]
Initial release
2021-03-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.