Hello,

I am trying to plot the map of NC and using a color scheme. I have done that
using spplot().

Here is a code (reference: Introduction to the North Carolina SIDS data
set (revised), Roger Bivand, April 12, 2011)

library(sp)
library(maptools)
library(spdep)
nc_file <- system.file("etc/shapes/sids.shp", package = "spdep")[1]
llCRS <- CRS("+proj=longlat +datum=NAD27")
nc <- readShapeSpatial(nc_file, ID = "FIPSNO", proj4string = llCRS)

nc$both <- factor(paste(nc$L_id, nc$M_id, sep = ":"))
nboth <- length(table(unclass(nc$both)))
spplot(nc, "both", col.regions = sample(rainbow(nboth)))

Now I want to have the county index (CRESS_ID in nc) for each county,
plotted on the same map. I have not been able to figure out how to do it :(

Any help/suggestion will be greatly appreciated.

Thanks.

-Aritra

	[[alternative HTML version deleted]]

