Description Usage Arguments Value Examples
Idea is that you can aggregate a property up a tree (taxon id), then prune the tree, then apply this function to end up with taxons that were originally on pruned nodes, on their closest unpruned parent
1 | remove_agg_if_in_child(node, property)
|
node |
data.tree node, where a quantity has been aggregated using 'list_up_tree'() |
property |
name of the property which was originally aggregated (i.e. same char vector you passed to 'list_up_tree'()) |
a tree where the aggregated field no longer contains ids if they are elsewhere in the tree
1 2 3 4 5 6 7 8 | ### Aggregate some property
list_up_tree(node = taxonomy_tree, property = "name")
### Prune tree
data.tree::Prune(taxonomy_tree, function(x) x$n_pages_agg >= threshold)
### remove properties from the aggregate if they are still in the tree
remove_agg_if_in_child(node = taxonomy_tree, property = "name")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.