Hi Miguel,

phangorn can use any discrete set of variables, not only DNA data. I
deleted the (dna) in the help to avoid confusion in future versons of
phangorn.
The RI function however needs an object of class phyDat as input. You
probably need to do something similar like this line to convert your
data:
myData = phyDat(myOldData, type = "USER", levels = c("1", "2","3"))
vignette("phangorn-specials") gives also some details and hints.

You run these lines, where ryData contains binary Data (the states are
r and y):
library(phangorn)
example(parsimony)
RI(treeRatchet, Laurasiatherian)
(ryData <- acgt2ry(Laurasiatherian) )
RI(treeRatchet, ryData)
str(as.data.frame(ryData))


Kind regards
Klaus


On 2/18/11, Miguel Verdu <miguel.ve...@uv.es> wrote:
> Hi all:
>
> Is possible to calculate the Retention Index of a
> discrete trait in a phylogenetic tree with R?.
> I´ve tried with phangorn but it seems it only works with DNA data.
>
> Thanks in advance
>
> Miguel Verdú
>
>
>
>
>
> ***************************************************************
>   Centro de Investigaciones sobre Desertificacion -CIDE-
>   (CSIC/UV/GV)
>   Apartado Oficial
>   46470 ALBAL, VALENCIA (SPAIN)
>   phone: (+34) 961220540 ext. 110
>   fax: (+34) 961270967
>   miguel.ve...@uv.es
> http://www.uv.es/verducam
>
> _______________________________________________
> R-sig-phylo mailing list
> R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>


-- 
Klaus Schliep
Université Paris 6 (Pierre et Marie Curie)
9, Quai Saint-Bernard, 75005 Paris

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to