X-Git-Url: https://git.donarmstrong.com/?p=ape.git;a=blobdiff_plain;f=R%2Fbind.tree.R;h=b43ce900055d4c393e324023ab7ff57801a0afe8;hp=cc7ee1ff3a055ca837889415b3d48c2cf2161d7c;hb=fab4946bb5d41cd408dffd4b66aae8a697690cfa;hpb=48681c35f7904c17b064de9c6bf96d84581e9e52 diff --git a/R/bind.tree.R b/R/bind.tree.R index cc7ee1f..b43ce90 100644 --- a/R/bind.tree.R +++ b/R/bind.tree.R @@ -1,8 +1,8 @@ -## bind.tree.R (2011-06-21) +## bind.tree.R (2012-02-13) ## Bind Trees -## Copyright 2003-2011 Emmanuel Paradis +## Copyright 2003-2012 Emmanuel Paradis ## This file is part of the R-package `ape'. ## See the file ../COPYING for licensing issues. @@ -63,9 +63,11 @@ bind.tree <- function(x, y, where = "root", position = 0, interactive = FALSE) ## case = 3 -> y is bound on a node of x ## check that 'position' is correct - if (position) { - if (!wbl) - stop("'position' is non-null but trees have no branch lengths") + if (position && wbl) { +### New in ape 3.0-1: this makes possible binding 'y' below +### a node of 'x' thus creating a new node in 'x' +### if (!wbl) +### stop("'position' is non-null but trees have no branch lengths") if (case == 1) { if (xHasNoRootEdge) stop("tree 'x' has no root edge")