Hello all, Apologies for sending another post this week, but I've run into a strange error with bind.tree(), as below. I'm binding one tree ("clade") to a tip (4, in this case) on another tree ("chosen_tree"). "chosen_tree" is a tree from an allTrees() output.
> bind.tree(chosen_tree,clade,where=tip) Error in x$edge[sndcol, 2] <- newNb[-x$edge[sndcol, 2]] <- (n + 2):(n + : number of items to replace is not a multiple of replacement length In addition: Warning message: In newNb[-x$edge[sndcol, 2]] <- (n + 2):(n + x$Nnode) : number of items to replace is not a multiple of replacement length Bizarrely, while trying to create sample files for you to test, I found that write.tree() and read.tree() actually get rid of the problem, and furthermore, that the problem is with "chosen_tree" and not "clade". So, as of the moment, I'm unfortunately unable to make the error reproducible. Not all trees from an allTrees output do this, either. > bind.tree(chosen_tree,read.tree(text=write.tree(clade,file="")),where=tip) Error in x$edge[sndcol, 2] <- newNb[-x$edge[sndcol, 2]] <- (n + 2):(n + : number of items to replace is not a multiple of replacement length In addition: Warning message: In newNb[-x$edge[sndcol, 2]] <- (n + 2):(n + x$Nnode) : number of items to replace is not a multiple of replacement length > bind.tree(read.tree(text=write.tree(chosen_tree,file="")),clade,where=tip) Phylogenetic tree with 5 tips and 4 internal nodes. Tip labels: [1] "1781" "23" "24" "GR1210" "GR3799" Rooted; no branch lengths. Anyone have any idea what's going on? For now, I'll solve it by using the read.tree(write.tree()) kludge. -Dave -- David Bapst Dept of Geophysical Sciences University of Chicago 5734 S. Ellis Chicago, IL 60637 http://home.uchicago.edu/~dwbapst/ _______________________________________________ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo