Skip to content
Prev 1340 / 29559 Next

nc in Rnews_2005-2.pdf

This works for me.  Perhaps you don't have 'sp' loaded?  What does 
sessionInfo() show?

Cheers, Mike.

 library(maptools)

 fname = system.file("shapes/sids.shp",  package="maptools")
 p4s = CRS("+proj=longlat +datum=NAD27")
  nc = readShapePoly(fname, proj4string=p4s)
   plot(nc, axes = TRUE, col=grey(1-nc$SID79/57))
 detach(package:maptools)

   plot(nc, axes = TRUE, col=grey(1-nc$SID79/57))

sessionInfo()

Version 2.3.1 (2006-06-01)
i386-pc-mingw32

attached base packages:
[1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"
[7] "base"    

other attached packages:
maptools       sp  foreign
"0.5-12" "0.8-16" "0.8-15"