xavierdidelot / BactDating

Bayesian inference of ancestral dates on bacterial phylogenetic trees
https://xavierdidelot.github.io/BactDating
MIT License
80 stars 15 forks source link

seems like the as.mcmc function behaves differently between R versions #36

Closed fengyuchengdu closed 3 years ago

fengyuchengdu commented 4 years ago

ape = 5.4 coda = 0.19-3 BactDating = 1.0.12 the installed version of these 3 are the same

when running " mcmc=as.mcmc(result) effectiveSize(mcmc) " on the same result

R 3.6.3 processed as expected, however in R 4.0.2, it showed "Error in character(ncol(y)) : invalid 'length' argument"

after checking "mcmc", it seems to contain more than 3 columns and include CI data etc. when using R 4.0.2

xavierdidelot commented 4 years ago

Hi Feng,

Could you please check if it works when you use: mcmc=as.mcmc.resBactDating(res) instead of mcmc=as.mcmc(res)

Best wishes, Xavier

fengyuchengdu commented 4 years ago

Yes, it worked, thanks for the solution

xavierdidelot commented 4 years ago

Thanks for confirming, and I will try to make as.mcmc work soon too.