Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in decorana function #401

Open
x1e5c opened this issue Mar 8, 2021 · 1 comment
Open

error in decorana function #401

x1e5c opened this issue Mar 8, 2021 · 1 comment

Comments

@x1e5c
Copy link

x1e5c commented Mar 8, 2021

I tested decorana using flowing inputs:

library(vegan)

data1 = rbind(c(380139.271715,233548.347689, 159987.333248, 75463.3904807), 
              c(363355.399539, 207781.688783, 178292.465773, 67177.4662846),
              c(239414.980601, 111431.550896, 179458.038921, 23743.377203))
decorana(data1)

data2 = rbind(c(380139.271715,233548.347689, 159987.333248), 
              c(363355.399539, 207781.688783, 178292.465773),
              c(239414.980601, 111431.550896, 179458.038921))
decorana(data2)

4 columns for data1 , 3 columns for data2 which is subset of data1.

decorana(data1) produced the results as expected. But decorana(data2) got the flowing error info:

Error in cov.wt(CA$rproj, aidot, method = "ML") : 
  'x' must contain finite values only
Calls: decorana -> diag -> cov.wt

Is there some rules for inputs?

jarioksa added a commit that referenced this issue Mar 8, 2021
Instead of zero, the Fortran code could return NaN. This was reported
in github issue #401 with example:
data2 = rbind(c(380139.271715,233548.347689, 159987.333248),
              c(363355.399539, 207781.688783, 178292.465773),
              c(239414.980601, 111431.550896, 179458.038921))
decorana(data2)
@jarioksa
Copy link
Contributor

jarioksa commented Mar 8, 2021

Fixed in github (commit 493aa1b).

jarioksa added a commit that referenced this issue Jul 11, 2022
data sets like matrix(runif(20*3), nrow=20) or issue #401 are
now handled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants