Plots the phylogenetic tree and its associated tip and/or node data
Source:R/plot_phylod.R
plot_phylod.Rd
Plots the phylogenetic tree and its associated tip and/or node data
Arguments
- phylod
A
phylo4d
object from the packagephylobase
containing phylogenetic and endemicity data for each species.- node_pies
Boolean determining if pie charts of the probabilities of a species being present on the island. If TRUE the correct data is required in the phylod object.
Examples
set.seed(
1,
kind = "Mersenne-Twister",
normal.kind = "Inversion",
sample.kind = "Rejection"
)
phylo <- ape::rcoal(10)
phylo$tip.label <- c("bird_a", "bird_b", "bird_c", "bird_d", "bird_e",
"bird_f", "bird_g", "bird_h", "bird_i", "bird_j")
phylo <- phylobase::phylo4(phylo)
endemicity_status <- sample(
c("not_present", "endemic", "nonendemic"),
size = length(phylobase::tipLabels(phylo)),
replace = TRUE,
prob = c(0.6, 0.2, 0.2)
)
phylod <- phylobase::phylo4d(phylo, as.data.frame(endemicity_status))
plot_phylod(phylod)