Dear all,
This is Elaine. I am using drop.tip (ape) to prune a phylogeny tree and get the data of the pruned tree. The original data encompassed two types of information: family name and migration status. However, using two methods below got different results. method 1 (from tree.pruned$tip.label) : family name only method 2 (from data.pruned): migration status only Please kindly explain why it is not possible to retrieve both family name and migration status together using method 1 or 2. Further, please kindly advise any modification to get both information. Thank you. Elaine Code Library(ape) birddata <- read.csv("H:/ birddata_family.csv", header = TRUE) birdtree <- read.nexus("H:/ birddata_family.nexus") setwd("H:) ## prune the phylogeny to include only species which are in the data set species.to.keep<-read.csv("H:/ birddata_family_20130405.csv", header = TRUE) tree.pruned<-drop.tip(birdtree,tree.pruned<-drop.tip(tree,** setdiff(tree$tip.label,ss)) # tree.pruned csv (method 1) write.csv<-(tree.pruned$tip.label,"H:/treepruned_tiplabel.csv") # prune the data to include only those taxa in the pruned tree data.pruned <- birddata[tree.pruned$tip.label, ] # data.pruned csv (method 2) write.csv <-(data.pruned,"H:/datapruned.csv") birddata https://www.box.com/files/0/f/766727938/1/f_7323300929 treepruned_tiplabel (method 1) https://www.box.com/files/0/f/766727938/1/f_7353351839 datapruned (method 1) https://www.box.com/files/0/f/766727938/1/f_7353351839 [[alternative HTML version deleted]] _______________________________________________ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/