-
Notifications
You must be signed in to change notification settings - Fork 1
additional suggestions #6
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces utility functions for dynamically discovering and retrieving performance measures, methods, and data-generating mechanisms (DGMs) in the package. The main additions include measure() and measure_mcse() functions that use S3 method dispatch to list available measures and retrieve their implementations, mirroring similar functionality added to method() and dgm(). These changes reduce code duplication and make the package more maintainable. Additionally, spelling corrections ("environmental" → "environment") were applied throughout.
- Added
measure()andmeasure_mcse()generic functions with S3 methods for all performance measures - Enhanced
method()anddgm()to support listing and retrieval functionality - Refactored
compute_measures()to use the new dynamic lookup system instead of hardcoded lists
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| R/measures.R | Added measure() and measure_mcse() generic functions with S3 methods for all 13 performance measures |
| R/measures_compute.R | Refactored to use new measure() and measure_mcse() functions, removing hardcoded measure list |
| R/method.R | Added listing and retrieval logic when called without required arguments |
| R/dgm.R | Added listing and retrieval logic when called without required arguments |
| R/utilities.R | Fixed spelling: "environmental" → "environment" and removed trailing whitespace |
| R/download.R | Fixed spelling: "environmental" → "environment" |
| man/measure.Rd | Documentation for new measure() function |
| man/measure_mcse.Rd | Documentation for new measure_mcse() function |
| NEWS.md | Updated changelog for version 0.1.3 |
| NAMESPACE | Added exports for new functions and S3 methods |
| DESCRIPTION | Version bump to 0.1.3 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
|
@copilot open a new pull request to apply changes based on the comments in this thread Note that |
* Initial plan * Apply code review feedback: consistent API design and improved error handling Co-authored-by: FBartos <[email protected]> * Update R/measures_compute.R --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: FBartos <[email protected]>
Updated documentation in method-RoBMA.R, REFERENCES.bib, and method.RoBMA.Rd to describe the use of multilevel parameterization when a 'study_id' column is present, referencing Bartos et al. (2025). Added the corresponding bibliographic entry.
New Features
measure()function to list available performance measuresmeasure_mcse()function to list available performance measure MCSE functions.measure()andmeasure_mcse()to retrieve specific functions (e.g.,measure("bias"),measure_mcse("bias")).method()anddgm()to list available methods and DGMs when called without arguments.method()anddgm()to return the corresponding function when called with a single argument (e.g.,method("RMA")).measure(),measure_mcse(),method(), anddgm()now dynamically retrieve available options usingmethods().