[R] Vegan problem

Jari Oksanen jari.oksanen at oulu.fi
Sun May 5 07:14:09 CEST 2013


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



More information about the R-help mailing list