We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0338cdb commit 1e1e9f0Copy full SHA for 1e1e9f0
R/rbind.R
@@ -12,13 +12,17 @@ rbind.SpatialPoints <- function(...) {
12
dots = list(...)
13
names(dots) <- NULL
14
stopifnot(identicalCRS(dots))
15
+ dropRowNames = is.null(dimnames(dots[[1]]@coords)[[1]]) # or check each of them?
16
coordinates.strip = function(x) {
17
x = coordinates(x)
18
row.names(x) = NULL
19
x
20
}
- SpatialPoints(do.call(rbind, lapply(dots, coordinates.strip)),
21
+ ret = SpatialPoints(do.call(rbind, lapply(dots, coordinates.strip)),
22
CRS(proj4string(dots[[1]])))
23
+ if (!dropRowNames)
24
+ row.names(ret) = make.unique(do.call(c, lapply(dots, row.names)))
25
+ ret
26
27
28
rbind.SpatialPointsDataFrame <- function(...) {
0 commit comments