Hello,
I am using the following code to prune a phylogeny tree of bird family.
However, an error appeared when running the last line of the code, saying:
error in data[tree.pruned$tip.label, ] :
'closure' type objects cannot have subsets.
I do not understand the error message.
Please kindly help explain and advise if any further information
is in need to solve the issue.
Thank you.
Elaine
Code
library(geiger)
# read data and tree
birddata <-read.csv("H:/birddata_family_20130405.csv", header = TRUE)
birdtree <- read.nexus("H:/birddata_family_20130405.nexus")
setwd("H:")
#temp <- name.check(birdtree, birddata)
tree.pruned <- drop.tip(birdtree, tip=temp$Tree.not.data)
## prune the data to include only those taxa in the pruned tree
data.pruned <- data[tree.pruned$tip.label, ]
[[alternative HTML version deleted]]
_______________________________________________
R-sig-phylo mailing list - [email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/[email protected]/