[R-sig-Geo] nc in Rnews_2005-2.pdf

Michael Sumner mdsumner at utas.edu.au
Thu Sep 28 09:17:31 CEST 2006


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
> ==============




More information about the R-sig-Geo mailing list