liamrevell / phytools

GNU General Public License v3.0
198 stars 56 forks source link

"Error in tree$maps[[jj[i]]] : invalid subscript type 'list'" #145

Closed ilcneto closed 8 months ago

ilcneto commented 9 months ago

Hi Liam,

Years ago, you replied to someone via email about this error in your blog and I would appreciate your help with that. I've successfully run this code that I have before, but now I keep getting this error which I reproduced in an example below:

library(phytools)

data(sunfish.tree) data(sunfish.data) fmode <- setNames(sunfish.data$feeding.mode, rownames(sunfish.data))

simmap.trees <- make.simmap(sunfish.tree, fmode, model = "SYM", pi = "estimated", nsim=100)

plot(simmap.trees[[1]])

ladderize.simmap(simmap.trees[[1]]) class(simmap.trees[[1]])

lapply(simmap.trees, ladderize.simmap)

Thank you!

liamrevell commented 8 months ago

This should be fixed now. Please re-open if not.