A Collection of Tools for Network Analysis
Overview
Provides a collection of network analytic (convenience) functions which are missing in other standard packages. This includes triad census with attributes doi:10.1016/j.socnet.2019.04.003, core-periphery models doi:10.1016/S0378-8733(99)00019-2, and several graph generators. Most functions are build upon 'igraph'.
This release fixes a number of bugs found in a code review. Some fixes change results, notably dyad_census_attr(), triad_census_attr() (030C orientations), graph_cor() (diagonal now excluded by default) and sample_lfr() (now uses R's random number generator).
dyad_census_attr()fixed: asymmetric dyads were dropped when a group pair had edges in one direction only, and within-group asymmetric dyads were always reported as 0. Named vertices returned all zeros and graphs without edges errored. Within-group rows now report the total asymmetric count inasym_abandNAinasym_ba. Multiple edges and loops are ignored.dyad_census_attr()andtriad_census_attr()now validate that the vertex attribute holds positive integers without missing values.triad_census_attr()rewritten: it now runs in roughly O(m * max degree) instead of O(n^3), e.g. seconds instead of hours for thousands of nodes.triad_census_attr()fixed: the two orientations of cyclic triads (030C) with three distinct attributes were merged intoT030C-abc;T030C-cbais now counted correctly. With more than nine attribute values, names are separated by dots (T030C-1.2.10) to avoid ambiguous labels. Multiple edges and loops are ignored.- dropped the RcppArmadillo dependency.
str.igraph()no longer fails for graphs with a single edge and only appends "..." to truncated attributes.bipartite_from_data_frame()now handles numeric and factor columns (they were used as vertex ids or factor codes), and merging multiple edges no longer fails with non-numeric edge attributes.structural_equivalence()now works with multiple edges and no longer needs memory quadratic in the number of vertices.sample_coreseq()now rejects impossible coreness sequences (a k-core needs at least k + 1 nodes) and invalid input.graph_cartesian()andgraph_direct()keep vertex pairs without edges, and are vectorized.as_adj_list1()now returns all neighbors of directed graphs, as documented (it returned only out-neighbors).
Show all changes in 1.0.0Hide the rest of the changes in 1.0.0
graph_cor()now excludes the diagonal by default, the standard definition of graph correlation. Usediag = TRUEfor the previous behavior. For igraph objects, the newattrargument selects an edge attribute as weights.graph_kpartite()now usesigraph::make_full_multipartite(), errors if the partition sizes do not sum tonand stores the partition in the vertex attributetype. The documentation now correctly says it creates a complete k-partite graph.graph_from_multi_edgelist()stores theweightcolumn as edge attributeweight, so the graphs are weighted, and validates it.split_graph()validatescore.as_adj_weighted(),as_multi_adj(),graph_cor()andcore_periphery()work with the upcoming igraph 3.0.0 and keep using unweighted adjacency matrices unless an edge attribute is given.- removed the internal, unexported
fast_cliques(). - requires igraph >= 2.3.0.
sample_pa_homophilic()is faster, validates its input and has working examples; results for a given seed are unchanged.core_periphery(method = "SA")now actually runs the GA method as announced in its deprecation warning (it returned nothing before).sample_lfr()now uses R's random number generator, so results are reproducible withset.seed()(before,set.seed()had no effect).sample_lfr()with overlapping nodes (on > 0) now works (it errored before):V(g)$membershipholds the first community of each vertex and the new list attributeV(g)$membershipsholds all communities of each vertex.sample_lfr()now reports invalid parameter combinations detected by the generator as informative R errors instead of "negative length vectors are not allowed", validateson,om,min_communityandmax_community, and is silent unless the newverbose = TRUEis set. It warns if the degree sequence had to be changed.sample_lfr()can be interrupted and no longer risks endless loops when rewiring links. Unused C++ code of the LFR generator was removed.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-08
- ERROR12 OK, 1 ERROR2026-06-07
- OK14 OK2026-04-22
Show 2 earlier changesHide 2 earlier changes
- ERROR13 OK, 1 ERROR2026-04-18
- OK14 OK2026-03-10
Documentation
- Help pages
- 21
- Examples that run
- 100%16 run in a plain check
- Exported functions with examples
- 80%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 29%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 4
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
Commits over time
9 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/schochastics/netutils on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-30 · The repository has a site deploy workflow
pkgdown site last built 2026-09-30
This repository shows signs of AI coding tools.
- Claude Codefirst seen on or before 2026-09-30Pull request it wrote: opened by a project memberCommits: at least 7 crediting it in the message
- Claude Opus 5.57 commits · Sep 2026
Dependencies
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.0.0Latest
- 0.8.62026-06-12 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 0.8.52026-04-14 · diff ↗
- 0.8.42026-01-24 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 0.8.3
- RR 4.4.0 released · 2024-04-24
- 0.8.22023-06-29 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.8.12022-12-19 · diff ↗
- 0.8.0
- 0.7.02022-08-27
- RR 4.2.0 released · 2022-04-22
Package metadata
- First published
- 2022-08-27
- Total releases
- 9 / 4 yrs
- License
- MIT + file LICENSE OSI
- Download size
- 66 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("netUtils")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.