View source: R/SupplementaryFunctions.R
branch_singles | R Documentation |
Single nodes are those with exactly one daughter. This function is required by adj_matrix_to_tree, since valid "phylo" objects cannot contain single nodes. If pre-existing branches lack lengths then these are set to 1.
branch_singles(edges)
edges |
Dataframe comprising an adjacency matrix, with column names "Parent" and "Identity" |
A dataframe comprising the augmented adjacency matrix.
Rob Noble, robjohnnoble@gmail.com
edges1 <- data.frame(Parent = c(1,1,1,3), Identity = 2:5) branch_singles(edges1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.