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%
Hello,
I am working with a more less a big phylogeny (over 100 taxa). I had used
drop.tips to analyze some clades independently and produce sub-trees. My
question is: how can I use the information in the modified trees to drop the
same taxa in the original DNA matrix? I have been doing this