# generate a random tree
tree = generate_random_tree(list(birth_rate_factor=0.1), max_tips=7)$tree
# define a character vector storing hypothetical tip taxonomies
tip_taxonomies = c("R;BB;C", "AA;BB;C;DD", "AA;BB;C;E",
"AA;BB", "AA;BB;D", "AA;BB;C;F", "AA;BB;C;X")
# compute consensus taxonomies and store them in the tree as node labels
tree$node.label = castor::consensus_taxonomies(tree,
tip_taxonomies = tip_taxonomies,
delimiter = ";")
Run the code above in your browser using DataLab