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_1", "bird_h_2", "bird_i")
phylo <- phylobase::phylo4(phylo)
endemicity_status <- c("not_present", "not_present", "not_present",
"not_present", "not_present", "not_present",
"not_present", "endemic", "endemic", "not_present")
phylod <- phylobase::phylo4d(phylo, as.data.frame(endemicity_status))
extract_multi_tip_species(
phylod = phylod,
species_label = "bird_h_1",
species_endemicity = "endemic"
)
Run the code above in your browser using DataLab