View source: R/label.elements.R
label.elements | R Documentation |
Parse tip labels of an object of class phylo
and
store information to a vector with the same order as
the tip labels of the tree.
label.elements(x, delim = "|", returnNum = 1, returnDelim = " ", ...)
x |
The tree whose tips are to be parsed. Should be of class |
delim |
The symbol in the tip labels used to delimit different pieces of information. |
returnNum |
The place of the information desired from the tip labels. For example, if information is delimited by |, species is desired, and tips are in the following format: Quercus_rubra|ARB355|Johnson then the returnNum would be 1, as the species is the first piece of delimited information. |
returnDelim |
The delimitation character for the new tip labels generated. |
... |
Other arguments pertinent to the function |
The default value for delim
is a pipe (|). The default for
returnNum is 1, and the default for returnDelim is a space, ' '.
out |
A vector of the information extracted from the tip labels of the tree, ordered corresponding to tip labels. |
Andrew Hipp and Kasey Pham
strsplit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.