I try to plot the variogram in R. When I run the below code:
library(geoR)
Data = as.geodata(Data2, coords.col=1:2, data.col=3)
VG = variog(Data2,estimator.type="classical")
VG.fit = variofit(VG, ini.cov.pars =c(0.095,1.4), cov.model="gaussian", fix.nugget=FALSE, nugget=0.065)
plot(VG.fit)
I am getting an error:
Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' is a list, but does not have components 'x' and 'y'