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

Aitchison distance, clr transformation, and their robust variants #458

Merged
merged 12 commits into from
Jan 11, 2022

Conversation

antagomir
Copy link
Contributor

This PR solves #433 and provides:

New transformation to vegan::decostand:

  • CLR transformation ("clr")
  • robust CLR transformation ("rclr")

New distance to vegan::vegdist:

  • Aitchison distance ("aitchison")
  • robust Aitchison distance ("aitchison_robust")

These options are documented, references and unit tests have been provided. The automated build & checks seem to go through.

Remaining questions:

  • Are contributors listed in DESCRIPTION (I could add this to the PR)? The newer formats often include authors with different roles in this file (see here), like "creator", "author", "contributor" etc. But the current system does not use this format so I am not sure. Can also add an update to the full author listing format, if this is desirable and could fit in the same PR.
  • NEWS file update? Would require opening up a new section with an updated version number.
  • Any other issues, happy to fix!

Also thanks to the colleagues Felix Ernst & Tuomas Borman for contributions to the code via the mia package, from which these were transferred and modified.

@jarioksa
Copy link
Contributor

jarioksa commented Jan 11, 2022

This looks OK for a merge. There is one bug, but I'll fix that after merge (vegdist.R needs {} after if() when you have more than one statement – R is not python where indentation defines the block structure). (Or you can do it if you wish: I'll delay merge in case you want to make the fix.)

As to authors in DESCRIPTION: I'll re-write it to use Authors@R and then when we can update author information more easily. We have discussed this with @gavinsimpson , but we have just been lazy for the change. Wait for that.

Thanks for the contribution!

@antagomir
Copy link
Contributor Author

Cool, I added curly brackets now, I hope I didn't miss any. Looking fwd to seeing this in CRAN and taking into use in other pkgs - !

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

Successfully merging this pull request may close these issues.

None yet

2 participants