Hello
This Elaine.
I tried to prune a phylogeny tree using two methods based on the code
attached.
Method 1 returned the tip.label sharing between birddata and birdtree.
Method 2 returned nothing.
Please kindly indicate why Method 2 failed to prune the tree.
Also, please kindly
Hi Elaine.
A simpler way to do method 1 that doesn't require na.omit or match is:
# if there are species in the tree that are missing from the data:
ss-species.to.keep[,1] # species in the data
tree-birdtree
tree.pruned-drop.tip(tree,setdiff(tree$tip.label,ss))
I would guess that method 2
- Original Message -
From: Graham Slater gsla...@ucla.edu
To: Eugen Egorov eugen...@online.de
Cc: r-sig-phylo@r-project.org
Sent: Thursday, March 03, 2011 7:54 PM
Subject: Re: [R-sig-phylo] Pruning a tree
drop.tip assumes you have identified the tips that you want to remove, which
you could do
Slater gsla...@ucla.edu
To: Eugen Egorov eugen...@online.de
Cc: r-sig-phylo@r-project.org
Sent: Thursday, March 03, 2011 7:54 PM
Subject: Re: [R-sig-phylo] Pruning a tree
drop.tip assumes you have identified the tips that you want to remove,
which you could do using
nc - name.check(tree, data
- Original Message - From: Graham Slater gsla...@ucla.edu
To: Eugen Egorov eugen...@online.de
Cc: r-sig-phylo@r-project.org
Sent: Thursday, March 03, 2011 7:54 PM
Subject: Re: [R-sig-phylo] Pruning a tree
drop.tip assumes you have identified the tips that you want to remove
...for
whatever reason...
Does that make any sense?
- Original Message -
From: Graham Slater gsla...@ucla.edu
To: Liam J. Revell liam.rev...@umb.edu
Cc: Eugen Egorov eugen...@online.de; r-sig-phylo@r-project.org
Sent: Friday, March 04, 2011 6:33 PM
Subject: Re: [R-sig-phylo] Pruning a tree
, 2011 6:33 PM
Subject: Re: [R-sig-phylo] Pruning a tree
Yes, name.check() will only work with a named vector of data or data
frame, so Liam's code should work for you. it also looks like your names
in the vector species are different from those of the tip labels, as
you say that nc$Tree.not.data
Hi all,
I have a huge tree and a list with species. Now I want to prune the tree, so
only species appearing in the list are left in the tree. I tried the geiger
package to compare tree species with those in the list, but that didn't work
out, because I recieved a tree with 0 tips and 1 node