introduce add_userdata() (#23) - #32
Conversation
* introduce add_userdata() * Update R/mcmc_info.R Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update R/mcmc_info.R Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Thank you for your contribution @gvegayon 🚀! The pkgdown site preview is ready for review 👉 Download here 👈! |
|
@copilot, can you add a test for the new function? You can use this file as a reference. For context, imagine you are an expert R programmer and Bayesian statistician. Keep the test simple, but also think about a couple of edge cases if possible. If needed, you can add caveats to the documentation using roxygen (and updating the Rd files using attn @dmi3kno |
* Initial plan * Add comprehensive tests for add_userdata() function - Fixed add_userdata() to handle single chain mcmc objects - Added examples to documentation with roxygen2 - Created 5 comprehensive test cases covering: * Basic single chain functionality * Multiple chain support * Data integrity verification * Error handling for mismatched chains * mcpar attribute preservation - Updated NAMESPACE and documentation files Co-authored-by: gvegayon <893619+gvegayon@users.noreply.github.com> * Fix test-userdata.R: remove incorrect [[1]] indexing for single chain mcmc objects Co-authored-by: gvegayon <893619+gvegayon@users.noreply.github.com> * Address PR review comments - Fix @PARAM x documentation to cover both ith_step() and add_userdata() - Add important note that add_userdata() relies on most recent MCMC() call - Rename combined_mcpar to combined_data for clarity in test - Add comment explaining global state dependency in Test 4 Co-authored-by: gvegayon <893619+gvegayon@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: gvegayon <893619+gvegayon@users.noreply.github.com>
|
OK @copilot, the CI is failing with the following error: Ensure you can run the test files and R CMD check before you submit the needed changes. |
* Initial plan * Fix test-userdata.R: compare against proposed values, not accepted values The test was incorrectly comparing userdata stored during MCMC proposal evaluation against the final accepted parameter values. Since set_userdata is called with the proposed value p (not the accepted value), the test should compare against get_draws() (proposed values) rather than the MCMC output (accepted values). Co-authored-by: gvegayon <893619+gvegayon@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: gvegayon <893619+gvegayon@users.noreply.github.com>
|
Test are passing. The Windows tests seem to be a bug related to the GHA to run R CMD check (I have experienced this before in other projects). Will leave that for later. |
No description provided.