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"
I read Rnews_2005-2.pdf and I can't do the test. For instance, on page 10: maptools and sp are active,
> 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))
Erreur dans plot.window(xlim, ylim, log, asp, ...) : 'xlim' n?cessite des valeurs finies De plus : Warning messages: 1: aucun argument trouv? pour min ; Inf est renvoy? 2: aucun argument pour max ; -Inf est renvoy? 3: aucun argument trouv? pour min ; Inf est renvoy? 4: aucun argument pour max ; -Inf est renvoy? How t resolve these problems ? Thanks JV ==============