diverse_subtree | R Documentation |
Get a diverse subset of species from tree
diverse_subtree(tree, n, weights = NULL, collapse = FALSE, FUN = .algo1, ...)
tree |
phylo object |
n |
number of species to keep (if greater then the number of species in the tree, the tree is returned unchanged) |
weights |
Numeric vector with length equal to the number of species in the tree. A weight of 1 will have no influence, lower than one means the species is less likely to be selected. |
collapse |
Should nodes with a single descendent be collapse? |
FUN |
The diversification algorithm to use |
... |
Additional arguments passed to the diversification algorithm function |
phylo object
data(atree)
# default
diverse_subtree(atree, 4)
# do not to include the 't1' species
diverse_subtree(atree, 4, weights=c(t1=0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.