gstat-info  

Re: R and plot.variogram

Edzer J. Pebesma
Mon, 15 Mar 2004 02:47:44 -0800



willem vervoort wrote:

Dear Edzer and Henny
A few more clues, and found the solution. Sorry to have wasted your time Edzer. For all you newbies on R and myself.
I did:
> detach("package:geoR")
> plot.variogram(vgm1,model=vgm(1,"Sph",300,1))
Error: couldn't find function "plot.variogram"
# ???????????? I am lost here
> ?plot.variogram
# This brings up the help file for plot.variogram from gstat
> plot(vgm1,model=vgm(1,"Sph",300,1))
# That works (I might almost say of course, I can hear Edzer laugh in the background)

No, on the contrary. The issue that at least three different variogram classes
exists in R (geoR, gstat, nlme), two sharing exactly the same name (geoR
and gstat) is frustrating, and I feel ashamed that I even didn't recognize
it. Who to learn from? Other frustrated users, luckily. We package
maintainers seem to live in our own package, despite the fact that
we meet eachother.


The issue is that package names are taken, at some stage, but
not class or function names; and plotting functions tend to be
named plot.class.

The solution is easy: either of the package maintainers renames
its class, possibly introducing some problems for other users
having "old" variograms lying around.  I'll do it -- Paulo
was there before I was.


Sorry to have wasted your time

Not at all -- thanks for the help. -- Edzer