traitecoevo / phyndr

Match tip and trait data
Other
9 stars 0 forks source link

Easy way to recover which tips from original tree have been kept, swapped, or dropped #10

Closed mwpennell closed 9 years ago

mwpennell commented 9 years ago

Think this would be useful for people I think, as it is not obvious how to do it given that the taxon labels on the new tree have been replaced.

richfitz commented 9 years ago

Sure, we can add some bookkeeping in there as we collapse the groups.

mwpennell commented 9 years ago

Have we addressed this? Obviously fairly straightforward to do this posthoc but seems like this might be a useful little utility to have around

idx  <- which(new$tip.label %in% old$tip.label) 
same <- new$tip.label[idx]
swap <- new$tip.label[-idx]