thibautjombart/treespace

Do you need to output warning for trees without edge lengths when lambda=0?

Closed this issue · 1 comments

When doing e.g. treeDist(read.tree(text="(((A, B), C), D);"), read.tree(text="((A, (B, C)), D);"), lambda=0), I get a warning:

Warning messages:
1: In treeVec(tree.a, lambda, return.lambda.function, emphasise.tips, :
Tree edge lengths are not defined, setting edges to have length 1
2: In treeVec(tree.b, lambda, return.lambda.function, emphasise.tips, :
Tree edge lengths are not defined, setting edges to have length 1

But with lambda=0 (i.e. topology only), shouldn't I be able to do this without eliciting a warning?

Thanks for this, yes that warning is unnecessary in that situation. I have fixed it in commit 6e59f92. Cheers!