Hi Zach.


What is your objective here? reorder.phylo reorders the edges in the �phylo� 
object, but does not usually change the order in which the tips are plotted. 
For that, you should look at ape::rotate or phytools::rotateNodes (I believe), 
ape::ladderize, or the argument tips in phytools::plotTree.



All the best, Liam



--
Liam J. Revell, Associate Professor of Biology
University of Massachussetts Boston
email: liam.rev...@umb.edu
web: http://faculty.umb.edu/liam.revell

Sent from Outlook Mail for Windows 10 phone



From: Zach Culumber<mailto:zculum...@gmail.com>
Sent: Thursday, August 11, 2016 10:48 AM
To: r-sig-phylo@r-project.org<mailto:r-sig-phylo@r-project.org>
Subject: [R-sig-phylo] Unable to reorder any phylo object with reorder.phylo



Hi everyone,

I seem to have an issue where I cannot get any trees (real data or
simulated trees) to reorder.  I've tried a lot of different things
including updating packages, restarting R, using a different computer.  My
real trees have 501 tips, but I'm having this issue even when I simulate
trees with just 25 or 50 tips.  Currently using R 3.3.1 in Rstudio and APE
3.5.  I also came across the trick of using:

phy <- read.tree(text=write.tree(phy))

but that didn't seem to work either.  The structure of the my phylo
objects (my real trees and simulated trees) are fine when passed
through checkValidPhylo.  Ultimately, if it were just one tree I
would do it in an outside program and just import the reordered tree,
but I'm wanting to apply a reordering function across a multiphylo
object.  However, I can't seem to get a single tree
reordered!  I'm pasting some code below which is pretty boiler plate
but *should* I believe work, but doesn't work for me.  If anyone has
any thoughts or advice, I would appreciate it.
Thank you!

#Simulate a single tree to test the reorder function

tree1<-pbtree(n=500,scale=10,nsim=1)

plot(tree1)

#Reorder with pruningwise

tree2<-reorder.phylo(tree1, "pruningwise")

plot(tree2)


Zach

--
Zachary W. Culumber
Postdoctoral Research Associate
Kansas State University
Division of Biology
http://www.zwcresearch.com

Coordinator
Centro de Investigaciones Cient�ficas de las Huastecas Aguazarca
http://www.cichaz.org

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to