Skip to content
Prev 3930 / 29559 Next

rbind and spRbind

Acceptable, yes, but perhaps we should choose
one or the other and, for sure, document the difference
between spRbind and rbind.
Personally, I find a bit odd spRbind() in that you get 2
variables that you were not seeing in data slot (I understand
they are there as coordinates) of the original
objects. This is not " rbind-like". But perhaps
there are advantages that I'm not considering.
Just wanted to point this out and make sure
there were not other consequences at choosing
between both functions.

Also, sorry for not having included this info:

 > str(ika1v4geo)
Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
   ..@ data       :'data.frame':	693 obs. of  23 variables:
   .. ..$ IKAPUNTO: int [1:693] 1 2 3 4 5 6 7 8 9 10 ...
   .. ..$ IKAID   : num [1:693] 1 1 1 1 1 1 1 1 1 1 ...
   .. ..$ CN      : chr [1:693] "Ivasichi" "Ivasichi" "Ivasichi" 
"Ivasichi" ...
   .. ..$ dia     : chr [1:693] "2008-01-30" "2008-01-30" "2008-01-30" 
"2008-01-30" ...
   .. ..$ hora_obs: chr [1:693] " 8:48:21" " 8:55:17" " 9:00:22" " 
9:07:13" ...
   .. ..$ GPSID   : chr [1:693] "1-20080328-115" "1-20080328-116" 
"1-20080328-117" "1-20080328-118" ...
   .. ..$ GPS     : int [1:693] 1 1 1 1 1 1 1 1 1 1 ...
   .. ..$ N_PUNTO : int [1:693] 115 116 117 118 119 120 122 123 124 125 ...
   .. ..$ GUIA    : chr [1:693] "Endracio" "Endracio" "Endracio" 
"Endracio" ...
   .. ..$ MONITOR : chr [1:693] "Julio Vie" "Julio Vie" "Julio Vie" 
"Julio Vie" ...
   .. ..$ COD_SP_C: int [1:693] 29 9 10 29 8 8 28 8 28 29 ...
   .. ..$ SP_C    : chr [1:693] "tatu" "jochi colorado" "jochi pintado" 
"tatu" ...
   .. ..$ COD_OBS : int [1:693] 5 5 5 5 6 6 6 7 6 8 ...
   .. ..$ OBS     : chr [1:693] "huella" "huella" "huella" "huella" ...
   .. ..$ N       : num [1:693] 1 1 1 1 1 1 1 1 1 1 ...
   .. ..$ VULN    : int [1:693] 1 1 NA 1 3 3 NA 3 NA 1 ...
   .. ..$ VULNT   : num [1:693] 1 1 NA 1 3 3 NA 3 NA 1 ...
   .. ..$ CL      : num [1:693] 1 1 1 1 1 1 1 1 1 1 ...
   .. ..$ A       : num [1:693] 8 8 8 8 8 8 8 8 8 8 ...
   .. ..$ H       : num [1:693] 1.91 1.91 1.91 1.91 1.91 ...
   .. ..$ D       : num [1:693] 0.719 0.719 0.719 0.719 0.719 ...
   .. ..$ S       : num [1:693] 4 4 4 4 4 4 4 4 4 4 ...
   .. ..$ V       : num [1:693] 34 34 34 34 34 34 34 34 34 34 ...
   ..@ coords.nrs : int [1:2] 8 9
   ..@ coords     : num [1:693, 1:2] 724547 724413 724367 724282 724225 ...
   .. ..- attr(*, "dimnames")=List of 2
   .. .. ..$ : NULL
   .. .. ..$ : chr [1:2] "UTMX" "UTMY"
   ..@ bbox       : num [1:2, 1:2]  716934 8303862  735638 8325272
   .. ..- attr(*, "dimnames")=List of 2
   .. .. ..$ : chr [1:2] "UTMX" "UTMY"
   .. .. ..$ : chr [1:2] "min" "max"
   ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slots
   .. .. ..@ projargs: chr NA

Thanks!

Agus
Roger Bivand wrote: