gstat-info  

Re: R and plot.variogram

Edzer J. Pebesma
Mon, 15 Mar 2004 00:00:03 -0800

Willem, could you retry the commands under the
current version of R, 1.8.1?
--
Edzer

Willem Vervoort wrote:

Hi all
I am using R 1.8.0 under Windows XP
I have installed gstat from CRAN
I am having problem ploting the variograms

vgm1<-variogram(clay~x+y, loc=~x+y, PC.spdata,witdh=cutoff/50)



tmp<-fit.variogram(vgm1,vgm(1,"Sph",300,1),print.SSE=TRUE)



[1] "SSErr: 31366.3780209903"


All this works

plot.variogram(vgm1,model=vgm(1,"Sph",300,1))



Error in if (x$output.type == "bin") Ldots$type <- "p" : argument is of length zero

In addition: Warning message:
no finite arguments to max; returning -Inf

?plot.variogram



The help text is there!


plot.variogram(vgm1)



Error in if (x$output.type == "bin") Ldots$type <- "p" : argument is of length zero

In addition: Warning message:
no finite arguments to max; returning -Inf

Not good, I seem to think it has to do with me. Am I getting the class of my data right? The data is pretty simple:

PC.spdata[1:10,]



x y clay sand fsand EC McN Tikh


1 0 0.5 49.49 34.19 28.27 266 198.3690 126.33059

2 0 1.5 47.65 28.75 25.06 911 288.6718 124.15259

3 0 2.5 56.88 26.41 18.78 1251 315.1554 121.83433

4 0 3.5 61.94 25.00 16.33 1140 302.2132 119.25082

5 0 4.5 65.02 21.75 12.62 1188 273.8793 116.30404

6 0 5.5 59.79 24.61 13.97 1112 244.8895 112.92241

7 0 6.5 61.01 21.72 12.38 1046 220.6816 109.05847

8 0 7.5 43.58 52.30 8.54 725 206.2891 104.68629

9 0 8.5 51.16 47.36 7.38 713 206.7454 99.79917

10 50 0.5 48.10 33.34 27.96 253 157.0218 102.49656

This is a data.frame. ?spatial.data.frame gives error

Any clues would be appreciated

Regards
Willem Vervoort