Skip to content

Conversation

@FBartos
Copy link
Owner

@FBartos FBartos commented Nov 26, 2025

New Features

  • Added measure() function to list available performance measures
  • Added measure_mcse() function to list available performance measure MCSE functions.
  • Implemented S3 methods for measure() and measure_mcse() to retrieve specific functions (e.g., measure("bias"), measure_mcse("bias")).
  • Updated method() and dgm() to list available methods and DGMs when called without arguments.
  • Updated method() and dgm() to return the corresponding function when called with a single argument (e.g., method("RMA")).
  • measure(), measure_mcse(), method(), and dgm() now dynamically retrieve available options using methods().

@FBartos FBartos marked this pull request as ready for review November 27, 2025 08:58
Copilot AI review requested due to automatic review settings November 27, 2025 08:58
Copy link

Copilot AI left a 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() and measure_mcse() generic functions with S3 methods for all performance measures
  • Enhanced method() and dgm() 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.

@FBartos
Copy link
Owner Author

FBartos commented Nov 27, 2025

@copilot open a new pull request to apply changes based on the comments in this thread

Note that measure() is called within compute_measures() function when it needs to get the function

Copy link

Copilot AI commented Nov 27, 2025

@FBartos I've opened a new pull request, #7, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 3 commits November 27, 2025 11:11
* 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.
@FBartos FBartos merged commit 320851b into master Dec 5, 2025
6 checks passed
@FBartos FBartos deleted the Bobs-suggestions branch December 5, 2025 12:07
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