make_island_tree <- function(sim) {
branching_times <- list()
for (i in 1:length(sim[[1]])) {
branching_times[[i]] <- sim[[1]][[i]]$branching_times
}
branching_times[[1]] <- NULL
branching_times <- unlist(branching_times)
tree <- DDD::brts2phylo(branching_times)
return(tree)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.