Skip to content

netUtils

1.0.0Package record

A Collection of Tools for Network Analysis

0packages depend
5.7Kdownloads / year
89.9%test coverage
13/13flavors OK

Overview

About

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'.

Changes in 1.0.0

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 in asym_ab and NA in asym_ba. Multiple edges and loops are ignored.
  • dyad_census_attr() and triad_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 into T030C-abc; T030C-cba is 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() and graph_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. Use diag = TRUE for the previous behavior. For igraph objects, the new attr argument selects an edge attribute as weights.
  • graph_kpartite() now uses igraph::make_full_multipartite(), errors if the partition sizes do not sum to n and stores the partition in the vertex attribute type. The documentation now correctly says it creates a complete k-partite graph.
  • graph_from_multi_edgelist() stores the weight column as edge attribute weight, so the graphs are weighted, and validates it.
  • split_graph() validates core.
  • as_adj_weighted(), as_multi_adj(), graph_cor() and core_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 with set.seed() (before, set.seed() had no effect).
  • sample_lfr() with overlapping nodes (on > 0) now works (it errored before): V(g)$membership holds the first community of each vertex and the new list attribute V(g)$memberships holds 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", validates on, om, min_community and max_community, and is silent unless the new verbose = TRUE is 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

CRAN checks
13OK
Slowest check: 3.5 min · r-devel-windows-x86_64
Status changes
  • 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
Advisories

none known

Documentation

In release 1.0.0
READMEYes · 250 wordsVignettesNoNEWSYes · 100% structured · mentions 1.0.0Citation fileYes · software entry onlyWebsiteYes · pkgdown
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

5.7K
CRAN downloads in the past year
Rank #5,796 · ~15/day · ~471/mo
Daily download trend is not available in this view yet.
58330 days
1.4K90 days
5.7K1 year
Compare downloads with other packages →
Also on410 r2u2 autocran

Repository

15Stars
2Forks
1Open issues
0Open PRs
2Releases
122Commits
2Commit identities
network-analysisrstatsrstats-package
122 commits · Last activity 2026-09-30 · 0% stars, 30d
Responsiveness
How these are sampled
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

2024-09-11 · 142026-07-07 · 15
PracticesBeta

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.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-09-30 · The repository has a site deploy workflow

pkgdown site last built 2026-09-30

Coverage (1)
Coverage reporting
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen on or before 2026-09-30
    Pull request it wrote: opened by a project member
    Commits: at least 7 crediting it in the message
Models named in its commits
  • Claude Opus 5.57 commits · Sep 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
6 external dependencies (excludes base and recommended)

Installing netUtils adds 10 packages (7 with compiled code, 9.8 MB of source tarballs). Heaviest: igraph 4.8 MB, Rcpp 1.8 MB, vctrs 1.0 MB.

Depends (0)
none
Imports (3)
LinkingTo (1)
Suggests (3)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (1)
Author, Maintainer since 0.7.0 (2022)
Releases (9)

Pick two releases to compare their code metrics.

  • 1.0.0Latest
    record
    2026-09-30 · current release · diff ↗
  • 0.8.6
    record
    2026-06-12 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 0.8.5
    record
    2026-04-14 · diff ↗
  • 0.8.4
    record
    2026-01-24 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 0.8.3
    record
    2024-10-10 · diff ↗ ·
    removed 1 export
    fast_cliques
  • R
    R 4.4.0 released · 2024-04-24
  • 0.8.2
    record
    2023-06-29 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 0.8.1
    record
    2022-12-19 · diff ↗
  • 0.8.0
    record
    2022-10-08 · diff ↗ ·
    added 3 exports
    dyad_census_attr, reciprocity_cor, sample_lfr
  • 0.7.0
    record
    2022-08-27
  • R
    R 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
Appears in task views

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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for netUtils version 1.0.0 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy