View source: R/set.root.time.R
set.root.time | R Documentation |
Adds or replace root time to a tree by calculating it's root's depth
set.root.time(tree, present = 0)
tree |
A |
present |
The age of the most recent tip. By default this is set to |
## A random tree with no root.time
my_tree <- rtree(10)
my_tree$root.time # is NULL
## Adding a root time
my_tree <- set.root.time(my_tree)
my_tree$root.time # is not NULL
## Rewrite the root time with a different present
my_tree <- set.root.time(my_tree, present = 10)
my_tree$root.time # is older
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.