Conversation
…res` by serializing it, moving to extdata, and loading it via `load_ergm_res()`
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #55 +/- ##
==========================================
+ Coverage 56.30% 56.32% +0.02%
==========================================
Files 24 24
Lines 1920 1921 +1
==========================================
+ Hits 1081 1082 +1
Misses 839 839 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the package’s bundled ERGM example result object to avoid a namespace-reference error by moving it out of data/ and into inst/extdata/, and adds a small helper to load it for examples/tests.
Changes:
- Added
load_ergm_res()(exported) to load the serialized ERGM result frominst/extdata/ergm_res.rds. - Updated tests and examples to use
load_ergm_res()instead of relying on adata()dataset. - Removed
ergm_resfrom the “precooked datasets” documentation and bumped package version/date for 1.0.3.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
R/plot_convergence.R |
Adds load_ergm_res() and updates examples for ERGM convergence plotting. |
inst/extdata/ergm_res.rds |
Adds the serialized ERGM result used by load_ergm_res(). |
tests/testthat/test-plot_convergence.R |
Updates the ERGM diagnostics test to load the ERGM result via load_ergm_res(). |
R/data_precooked.R |
Removes roxygen dataset entry for ergm_res. |
man/made_earlier.Rd |
Drops ergm_res from the precooked datasets help page. |
man/plot_convergence.Rd |
Documents load_ergm_res() on the convergence plotting help page and updates examples. |
NAMESPACE |
Exports load_ergm_res. |
NEWS.md |
Adds 1.0.3 changelog entry describing this fix. |
DESCRIPTION |
Bumps version to 1.0.3 and updates the date. |
data/ergm_res.rda |
Removed (no longer shipped as a data() dataset). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #' @rdname plot_convergence | ||
| #' @export | ||
| load_ergm_res <- function() { | ||
| readRDS(file = system.file("extdata", "ergm_res.rds", package = "autograph")) |
Comment on lines
+85
to
+89
| #' @rdname plot_convergence | ||
| #' @export | ||
| load_ergm_res <- function() { | ||
| readRDS(file = system.file("extdata", "ergm_res.rds", package = "autograph")) | ||
| } |
|
|
||
| ## Plotting | ||
|
|
||
| - Fixed the error produced by a namespace reference in a call in `ergm_res` by serializing it, moving to extdata, and loading it via `load_ergm_res()` |
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.
…res
by serializing it, moving to extdata, and loading it viaload_ergm_res()`Description
Checklist: