[R-sig-Geo] rbind and spRbind

Agustin Lobo aloboaleu at gmail.com
Sat Jul 26 18:48:24 CEST 2008


I'm a bit confused with the following:

I have a SPDF object ika1v4

 > dim(ika1v4geo at data)
[1] 693  23
 > dim(ika1v4geo)
[1] 693  23

Then I do an rbind:

 > a <- rbind(ika1v4geo,ika1v4geo)
 > dim(a)
[1] 1386   23
 > dim(a at data)
[1] 1386   23

But spRbind introduces 2 variables:
 > a2 <- spRbind(ika1v4geo,ika1v4geo)
 > dim(a2)
[1] 1386   25
 > dim(a2 at data)
[1] 1386   25

 > names(a at data)
  [1] "IKAPUNTO" "IKAID"    "CN"       "dia"      "hora_obs" "GPSID"
  [7] "GPS"      "N_PUNTO"  "GUIA"     "MONITOR"  "COD_SP_C" "SP_C"
[13] "COD_OBS"  "OBS"      "N"        "VULN"     "VULNT"    "CL"
[19] "A"        "H"        "D"        "S"        "V"
 > names(a2 at data)
  [1] "IKAPUNTO" "IKAID"    "CN"       "dia"      "hora_obs" "GPSID"
  [7] "GPS"      "UTMX"     "UTMY"     "N_PUNTO"  "GUIA"     "MONITOR"
[13] "COD_SP_C" "SP_C"     "COD_OBS"  "OBS"      "N"        "VULN"
[19] "VULNT"    "CL"       "A"        "H"        "D"        "S"
[25] "V"
 >

Why? Which are the differences between rbind and spRbind?

Thanks!

Agus
-- 
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster




More information about the R-sig-Geo mailing list