create.tree | R Documentation |
This function creates a tree, more a less stepwise, depending on the data in the function. The function can be run without arguments. If the desired phylogeny is already known and prepared, it is advised to prepare and save the elements used in this function, in case of small errors (yet, the function doesn't allow one to recover inputted data if there is an error).
create.tree(nbtaxa,taxa,age_taxa=NULL,nbnodes,nodes,age_nodes=NULL,node.labels=NA,tax_selection,
ultra=FALSE,format,plot=FALSE)
nbtaxa |
Desired number of taxa; optional, especially if either |
taxa |
A vector specifying the name of all desired taxa; if not all taxa names are known, rather do not specify the known names yet and specify them by running the function without this parameter |
age_taxa |
A vector specifying the age of all desired taxa; if not all taxa ages are known, rather do not specify the known ages yet and specify them by running the function without this parameter |
nbnodes |
Desired number of nodes; optional, especially if |
nodes |
A list of vectors; each vector is a node and must contains the names of the "targets", either the taxa (full name) or other nodes (Ni, i being the i-th node). It is advised to name each vector of the list "Ni" (i being the i-th node); if not, nodes are assumed to be hierarchized from oldest to youngest (while by naming nodes, the order does not matter). |
age_nodes |
A vector specifying the age of all nodes; if not all node ages are known, rather do not specify the known ages yet and specify them by running the function without this parameter. If |
node.labels |
A vector specifying the labels of the tree nodes, if there are. Can be set to |
tax_selection |
The method to choose taxa if |
ultra |
Logical; if the tree has to be ultrametric (i.e. without specific node ages) |
format |
The format of the output; can be an object of class |
plot |
Optional. Turned to |
Returns either an object of class phylo
or a text in newick/parenthetic format. If the latter, the tree can also be saved during performing the function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.