Many thanks, Emmanuel, Setting the number of nodes to 9 solved the problem. Cheers Agus 2012/5/25 Agus Camacho <agus.cama...@gmail.com>
> Thanks emmanuel, > > Got this: > > tree$node.label [1] 1 2 3 4 5 6 7 8 9 10> tree$Nnode[1] 9 > > > Wonder how is that possible. So im sending how i generated the tree. > tree <- read.tree(text=" > ((((C.leiolepis:0.0168, C.nicterus:0.0099):0.0242 > ,C.sinebrachiatus:0.024):0.074 > ,(S.catimbau:0.0652,N.ablephara:0.0309):0.0648):0.0659 > > ,((((P.erythrocercus:0.0235,P.tetradactylus:0.0259):0.0462 > ,V.rubricauda:0.124):0.0225 > ,M.maximiliani:0.0615):0.0828 > ,P.paeminosus:0.1093):0.0131);") > > tree$node.label=c(1,2,3,4,5,6,7,8,9,10) > plot(tree,show.node.label=TRUE,use.edge.length=TRUE) > > > > 2012/5/24 Emmanuel Paradis <emmanuel.para...@ird.fr> > >> Hi Agus, >> >> It seems the problem comes when pic() tries to create names to the >> contrasts. Probably your tree has badly formatted node labels. What do the >> following commands return? >> >> tree$node.label >> tree$Nnode >> >> Cheers, >> >> Emmanuel >> >> Agus Camacho wrote on 25/05/2012 01:58: >> >>> Hi all, >>> >>> When calculating independent contrasts of a variable, I get the following >>> message: >>> >>> ContrastWeight<- pic(Weight,tree)Error en names(contr)<- lbls : >>>> >>> el atributo 'names' [10] debe tener la misma longitud que el vector [9] >>> The attribute "names" [10] must have the same length than the vector[9] >>> (this was translated by me) >>> >>> After checking the help on the command, i made the following >>> >>> observations, >>> > length(Weight)[1] 10> class(Weight)[1] "numeric"> tree$tip.label >>> [1] "C.leiolepis" "C.nicterus" "C.sinebrachiatus" >>> [4] "S.catimbau" "N.ablephara" "P.erythrocercus" >>> [7] "P.tetradactylus" "V.rubricauda" "M.maximiliani" >>> [10] "P.paeminosus"> class(tree)[1] "phylo" >>> >>> Weight C.leiolepis C.nicterus C.sinebrachiatus >>>> S.catimbau >>>> >>> 0.9020000 0.7155556 0.5370526 0.5887500 >>> N.ablephara P.erythrocercus P.tetradactylus V.rubricauda >>> 0.5460000 0.4127273 0.3970000 0.4725294 >>> M.maximiliani P.paeminosus >>> 0.4833333 0.4677692 >>> >>> >>> >>> However, to me, everything seems to be right about the names and the >>> vector's length. Any hint? >>> >>> Thanks to all. I am new to these analyses and appreciate much the help >>> from the mail list. >>> >>> >>> Agus >>> >>> >>> >>> ______________________________**_________________ >>> R-sig-phylo mailing list >>> R-sig-phylo@r-project.org >>> https://stat.ethz.ch/mailman/**listinfo/r-sig-phylo<https://stat.ethz.ch/mailman/listinfo/r-sig-phylo> >>> >> >> -- >> Emmanuel Paradis >> IRD, Jakarta, Indonesia >> http://ape.mpl.ird.fr/ >> > > > > -- > Agustín Camacho Guerrero. > Doutorando 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. > > -- Agustín Camacho Guerrero. Doutorando 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