Closed sdwfrost closed 7 years ago
Terribly sorry about this. diversitree was a casualty of a major shift in research focus between PhD and postdoc, which combined with emergency patch updates for CRAN has left it in a less than ideal state and I'm not spending any time on it all anymore...
It looks like the extending diversitree manual is incorrect and you should omit the list(ret)
line (just returning ret
). So:
derivs <- function(t, y, pars) {
k <- length(y)
Q <- matrix(pars, k, k)
ret <- Q %*% y
dim(ret) <- NULL
ret
}
appears to work for me.
Thanks - this works for me too - not sure how though, as ode
and lsoda
(in the traceback) expect that the model function returns a list.
No apologies necessary! The codebase and docs are quite a lot to maintain for one person.
Looks like this can be closed. A quick question; is there any hard-coded reason (such as the way that the tree is traversed) why models are restricted to ultrametric trees?
I can't remember - most of the models in the package are restricted to ultrametric trees because they're diversification models. It's possible that the code that the mkn models uses uses code that assumes an ultrametric tree but I'd have to check. I don't think that's the case though
I'm trying to reproduce the old 'extending diversitree' analysis with the current diversitree. I think I have all the pieces together, but my example dies due to the output of the derivatives not being what is expected. The traceback is as follows.