spCbind-methods           package:maptools           R Documentation

_c_b_i_n_d _f_o_r _s_p_a_t_i_a_l _o_b_j_e_c_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     'spCbind' provides cbind-like methods for Spatial*DataFrame
     objects in addition to the '$', '[<-' and '[[<-' methods already
     available.

_M_e_t_h_o_d_s:



     _o_b_j = "_S_p_a_t_i_a_l_P_o_i_n_t_s_D_a_t_a_F_r_a_m_e", _x = "_d_a_t_a._f_r_a_m_e" cbind a data
          frame to the data slot of a SpatialPointsDataFrame object

     _o_b_j = "_S_p_a_t_i_a_l_P_o_i_n_t_s_D_a_t_a_F_r_a_m_e", _x = "_v_e_c_t_o_r" cbind a vector to the
          data slot of a SpatialPointsDataFrame object

     _o_b_j = "_S_p_a_t_i_a_l_L_i_n_e_s_D_a_t_a_F_r_a_m_e", _x = "_d_a_t_a._f_r_a_m_e" cbind a data frame
          to the data slot of a SpatialLinesDataFrame object; the data
          frame argument must have row names set to the Lines ID
          values, and should be re-ordered first by matching against a
          shared key column

     _o_b_j = "_S_p_a_t_i_a_l_L_i_n_e_s_D_a_t_a_F_r_a_m_e", _x = "_v_e_c_t_o_r" cbind a vector to the
          data slot of a SpatialLinesDataFrame object

     _o_b_j = "_S_p_a_t_i_a_l_P_o_l_y_g_o_n_s_D_a_t_a_F_r_a_m_e", _x = "_d_a_t_a._f_r_a_m_e" cbind a data
          frame to the data slot of a SpatialPolygonsDataFrame object;
          the data frame argument must have row names set to the
          Polygons ID values, and should be re-ordered first by
          matching against a shared key column

     _o_b_j = "_S_p_a_t_i_a_l_P_o_l_y_g_o_n_s_D_a_t_a_F_r_a_m_e", _x = "_v_e_c_t_o_r" cbind a vector to
          the data slot of a SpatialPolygonsDataFrame object

_A_u_t_h_o_r(_s):

     Roger Bivand

_S_e_e _A_l_s_o:

     'spChFIDs-methods', 'spRbind-methods'

_E_x_a_m_p_l_e_s:

     xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1], 
       IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
     xtra <- read.dbf(system.file("share/nc_xtra.dbf", package="maptools")[1])
     o <- match(xx$CNTY_ID, xtra$CNTY_ID)
     xtra1 <- xtra[o,]
     row.names(xtra1) <- xx$FIPSNO
     xx1 <- spCbind(xx, xtra1)
     names(xx1)
     identical(xx1$CNTY_ID, xx1$CNTY_ID.1)

