[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: R and plot.variogram
Ashton Shortridge wrote:
Willem, Edzer, and Gstat list,
I'm teaching a class that uses R in the lab and was hammered by the
plot.variogram() problem two weeks ago; it was especially nasty since
plotting worked fine on my machine but not in the lab, and I had been too
lazy to test my homework code in the lab.
While plot.variogram failed, I was able to work around the problem by simply
using plot(). R to the rescue - it appears that plot() is smart enough to
recognize the gstat variogram object and plots it properly - it worked on
omnidirectional, directional, and variogram model objects. An advantage is
that you do not need to de- and re- attach geoR or other libraries, and I
assume you could also print their objects.
One issue is geoR and gstat both having a plot.variogram, another is that in
recent gstat/R versions, plot.variogram is invisible, because it's in a
It should be listed when asked by methods("plot"), you get the function by
gstat:::plot.variogram . Well, the whole idea of S has always been that
Y of class X are plotted with plot(Y), not by plot.X(Y); the original
idea of S
object orientation, that is.