richfitz / diversitree

diversitree: comparative phylogenetic analyses of diversification
http://www.zoology.ubc.ca/prog/diversitree
30 stars 9 forks source link

make.musse should bail if given a clade.tree #3

Open richfitz opened 10 years ago

richfitz commented 10 years ago

Reported by Daniel Caetano:

tree <- read.nexus("Thomas-tree.nex")
d <- read.csv("Lislevand-states.csv", as.is=TRUE)
states <- d$dimorph
names(states) <- d$species
states <- states[tree$tip.label]
names(states) <- tree$tip.label
states.15 <- (abs(states) > 0.15) + 0
tree.clade <- clades.from.polytomies(tree)

## Making the data for MuSSE:
states.15[which(states.15 == 1)] <- 2
states.15[which(states.15 == 0)] <- 1
states.15[sample(1:350, size = 50)] <- 3
lik <- make.musse(tree.clade, states = states.15, k = 3)
> Error in dt.tips.grouped(y, y.i, cache) : y must be same length as tips