Re: [R-sig-phylo] problem matching data and tip.labels

2011-02-27 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Another possibility would be to look into the phylobase package, which is precisely intended to do a more consistent job keeping traits and data in synch ... On 11-02-27 01:00 PM, Rich Glor wrote: > Tony, > > The problem is that tiplabels just t

Re: [R-sig-phylo] problem matching data and tip.labels

2011-02-27 Thread Liam J. Revell
Hi Tony. A couple of additional shortcuts would be: # name rows of data frame with first column > anolis.dat<-read.csv("anolis_data.csv",row.names=1) # sort rows by $tip.label > anolis.dat<-anolis.dat[anolisChrono$tip.label,] # then > attach(anolis.dat) > plot(anolisChrono,adj=0.5, cex=0.4) #

Re: [R-sig-phylo] problem matching data and tip.labels

2011-02-27 Thread Rich Glor
Tony, The problem is that tiplabels just throws up the labels in the same order as they appear in the matrix of data you're calling (i.e., anolisData). The first entry in the the data matrix will therefore be associated with the first taxon in your tree. This might not be obvious at first, b

[R-sig-phylo] problem matching data and tip.labels

2011-02-27 Thread Tony Gamble
Hello, I am having a problem matching data and tip.labels when I plot trait data on a phylogeny. I open the tree and data in R and convert the data to a dataframe and then assign taxon names from the tree to the values in the dataframe. When I simply print the dataframe the taxon names and data