(no subject)
Le 28 sept. 06 ? 15:06, Roger Bivand a ?crit :
By the way, why the load()?
The load is the system response when I click the R.data in the project directory
I think that this is the problem, and that you have an alternative local copy of plot that disturbs the method dispatch. If you say ls(), do the names of any of the objects begin with plot?
> ls(pat="plot") [1] "BBplot" "Bplot" "draw.plotmath.cell" [4] "plot" "plotG" "plotM" [7] "plotx" "plotxx" plotx, plotxx, plotG and plotM are functions of mine. Is there a problem ?
Could you now try plot(xx, axes=TRUE), and then traceback() immediately after the error occurs?
plot(xx,axes=TRUE)
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?
traceback()
4: plot.window(...) 3: localWindow(xlim, ylim, log, asp, ...) 2: plot.default(xx, axes = TRUE) 1: plot(xx, axes = TRUE)
This is where it is going wrong. If you do: is(xx)
> is(xx) [1] "SpatialPolygonsDataFrame" "SpatialPolygons" [3] "Spatial" seems to be good
you should see: [1] "SpatialPolygonsDataFrame" "SpatialPolygons" [3] "Spatial" and method dispatch should choose plot.SpatialPolygons - can you try plot.SpatialPolygons(xx, axes=TRUE) directly.
sp:::plot.SpatialPolygons(xx, axes=TRUE) give a map which seems to be good one !!! (but I had removed the plot* as below before this instruction)
I'm fairly certain that the method dispatch of plot is getting interfered with, since the class of xx is OK.
Jacques Vernin