Liam,

That works fantastically, thanks very much!

Nick


On Tue, Aug 13, 2013 at 10:39 AM, Liam J. Revell <[email protected]>wrote:

> Hi Nick.
>
> drop.tip(...,trim.internal=**FALSE) almost does this, but it will not
> allow you to trim all the leaves in the tree.
>
> Why don't you try the attached function, which I'm calling drop.leaves. It
> does what you want, I think, and should be straightforward to figure out.
> The tip labels on the pruned tree are either the node labels (if they
> exist) or the node numbers in the original tree; or (if
> keep.tip.labels=TRUE) they are a comma separated list of the tips descended
> from that node in the input tree. Note that not all tips will be in these
> lists because some edges from internal nodes lead to only one tip.
>
> Feedback welcome.
>
> All the best, Liam
>
> Liam J. Revell, Assistant Professor of Biology
> University of Massachusetts Boston
> web: 
> http://faculty.umb.edu/liam.**revell/<http://faculty.umb.edu/liam.revell/>
> email: [email protected]
> blog: http://blog.phytools.org
>
>
> On 8/13/2013 10:43 AM, Nicholas Crouch wrote:
>
>> Hi All,
>>
>> For an analysis I am performing I am looking to drop all terminal branches
>> from a phylogeny (class "phylo"). The idea is to end up with only branches
>> that lead to nodes. Does anyone know how to drop these lengths to leave me
>> everything else?
>>
>> Thanks,
>>
>> Nick
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________**_________________
>> R-sig-phylo mailing list - [email protected]
>> https://stat.ethz.ch/mailman/**listinfo/r-sig-phylo<https://stat.ethz.ch/mailman/listinfo/r-sig-phylo>
>> Searchable archive at http://www.mail-archive.com/r-**
>> [email protected]/<http://www.mail-archive.com/[email protected]/>
>>
>>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - [email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/[email protected]/

Reply via email to