[R-sig-Geo] rbind and spRbind
Danlin Yu
yud at mail.montclair.edu
Sat Jul 26 20:55:02 CEST 2008
Agustin:
Since you are using the sp method for binding, I suppose the coordinates
(in UTM project according to the name) are added automatically (as the
added two new names are UTMX and UTMY). Why not check these two values
to see what's in them.
Hope this helps.
Danlin
Agustin Lobo wrote:
> 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
--
___________________________________________
Danlin Yu, Ph.D.
Assistant Professor
Department of Earth & Environmental Studies
Montclair State University
Montclair, NJ, 07043
Tel: 973-655-4313
Fax: 973-655-4072
email: yud at mail.montclair.edu
webpage: csam.montclair.edu/~yu
More information about the R-sig-Geo
mailing list