feat(r): add all base+utils in components for the R package#43
Merged
Neclow merged 1 commit intosbhattlab:mainfrom May 23, 2025
Merged
feat(r): add all base+utils in components for the R package#43Neclow merged 1 commit intosbhattlab:mainfrom
Neclow merged 1 commit intosbhattlab:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces several new functions and tests, expanding the Phylo2Vec R package and its Rust backend.
- Added tests for the new matrix conversion functions in test_base.R.
- Renamed and added several functions in the Rust backend and updated corresponding R wrapper functions and documentation.
- Updated package installation scripts and documentation to expose new APIs.
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/testthat/test_base.R | Added tests for converting matrices to Newick and back |
| tests/testthat/config.R | Updated test configuration constants |
| src/rust/src/lib.rs | Added new functions (sample_matrix, to_matrix, check_m, cophenetic functions) and renamed cophenetic_distances to cophenetic_from_vector |
| scripts/install-package.R | Modified the installation process to use devtools::install |
| man/*.Rd | Updated/added documentation for newly introduced functions and APIs |
| R/extendr-wrappers.R; R/base_newick.R; R/metrics.R | Added new wrapper functions and utility functions supporting new features |
| NAMESPACE | Updated exports to include new functions |
| R/utils.R | Added new sample_tree function |
| } | ||
|
|
||
| /// Sample a random tree via Phylo2Vec | ||
| /// Sample a random tree topoloy via Phylo2Vec |
There was a problem hiding this comment.
The word 'topoloy' appears to be a typo. Please change it to 'topology' for clarity.
Suggested change
| /// Sample a random tree topoloy via Phylo2Vec | |
| /// Sample a random tree topology via Phylo2Vec |
Comment on lines
+5
to
+10
| \title{Sample a random tree topoloy via Phylo2Vec} | ||
| \usage{ | ||
| sample_vector(n_leaves, ordered) | ||
| } | ||
| \description{ | ||
| Sample a random tree via Phylo2Vec | ||
| Sample a random tree topoloy via Phylo2Vec |
There was a problem hiding this comment.
There is a spelling error in the title ('topoloy'). Please correct it to 'topology'.
Collaborator
Author
There was a problem hiding this comment.
Will solve in a future commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.