[R-sig-phylo] Rooting a tree with a basal polytomy

2017-02-07 Thread Yan Wong
Sorry if this is a trivial question, but I have some (rooted) nexus trees with polytomies at the root. When I read them in using read.nexus() they are treated as unrooted. What’s the easiest way to tell R that they are intended to be rooted, even though the root is a polytomy? There’s no

Re: [R-sig-phylo] Rooting a tree with a basal polytomy

2017-02-07 Thread Yan Wong
Perfect, thanks. Yan On 7 Feb 2017, at 13:40, Emmanuel Paradis wrote: > Hi, > > If you have a single tree (object of class "phylo") > > phy$root.edge <- 0 > > If there are several trees in your NEXUS file (then phy is of class > "multiPhylo"): > > for (i in

Re: [R-sig-phylo] Rooting a tree with a basal polytomy

2017-02-07 Thread Emmanuel Paradis
Hi, If you have a single tree (object of class "phylo") phy$root.edge <- 0 If there are several trees in your NEXUS file (then phy is of class "multiPhylo"): for (i in seq_along(phy)) phy[[i]]$root.edge <- 0 Best, Emmanuel Le 07/02/2017 à 13:17, Yan Wong a écrit : Sorry if this is a