# Generate a random tree
tree <- ape::rcoal(20)
# Pruning the tips originating after 0.3 million years
tree1 <- prune_tips(tree, time = 0.1)
# Plot it
plot(tree1)
# Pruning the tips based on quantiles of tip ages
tree2 <- prune_tips(tree, time = c(0.25, 0.75), qtl = TRUE)
plot(tree2[[1]])
plot(tree2[[2]])
Run the code above in your browser using DataLab