Hi Gustavo,
Hava a look at:
?`%in%`
Given a matrix 's' of class DNAbin and a tree 'tr' of class phylo,
you simply do:
s - s[-(rownames(s) %in% tr$tip.label), ]
Of course this requires matching taxon names in s and tr...
HTH
Christoph
Hi Gustavo,
I wrote a function to randomly prune one of the two alleles for each
species in
an alignment and tree list (say from MrBayes). I create a list of
names that I
want to drop, and I prune them out of the dataset and treelist (so I have a
matching dataset for each treefile). It's not
Hi Christoph Gustavo,
Quoting Christoph Heibl christoph.he...@gmx.net:
Hi Gustavo,
Hava a look at:
?`%in%`
Given a matrix 's' of class DNAbin and a tree 'tr' of class phylo, you
simply do:
s - s[-(rownames(s) %in% tr$tip.label), ]
Yes but replace '-' with '!':
s - s[!(rownames(s) %in%
Hi,
I noticed I can't use adj to control the placement of pie charts or
bar charts on tiplabels in the current version (ape_2.3-3).
e.g.
library(ape)
data(bird.orders)
x-(1:23)*0.025
plot.phylo(bird.orders, use.edge.length = FALSE, label.offset = 3)
tiplabels(pie=x,adj=c(0,0))