xavierdidelot / BactDating

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

incompatible dimensions #45

Closed jts1044 closed 3 years ago

jts1044 commented 3 years ago

I have isolates with a mixed bag of known dates. Some, I know the day, some only the month, and some only the year. As such, I followed the instructions in the yourData vignette to create a matrix representing the interval of dates for each isolate. Here is what the "d" variable looks like:

       [,1]     [,2]

[1,] 2013.605 2013.608 [2,] 2018.477 2018.479 [3,] 2018.477 2018.479 [4,] 2018.493 2018.496 [5,] 2018.592 2018.594 [6,] 2018.611 2018.614

Here is the error I get:

rooted=initRoot(t,d) Error in cor(date, ys, use = "complete.obs") : incompatible dimensions

If I run d as a vector like normal with say the first column of dates, it works fine. I would appreciate any help to better understand how to use a range of dates.

jts1044 commented 3 years ago

Nevermind. I found the previous issue saying addressing this.