Dear List,

In the hopes that someone may know why, I will describe an error I get from
fit.variogram when reading a variogram from a file.

When I create a gstatVariogram object in a given R session, I can use
fit.variogram upon it just fine via:
> temp.vgm <- variogram(z~x.coord+y.coord, temp.frame, cressie=T)
> temp.fit <- fit.variogram(temp.vgm,v.model,fit.method=1)
>

Then, I store that same gstatVariogram object in a file via write.table:
> write.table(temp.vgm,file=file.name)

And then, when I later recall it using read.table:
> temp.vgm <- read.table(file.name)
> class(temp.vgm) <- "gstatVariogram"
>

But....then I can no longer perform the fit.variogram upon it using the
exact same v.model.  I receive the error:
> temp.fit <- fit.variogram(temp.vgm,v.model,fit.method=1)
Error in fit.variogram(temp.vgm, v.model, fit.method = 1) :
        REAL() can only be applied to a 'numeric', not a 'integer'

I would very much like to have these variograms in files and then use them
later and on different computers, and I can unfortunately find no
information on this error.

Thank you for any help you can provide, and thank you for your time.

Cora

	[[alternative HTML version deleted]]


