R版本3.3.2,Windows 10:gstat包:使用' fit.variogram'拟合变异函数模型时出错。功能

时间:2017-10-04 14:46:50

标签: r geospatial gstat covariogram

fit.variogram包的gstat功能存在问题。我的代码,数据,错误消息和traceback()消息可以在下面找到。任何建议来解决这个问题将不胜感激。

library(gstat)
mydf<-as.data.frame(read.table("Sample_data.xlsx",header = TRUE,sep = 
",",na.strings = "EMPTY"))
coordinates(mydf) = ~x+y
c.vgm.exp<-variogram(z~1,data=mydf,cutoff=60000, width = 60000/15)
c.vgm.fit<-fit.variogram(c.vgm.exp,vgm(nugget=1000000,psill=6000000,model 
="Exp",range = 40000),fit.method = 7)

可以从以下位置获取数据文件: https://gtvault-my.sharepoint.com/personal/srathore6_gatech_edu/_layouts/15/guestaccess.aspx?docid=0b5983d45c9544203a5081cd501c64de4&authkey=AYhC8_ZVvGFG18JHHWMgUa4&expiration=2017-12-01T19%3a45%3a23.000Z

错误讯息:

c.vgm.fit<-fit.variogram(c.vgm.exp,vgm(nugget=1000000,psill=6000000,model 
="Exp",range = 40000),fit.method = 7)
Error in switch(model, exponential = fit.exponential(v.object, c0 = nugget,: 
EXPR must be a length 1 vector

traceback()
1: fit.variogram(c.vgm.exp, vgm(nugget = 1e+06, psill = 6e+06, model = 
"Exp", range = 40000), fit.method = 7)

0 个答案:

没有答案