Skip to content

v0.3.0#14

Merged
jhollway merged 11 commits into
mainfrom
develop
Jun 19, 2026
Merged

v0.3.0#14
jhollway merged 11 commits into
mainfrom
develop

Conversation

@jhollway

@jhollway jhollway commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Description

Package

  • Improved docs/examples to use base R pipe (|>) instead of magrittr's %>%
  • Improved dependency requirements (R >= 4.1.0)
  • Improved startup messages to be more succinct

Measures

  • Fixed node_by_homophily() to work when attribute is provided as a vector (e.g., a membership vector)
  • Improved node_by_homophily() to avoid calling as_igraph() multiple times

Motifs

  • Fixed net_x_hazard() to use diff_model$t for naming the returned data frame columns, rather than the deprecated diff_model$time

Tutorials

  • Updated topology tutorial to use base R pipe (|>) instead of magrittr's %>%
  • Updated centrality tutorial to use base R pipe (|>) instead of magrittr's %>%

Checklist:

  • Documentation
    • DESCRIPTION file version is bumped by the appropriate increment (major, minor, patch)
    • Date in DESCRIPTION is correct
    • Longer functions are commented inline or broken down into helper functions to help debugging
  • PR form
    • Title indicates expected version number
    • PR description above and the NEWS.md file are aligned
    • Description above itemizes changes under subsection titles, e.g. "## Data"
    • Closed, fixed, or related issues are referenced and explained in the description above, e.g. "Fixed #0 by adding A"

Copilot AI and others added 8 commits June 17, 2026 14:34
When a vector attribute (e.g. from node_in_community()) is passed to
node_by_homophily(), it must be subsetted to match the nodes in each
ego subgraph before being passed to net_by_homophily(). Previously,
the full attribute vector was passed, causing "non-conformable arrays"
errors when computing outer products with the smaller subgraph matrix.

Closes #12
Copilot AI review requested due to automatic review settings June 19, 2026 19:35

Copilot AI left a comment

Copy link
Copy Markdown

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 appears to prepare the netrics R package for the v0.2.4 release by migrating examples/docs toward the base R pipe (|>), tightening dependency requirements (R >= 4.1.0), and refreshing/generated documentation. It also adjusts homophily measurement to accept vector attributes and adds a regression test for that behavior.

Changes:

  • Add a test ensuring node_by_homophily() works when attribute is provided as a vector (e.g., a membership vector).
  • Replace many %>% pipelines in package code/docs with |> and remove the %>% re-export/documentation.
  • Update DESCRIPTION (version + dependency floor) and regenerate/clean up Rd and NAMESPACE entries.

Reviewed changes

Copilot reviewed 64 out of 79 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/testthat/test-measure_nodes.R Adds a regression test for node_by_homophily() with vector attributes.
R/zzz.R Tweaks startup CLI tips text.
R/motif_census.R Fixes hazard motif naming to use diff_model$t.
R/motif_brokerage.R Converts a dplyr pipeline from %>% to `
R/member_equivalence.R Formatting/indentation cleanup only.
R/member_core.R Updates examples to use `
R/member_components.R Updates examples to use `
R/measure_heterogeneity.R Updates node_by_homophily() to accept vector attributes.
R/measure_diffusion.R Converts several pipelines from %>% to `
R/measure_centrality_closeness.R Updates examples to use `
R/measure_centrality_between.R Updates examples to use `
R/mark_ties.R Updates examples to use `
R/mark_nodes.R Converts pipelines to `
R/class_metrics.R Removes %>% re-export roxygen block.
NAMESPACE Removes export("%>%") and changes dplyr imports.
man/reexports.Rd Removes generated re-export documentation for %>%.
man/motif_periods.Rd Fixes manynet link target + whitespace/seealso formatting.
man/motif_path.Rd Fixes manynet link target + whitespace/seealso formatting.
man/motif_node.Rd Fixes manynet link target + whitespace/seealso formatting.
man/motif_net.Rd Fixes manynet link target + whitespace/seealso formatting.
man/motif_hierarchy.Rd Fixes manynet link target + whitespace/seealso formatting.
man/motif_hazard.Rd Fixes manynet link target + whitespace/seealso formatting.
man/motif_exposure.Rd Fixes manynet link target + whitespace/seealso formatting.
man/motif_brokerage_node.Rd Fixes manynet link target + whitespace/seealso formatting.
man/motif_brokerage_net.Rd Fixes manynet link target + whitespace/seealso formatting.
man/method_kselect.Rd Fixes manynet link target.
man/method_cluster.Rd Fixes manynet link target.
man/member_equivalence.Rd Fixes manynet link target + whitespace/seealso formatting.
man/member_diffusion.Rd Fixes manynet link target + whitespace/seealso formatting.
man/member_core.Rd Fixes manynet link target + whitespace/seealso formatting.
man/member_components.Rd Fixes manynet link target + converts example pipes + seealso formatting.
man/member_community.Rd Fixes manynet link target + whitespace/seealso formatting.
man/member_community_non.Rd Fixes manynet link target + whitespace/seealso formatting.
man/member_community_hier.Rd Fixes manynet link target + whitespace/seealso formatting.
man/member_cliques.Rd Fixes manynet link target + whitespace/seealso formatting.
man/member_brokerage.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_periods.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_hierarchy.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_fragmentation.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_features.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_diverse_node.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_diverse_net.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_diffusion_node.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_diffusion_net.Rd Whitespace/seealso formatting.
man/measure_diffusion_infection.Rd Whitespace/seealso formatting.
man/measure_core.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_cohesion.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_closure.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_closure_node.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_centralities_eigen.Rd Fixes manynet link target + updates to_undirected link + seealso formatting.
man/measure_centralities_degree.Rd Fixes manynet link target + updates to_undirected link + seealso formatting.
man/measure_centralities_close.Rd Fixes manynet link target + converts example pipe + updates to_undirected link + seealso formatting.
man/measure_centralities_between.Rd Fixes manynet link target + converts example pipe + updates to_undirected link + seealso formatting.
man/measure_centralisation_eigen.Rd Fixes manynet link target + updates to_undirected link + seealso formatting.
man/measure_centralisation_degree.Rd Fixes manynet link target + updates to_undirected link + seealso formatting.
man/measure_centralisation_close.Rd Fixes manynet link target + updates to_undirected link + seealso formatting.
man/measure_centralisation_between.Rd Fixes manynet link target + updates to_undirected link + seealso formatting.
man/measure_central_eigen.Rd Fixes manynet link target + updates to_undirected link + seealso formatting.
man/measure_central_degree.Rd Fixes manynet link target + seealso formatting.
man/measure_central_close.Rd Fixes manynet link target + updates to_undirected link + seealso formatting.
man/measure_central_between.Rd Fixes manynet link target + updates to_undirected link + seealso formatting.
man/measure_brokerage.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_broker_tie.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_broker_node.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_breadth.Rd Fixes manynet link target + whitespace/seealso formatting.
man/measure_assort_node.Rd Fixes manynet link target + equation formatting + seealso formatting.
man/measure_assort_net.Rd Fixes manynet link target + equation formatting + seealso formatting.
man/mark_triangles.Rd Fixes manynet link target + converts example pipes + seealso formatting.
man/mark_ties.Rd Fixes manynet link target + converts example pipe + seealso formatting.
man/mark_select_tie.Rd Fixes manynet link target + seealso formatting.
man/mark_select_node.Rd Fixes manynet link target + seealso formatting.
man/mark_nodes.Rd Fixes manynet link target + seealso formatting.
man/mark_dyads.Rd Fixes manynet link target + seealso formatting.
man/mark_diff.Rd Fixes manynet link target + seealso formatting.
man/mark_degree.Rd Fixes manynet link target + seealso formatting.
man/mark_core.Rd Fixes manynet link target + converts example pipe + seealso formatting.
inst/tutorials/tutorial6/topology.Rmd Updates tutorial pipelines to use `
inst/tutorials/tutorial3/centrality.Rmd Updates some tutorial pipelines/verbs (e.g., rename_nodes) and converts one code chunk to `
DESCRIPTION Bumps version to 0.2.4, raises minimum R/manynet versions, adds Config/roxygen2/version.
Files not reviewed (13)
  • man/mark_core.Rd: Generated file
  • man/mark_degree.Rd: Generated file
  • man/mark_diff.Rd: Generated file
  • man/mark_dyads.Rd: Generated file
  • man/mark_nodes.Rd: Generated file
  • man/mark_select_node.Rd: Generated file
  • man/mark_select_tie.Rd: Generated file
  • man/mark_ties.Rd: Generated file
  • man/mark_triangles.Rd: Generated file
  • man/measure_assort_net.Rd: Generated file
  • man/measure_assort_node.Rd: Generated file
  • man/measure_breadth.Rd: Generated file
  • man/measure_broker_node.Rd: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread NAMESPACE
Comment thread NAMESPACE
Comment thread R/measure_heterogeneity.R Outdated
@jhollway jhollway changed the title v0.2.4 v0.3.0 Jun 19, 2026
@jhollway jhollway merged commit 5f885a5 into main Jun 19, 2026
0 of 3 checks passed
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.

3 participants