I was trying to fit the variogram parameters of an empirical variogram using GLS (Generalized Least Squares) fitting method. I used the 'fit.variogram.gls' method of the 'gstat' package in R.
I tried it out by running the example code given in the help document.
library(sp)
data(meuse)
coordinates(meuse) = ~x+y
fit.variogram.gls(log(zinc)~1, meuse[1:40,], vgm(1, "Sph", 900,1))
But I was receiving the following error on running the above code :
Error in gamfn(h0, theta) : could not find function "gamfn".
How do I go about interpreting the error and the remedy for it.