Hi All, I am trying to perform CCA and RDA several times to compare their performances. To do that I put this two functions of vegan package inside a for loop. Unfortunatly when I am trying to perform the anova(by=axis) to test the individual axes the function don't recognize the species data.frame. The same problem occurs whem I try to run forward selection. The same problem occur when I try to perform the ordiR2step in the RDA context. I know that the problem are associated with the fact that those function that I am trying to run needs the complete formula call like rda(esp~x+y+z) but as I am running a loop I can not declare apriori the formula, so I am using the compressed form like rda(esp~.,env). Is there any way to solve this problem? Thank you a lot, -- Prof. Gilson Correia de Carvalho, M.Sc. ---------------------------------------------------- Pesquisador Associado Laboratório de Ecologia Bentônica - LEB Instituto de Biologia - UFBA Universidade Federal da Bahia - UFBA ---------------------------------------------------- Professor Assistente Departamento de Biointeração Instituto de Ciências da Saúde - ICS Universidade Federal da Bahia - UFBA ----------------------------------------------------- Diretor Técnico Holos Soluções Ambientais Ltda ----------------------------------------------------- Skype: bio_gilson GTalk: biogilson [[alternative HTML version deleted]]
On 05/05/2013, at 03:05 AM, Gilson Carvalho wrote:> > I am trying to perform CCA and RDA several times to compare their performances. To do that I put this two functions of vegan package inside a for loop. Unfortunatly when I am trying to perform the anova(by=axis) to test the individual axes the function don't recognize the species data.frame. The same problem occurs whem I try to run forward selection. The same problem occur when I try to perform the ordiR2step in the RDA context. > > I know that the problem are associated with the fact that those function that I am trying to run needs the complete formula call like rda(esp~x+y+z) but as I am running a loop I can not declare apriori the formula, so I am using the compressed form like rda(esp~.,env). Is there any way to solve this problem? >Gilson, Sounds like a scoping issue. We have had trouble with them, and usually when we fix one issue we create two. However, I cannot reproduce this one, but the following does not give any error message: for(i in 1:3) rda(dune ~ ., dune.env) We had a scoping issue in anova(..., by = "axis"), but it was fixed in vegan 2.0-5 (relased on Oct 8, 2012). Are you perhaps using an ancient version? Cheers, Jari Oksanen -- Jari Oksanen, Dept Biology, Univ Oulu, 90014 Finland