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

Functions should recognize distances given as a symmetric square matrix #149

Closed
5 tasks done
jarioksa opened this issue Nov 16, 2015 · 1 comment
Closed
5 tasks done
Milestone

Comments

@jarioksa
Copy link
Contributor

Some dissimilarity-based functions accept either a "dist" structure or rectangular data from which they calculate the dissimilarities internally. If user supplies the dissimilarities as a symmetric square matrix, this will not be recognized as dissimilarities but is regarded as raw data, and function can calculate dissimilarities of dissimilarities. Several functions already check their input and are able identify symmetric square matrices and handle these as dissimilarities, but many functions assume users do the right thing. This was behind one current issue #147, but it concerns several functions.

The following functions should be fixed:

  • adonis
  • adonis2 (not in cran-2.3)
  • capscale
  • dbrda (not in cran-2.3)
  • mso (assumes object.xy are coordinates, but can be distances)

The following already do the right thing, but some could still be do it better: anosim (could be cleaned), bioenv.default, metaMDSdist (needs more robust test instead of ==), metaMDS (like previous), monoMDS(cleaner test), mrpp (uses ==), pcnm (does not test symmetry, only squareness).

@jarioksa jarioksa added the bug label Nov 16, 2015
@jarioksa jarioksa added this to the v2.3-2 milestone Nov 16, 2015
@jarioksa jarioksa added enhancement and removed bug labels Nov 16, 2015
@jarioksa
Copy link
Contributor Author

Closed via 3d27f78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant