random_detach_subtree | R Documentation |
Randomly detach a subtree from a given tree
random_detach_subtree(tree_phylo4)
tree_phylo4 |
a "phylo4" object |
a list containing the following elements:
tree_detached
a "phylo" tree detached from the input tree
tree_kept
the remaining "phylo" tree after detachment
pa_detach_node_label
a character label of the parent of the node from which the detachment happens
pa_div_time
a number in (0, 1) indicating the divergence time of the parent of the detached node
detach_div_time
a number in (0, 1) indicating the divergence time of the detached node
detach_node_label
a character label of the parent of the detached node
Other sample trees:
attach_subtree()
,
reattach_point()
library(phylobase)
# load the MAP tree structure obtained from the real HCHS/SOL data
data(data_synthetic)
# extract elements into the global environment
list2env(setNames(data_synthetic, names(data_synthetic)), envir = globalenv())
detachment <- random_detach_subtree(extractTree(tree_with_parameter))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.