Have you looked into drop.tip from ape? if your labels you are interested
in a vector, tip this should work:
smalltree <- drop.tip(tree, which(!(tree$tip.label %in% tip)))


Regards,
Klaus


On Wed, Jul 15, 2015 at 12:15 PM, Sergio Ferreira Cardoso <
sff.card...@campus.fct.unl.pt> wrote:

> Dear members,
>
> I have a tree with almost 10.000 species and I want to prune it. The
> problem is I only want a tree with 59 of those species. Is there any
> possible way to make this in R? Is there any code to prune all taxa except
> the ones on my data?
>
> Thanks in advance.
>
> Best regards,
> Sérgio.
>
> --
> Com os melhores cumprimentos,
> Sérgio Ferreira Cardoso.
>
> --------------------
>
> Best regards,
> Sérgio Ferreira Cardoso
>
>
>
>
> MSc. Paleontology candidate
> Departamento de Ciências da Terra - FCT /Universidade Nova de Lisboa
> Geociências - Universidade de Évora
>
> Lisboa, Portugal
> ᐧ
>
>         [[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/




-- 
Klaus Schliep
Postdoctoral Fellow
Revell Lab, University of Massachusetts Boston

        [[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