Skip to content

R version 3.3.2, Windows 10: gstat package: Error in fitting a variogram model using 'fit.variogram' function

2 messages · Rathore, Saubhagya Singh, Bert Gunter

#
Dear Members,



I am trying to fit a variogram model using fit.variogram function from the gstat package. The figure showing my experimental variogram can be seen here: https://i.stack.imgur.com/UZXw4.png

My code line for this operation is:
The system throws following error message:

Error in switch(model, exponential = fit.exponential(v.object, c0 = nugget,  :

  EXPR must be a length 1 vector

Any help to know the cause of the error and avoiding it would be highly appreciated.

Thank you very much
Saubhagya Singh Rathore
PhD Candidate
Civil and Environmental Engineering
Georgia Institute of Technology
#
No reproducible example makes it difficult to diagnose the source of the
error.

Did you try using traceback() after the error? That might give you a hint.

I am unfamiliar with the package and function, but check the "range"
argument to make sure it's supposed to be a single value and not a vector
(just a wild guess on my party -- therefore likely wrong).

Cheers,
Bert






Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

On Sun, Sep 24, 2017 at 1:12 PM, Rathore, Saubhagya Singh <
saubhagya at gatech.edu> wrote: