Currently, if data input is matrix and geiger is installed, mcmcMk fails. This is the error
likelihood="fitDiscrete" doesn't work for data input as matrix.
Setting likelihood method to "fitMk".
Error in LIK(makeq(Q, index.matrix), root = "given", root.p = pi) :
could not find function "LIK"
Currently, if data input is matrix and geiger is installed,
mcmcMk
fails. This is the errorIt seems that the solution is to have, right after line 56 https://github.com/liamrevell/phytools/blob/544c3c597f9849a7484698b78b1a0b42f4874372/R/mcmcMk.R#L56, a
likelihood <- "fitMk"
as is done in line 52 https://github.com/liamrevell/phytools/blob/544c3c597f9849a7484698b78b1a0b42f4874372/R/mcmcMk.R#L52 immediately above. That this will work is evidenced by the fact that, without geiger installed, things run just fine.Right now, however, in line 121 https://github.com/liamrevell/phytools/blob/544c3c597f9849a7484698b78b1a0b42f4874372/R/mcmcMk.R#L121 LIK is assigned the value of
fitDiscrete
and that assignment is made because, not having setlikelihood <- "fitMk"
, we still have likelihood ==fitDiscrete
.P.S. I can make a pull request with this one-line change if deemed appropriate.