You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a vector contains multiple species with the same name, diversitree uses only the first observation. The correct behavior should be to throw an error. I just corrected this in geiger mwpennell/geiger-v2@b7a7d45
MWE
library(diversitree)
## simulate a continuous dataset
set.seed(1)
t <- tree.bd(c(1,0), max.taxa=10)
d <- sim.character(t,1)
## using the simulated dataset
lik <- make.bm(t,d)
lik(1)
## adding a species with same name to data
d2 <- c(d, "sp10"=1)
lik2 <- make.bm(t,d2)
## likelihood is the same
lik2(1)
## however, swapping order of species
d3 <- d2[c(1:9,11,10)]
lik3 <- make.bm(t,d3)
## different likelihood
lik3(1)
The text was updated successfully, but these errors were encountered:
When a vector contains multiple species with the same name, diversitree uses only the first observation. The correct behavior should be to throw an error. I just corrected this in geiger
mwpennell/geiger-v2@b7a7d45
MWE
The text was updated successfully, but these errors were encountered: