Dear list users,

Im trying to use arrows or triangles to plot wether a trait increased or
decreased its value during an ancestral state reconstruction.

I think id need to condition pch and cex values to the magnitude and
direction of differences between the trait to be plotted at the
corresponding node/tip and the one at the previous node/tip.

However, I was not able to sort out how to identify the ancestral values in
each node, relate them to their specific nodes, and extract their
difference and direction of change. Any suggestions on that?

there goes a play script:
require(phytools)
require(ape)
tree <- pbtree(n = 10, scale = 1)
dataframe=data.frame(y=c(10:1),x=c(1:10),sp=tree$tip.label)
tree$tip.label
rownames(dataframe)=dataframe$sp
dataframe=dataframe[tree$tip.label,]
contrasts <- data.frame(apply(dataframe[,1:2], 2, pic, tree))
plot (tree)
nodelabels(round(contrasts$x, 3),
           adj = c(0, -0.5), frame="n",
           col="blue", cex=0.8)
nodelabels(round(contrasts$y, 3), adj = c(0, 1), frame="n",col="red",
cex=0.8)

Thanks in advance!
Agus
-- 
Agustín Camacho Guerrero.
Doutor em Zoologia.
Laboratório de Herpetologia, Departamento de Zoologia, Instituto de
Biociências, USP.
Rua do Matão, trav. 14, nº 321, Cidade Universitária,
São Paulo - SP, CEP: 05508-090, Brasil.

        [[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/

Reply via email to