Error in if (log(runif(1)) < l2 - l + pratio + qratio) { : missing value where TRUE/FALSE needed
nbawe opened this issue · 7 comments
Hi when running following command I get the error:
t=loadCFML("/Users/cfml_output")
and dates as an intervals
res=bactdate(t,d,initMu=32.6,updateMu=F,nbIts=1000000, useRec=T, showProgress=T)
ERROR:
Error in if (log(runif(1)) < l2 - l + pratio + qratio) { :
missing value where TRUE/FALSE needed
When using single dates set to equal to estimate divergence same error occurres:
t=loadCFML("/Users/cfml_output")
and dates forced equal
res=bactdate(t,d,initMu=32.6,updateMu=F,nbIts=1000000, useRec=T, showProgress=T)
ERROR:
Error in if (log(runif(1)) < l2 - l + pratio + qratio) { :
missing value where TRUE/FALSE needed
Using BactDating v1.0.8
Do you have any idea what it could be?
After the loadCFML
command, could you check if any of the t$unrec
is negative or undefined?
No negatives and no undefined values.
Are all values in t$unrec
between 0 and 1 ?
Yes:
min = 0,95099521
max = 0,99999355
Ok there's really nothing wrong with that then.
- Does it work with
unrec=F
instead ofunrec=T
? - Does it work if you add
model=relaxedgamma
? - Does it work if you add
model=strictgamma
?
Well that is more than wierd, just ran the same script again that I used and everything works as intended.
I have ran this script before many times and the error was printed.
Thanks for the help and sorry for the confusion.
The only explanation I see is that there was something wrong previously in your t$unrec
, but I'm glad this is now solved for you!