Skip to content

fixed bug in option mean.edge about length of edge.length#129

Open
fpavone wants to merge 4 commits intoliamrevell:masterfrom
fpavone:master
Open

fixed bug in option mean.edge about length of edge.length#129
fpavone wants to merge 4 commits intoliamrevell:masterfrom
fpavone:master

Conversation

@fpavone
Copy link

@fpavone fpavone commented Mar 10, 2023

Bug: edge.length was as long as the number of nodes, but it should be the number of nodes - 1.

The following code shows the bug

trees <- pbtree(n = 5, scale = 10, nsim = 10)
cons <- consensus.edges(trees, 
                         method = "mean.edge",
                         rooted = TRUE)
nrow(cons$edge) == length(cons$edge.length) # before FALSE, now TRUE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant