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

[Feature] cor_sort() can deal with non-square matrices #334

Merged
merged 26 commits into from
Dec 29, 2024

Conversation

DominiqueMakowski
Copy link
Member

@DominiqueMakowski DominiqueMakowski commented Dec 1, 2024

cor_sort() should be able to deal with non square matrices (whenever we correlate two different dataframes).

Currently the method is implemented only for raw R matrices.

Todo:

  • Improve tests: make sure it works with most outputs classes of correlation()
    • cor_sort(correlation::correlation())
    • cor_sort(summary(correlation()))
    • cor_sort(as.matrix(correlation()))
    • ...
  • Make it so that it works with outputs from the correlation() and summary(correlation()).

@strengejacke
Copy link
Member

fixed some lintrs and especially some issues with the print() methods, which were actually far beyond and out of scope of this PR, but anyway... Not sure about the exact machinery of the function, but looking at the code and the test you added, looks good to me!

@strengejacke
Copy link
Member

Not sure why the local test creates a different markdown snapshot than what is expected here on GitHub actions, but we can address that later.

@strengejacke strengejacke merged commit ac9ef1e into main Dec 29, 2024
12 of 22 checks passed
@strengejacke strengejacke deleted the cor_sort_improvements branch December 29, 2024 18:20
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.

2 participants