Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
=======================================
Coverage 81.95% 81.95%
=======================================
Files 24 24
Lines 2394 2394
=======================================
Hits 1962 1962
Misses 432 432 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR prepares the netrics v0.2.2 release by bumping package metadata and aligning the learnr tutorials with the current netrics API naming (e.g., *_by_*, *_x_*, *_in_*).
Changes:
- Bumped package version/date and added a v0.2.2 entry to
NEWS.md. - Updated multiple tutorials to use
netricsfunction names (net_by_*,node_by_*,node_x_*, etc.). - Updated the rendered tutorial HTML for the position tutorial to reflect the Rmd changes.
Reviewed changes
Copilot reviewed 6 out of 12 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| inst/tutorials/tutorial6/topology.Rmd | Updates topology tutorial code/examples to netrics function names (including hierarchy motif and cohesion measures). |
| inst/tutorials/tutorial5/position.Rmd | Updates position/equivalence tutorial to netrics naming (bridges/constraint, structural equivalence census). |
| inst/tutorials/tutorial5/position.html | Re-rendered HTML output reflecting tutorial updates (learnr/rmarkdown dependency versions and content). |
| inst/tutorials/tutorial4/community.Rmd | Updates cohesion/community tutorial to netrics naming (density, reciprocity/transitivity, modularity, components). |
| inst/tutorials/tutorial3/centrality.Rmd | Updates centrality tutorial to netrics naming for node centralities and network centralization measures. |
| NEWS.md | Adds release notes for v0.2.2. |
| DESCRIPTION | Bumps version/date to 0.2.2 / 2026-04-24. |
Comments suppressed due to low confidence (1)
inst/tutorials/tutorial5/position.Rmd:70
- This sentence claims
ison_algebrais included in{netrics}, but the very next hints/solution load it from{manynet}(data(..., package = "manynet")andmanynet::ison_algebra). Sincenetricsdoesn’t appear to ship this dataset, please revert the text to{manynet}(or change the code to load from{netrics}if you intend to add/re-export the dataset).
For this session, we're going to use the "ison_algebra" dataset included in the `{netrics}` package.
Do you remember how to call the data?
Can you find out some more information about it via its help file?
```{r data, exercise = TRUE, purl = FALSE}
# Let's call and load the 'ison_algebra' dataset
data("ison_algebra", package = "manynet")
# Or you can retrieve like this:
ison_algebra <- manynet::ison_algebra
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
345
to
347
| ison_brandes %>% | ||
| mutate_nodes(color = node_is_max(node_closeness())) %>% | ||
| mutate_nodes(color = node_is_max(node_by_closeness())) %>% | ||
| graphr(node_color = "color") |
|
|
||
| ```{r dens-solution} | ||
| net_density(tasks) | ||
| net_by_density(tasks) |
| ```{r nodecoren, exercise=TRUE, purl = FALSE, exercise.setup="gnet"} | ||
| lawfirm %>% | ||
| mutate(ncn = node_kcoreness()) %>% | ||
| mutate(ncn = node_by_kcoreness()) %>% |
| @@ -504,12 +504,12 @@ question("There a statistically significant association between the core assignm | |||
| An alternative route is to identify 'core' nodes | |||
| depending on their `r gloss("k-coreness","kcoreness")`. | |||
| In `{manynet}`, we can return nodes _k_-coreness | |||
Comment on lines
341
to
343
| ison_brandes %>% | ||
| mutate_nodes(color = node_is_max(node_betweenness())) %>% | ||
| mutate_nodes(color = node_is_max(node_by_betweenness())) %>% | ||
| graphr(node_color = "color") |
|
|
||
| ison_brandes %>% | ||
| mutate_nodes(color = node_is_max(node_eigenvector())) %>% | ||
| mutate_nodes(color = node_is_max(node_by_eigenvector())) %>% |
Comment on lines
+221
to
223
| Fortunately, we can use functions from `{netrics}` to help calculate the | ||
| `r gloss("betweenness")`, `r gloss("closeness")`, and `r gloss("eigenvector")` centralities for each node in the network. | ||
| Let's collect the vectors of these centralities for the `ison_brandes` dataset: |
Comment on lines
+651
to
+652
| node_in_component(blogs) | ||
| node_in_component(to_undirected(blogs)) |
Comment on lines
+215
to
216
| `{netrics}` makes this easy enough with the `node_by_constraint()` function. | ||
|
|
Comment on lines
337
to
339
| ison_brandes %>% | ||
| mutate_nodes(color = node_is_max(node_degree())) %>% | ||
| mutate_nodes(color = node_is_max(node_by_degree())) %>% | ||
| graphr(node_color = "color") |
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.
Description
Package
Tutorials
Checklist: