外部函数调用中的Bchron NA / NaN / Inf(arg 4)

时间:2018-02-02 12:40:52

标签: r

我这些天一直在使用Bchron软件包,它工作得非常好,突然间,使用相同的数据,我收到了这个错误:

  

(函数(y,p,mu,phi)中的错误:外部函数调用中的NA / NaN / Inf(arg 4)

当我进入时:

for (j in 1:10) {
  DevChronOut = Bchronology(ages=Input$dates*1000,
                            ageSds=Input$sds*1000, 
                            calCurves=rep("normal",18),
                            positions=Input$depths*1000, 
                            positionThicknesses=Input$thickness*1000,
                            ids=Input$ids, 
                            jitterPositions = TRUE,
                            predictPositions=seq(356000,417000,by=100),iterations=10000)
}

文件Input中没有Na数据或其他数据。

当我要求追溯时, 我明白了:

  

6 :(功能(y,p,mu,phi)          {              return(.C(“dtweediep1”,as.double(y),as.double(p),as.double(mu),                  as.double(phi),as.double(0))[5] [[1]])          })(y =点[[1L]] [[1L]],p =点[[2L]] [[1L]],mu =点[[3L]] [[1L]],              phi = dots [[4L]] [[1L]])       5:mapply(FUN =函数(y,p,mu,phi)          {              return(.C(“dtweediep1”,as.double(y),as.double(p),as.double(mu),                  as.double(phi),as.double(0))[5] [[1]])          },y = 0.598000000000013,p = 1.2,mu = 0,phi = Inf,MoreArgs = list(),              SIMPLIFY = TRUE,USE.NAMES = TRUE)       4:do.call(“mapply”,c(FUN = FUN,args [dovec],MoreArgs = list(args [!dovec]),              SIMPLIFY = SIMPLIFY,USE.NAMES = USE.NAMES))       3:dtweediep1(theta [do [j + 1]] - thetaNew,p,mu *(diffPosition [j]),              psi /(diffPosition [j])^(p - 1))       2:ifelse(j == n,0,log(dtweediep1(theta [do [j + 1]] - thetaNew,              p,mu *(diffPosition [j]),psi /(diffPosition [j])^(p - 1))))       1:Bchronology(年龄=输入$日期* 1000,ageSds =输入$ sds * 1000,              calCurves = rep(“normal”,18),position =输入$ depths *                  1000,po​​sitionThicknesses =输入$ thickness * 1000,ids =输入$ ids,              jitterPositions = TRUE,predictPositions = seq(356000,417000,                  by = 100),iterations = 10000)

我能做些什么吗?

0 个答案:

没有答案