get_terminal_nodes | R Documentation |
A terminal node in a taxonomy does not have any child nodes. For example, a species is a terminal node if there are no subspecies or strains that belong to that species. This function identifies which elements of a vector are terminal nodes simply by checking whether that element appears as a substring in any other element of the vector.
get_terminal_nodes(string)
string |
A character vector of strings to check for terminal nodes |
A logical vector indicating which elements of the string are terminal nodes
# What does it do?
data("zeller14")
rownames(zeller14)[988:989]
get_terminal_nodes(rownames(zeller14)[988:989])
# How do I use it to keep only terminal nodes for a lefser analysis?
terminal_nodes <- get_terminal_nodes(rownames(zeller14))
zeller14sub <- zeller14[terminal_nodes, ]
# Then continue with your analysis!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.