0

With this data frame grouping the response variables :

enter image description here

And this df grouping the explanatory variables :

enter image description here

I perform the vegan::rda like this :

fish_rda <- rda(fish ~ kJ_per_kg_GF + Condition(factor(annee)), data=df_rda)

But when I call summary(fish_rda), it returns this error message :

Error in if (all(vars >= 0)) cumsum(vars) else NA : missing value where TRUE/FALSE needed

I don't understand ...

Here, there is the output of the traceback function :

enter image description here

Someone to help me ?

Thank you

Loulou
  • 703
  • 5
  • 17
  • Please type `traceback()` after the error. It will print the path to the error message. The `summary` function for `rda` is not able to give this error message in **vegan**, but it must come from somewhere else. In general, we need a reproducible example to solve the problems. – Jari Oksanen Apr 28 '17 at 16:51
  • Please make your problem [reproducible](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). As it is, users can only speculate on possible issues. – Silence Dogood Apr 28 '17 at 17:07
  • I understand the need to reproduce the exemple. But this exemple seems to be a "special case" in which something doesn't work properly (maybe due to my proper data). That's why if I reproduce the exemple with a dataset of R (like iris data), the summary function will work – Loulou Apr 28 '17 at 20:37
  • I still wait for the output of `traceback()`: it will tell us *in which* function the error happened. – Jari Oksanen Apr 30 '17 at 04:16
  • It works ! The problem came from the condition variable. I deleted it and now the summary function works properly – Loulou May 01 '17 at 10:29
  • 2
    I think the problem is that with Condition() the constraints were completely aliased. Is this so? If you just look at the result (type `fish_rda`) there will be line `Constrained 0.0000 0.0000 0` which means that constraints did not explain anything after Conditions were partialled out. At least I could generate your error message in such a case. This is a bug in **vegan** and I'll fix it. – Jari Oksanen May 01 '17 at 16:23

0 Answers0