rings                   package:sp                   R Documentation

_s_e_t_s _s_p_a_t_i_a_l _c_o_o_r_d_i_n_a_t_e_s _t_o _c_r_e_a_t_e _s_p_a_t_i_a_l _d_a_t_a, _o_r _r_e_t_r_i_e_v_e_s
_s_p_a_t_i_a_l _c_o_o_r_d_i_n_a_t_e_s

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

     sets spatial coordinates to create spatial data, or retrieves
     spatial coordinates

_U_s_a_g_e:

             rings(obj)
             rings(object) <- value

_A_r_g_u_m_e_n_t_s:

     obj: object of class "SpatialRingsDataFrame" 

  object: object of class "data.frame" 

   value: object of class "SpatialRings" 

_V_a_l_u_e:

     rings returns the SpatiaRings of obj; rings<- promotes a
     data.frame to a SpatialRingsDataFrame object

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

     data(ncshp)
     nc1 <- as.SpatialRings.Shapes(nc.shp$Shapes, as.character(nc.shp$att.data$FIPS))
     df <- nc.shp$att.data
     rownames(df) <- df$FIPS
     rings(df) <- nc1
     class(df)

