ncmap                   package:sp                   R Documentation

_N_o_r_t_h _C_a_r_o_l_i_n_a _c_o_u_n_t_y _b_o_u_n_d_a_r_i_e_s (_m_a_p_s)

_D_e_s_c_r_i_p_t_i_o_n:

     North Carolina county boundaries in maps package format

_U_s_a_g_e:

     data(ncmap)

_F_o_r_m_a_t:

     The format is: List of 4 $ x    : num [1:3771] -79.5 -79.5 -79.5
     -79.5 -79.5 ... $ y    : num [1:3771] 35.8 35.9 35.9 36.0 36.2 ...
     $ range: num [1:4] -84.3 -75.5  33.9  36.6 $ names: chr [1:102]
     "north carolina,alamance" "north carolina,alexander" ... - attr(*,
     "class")= chr "map"

_E_x_a_m_p_l_e_s:

     ## Not run: 
     library(maps)
     ncmap <- map("county", "north carolina", fill=TRUE, col="transparent", plot=FALSE)
     ## End(Not run)
     data(ncmap)
     IDs <- sapply(strsplit(ncmap$names, ","), function(x) x[2])
     nc2 <- as.SpatialPolygons.map(ncmap, IDs)
     plotSpatialPolygons(nc2)
     invisible(text(getSpPPolygonsLabptSlots(nc2), labels=getSpPPolygonsIDSlots(nc2), cex=0.6))

