Many Marks, Measures, Memberships, and Motifs for Networks
Overview
Many tools for calculating network, node, or tie marks, measures, motifs and memberships of many different types of networks. Marks identify structural positions, measures quantify network properties, memberships classify nodes into groups, and motifs tabulate substructure participation. All functions operate with all classes of network data covered in 'manynet', and on directed, undirected, multiplex, multimodal, signed, and other networks.
Package
- Raised
{manynet}floor to 2.3.4 - Replaced internal signed and multilevel helpers with
{manynet}'s own
Marks
- Improved
tie_is_path() - Fixed erroring on a signed 'stocnet', now runs over the positive ties alone
- Fixed erroring where no path exists
- Improved
tie_is_multiple()documentation to distinguish frommanynet::tie_is_parallel()
Measures
- Fixed
net_by_upperbound(),net_x_hierarchy(), andnode_by_distance()erroring on a signed 'stocnet' - Now consider only the positive ties
- Fixed
node_by_distance()scaling every distance to 0 where some node cannot be reached
Show all changes in 1.1.0Hide the rest of the changes in 1.1.0
- The scaled distances now divide by the largest finite distance, and unreachable nodes stay infinite, with a message
- Fixed
node_by_diversity()to not include ego when measuring alter diversity (closes #39) - Nodes without alters now return
NA - Fixed twomodes in
node_by_information(),net_by_spatial()etc by replacingto_multilevel()withmanynet::to_onemode()to create square matrices - Added
membership=tonet_by_diversity()for mean diversity by group weighted by size - Fixed
mode_by_eigenvector()erroring on multilevel networks (closes #23) - Fixed about 40 measures, memberships, marks, and motifs erroring on, or miscounting, CSSs
- Now combine reports into locally aggregated structures
- Tie-level functions still return one value per report
- Added
variant=tonode_by_transitivity()for Barrat, Onnela, or Zhang-Horvath weighted clustering - Weighted networks now use Barrat's coefficient by default;
variant = "watts"keeps the unweighted result - Improved
node_by_flow() - Fixed ignoring tie weights and erroring on two-mode networks
- Added
from=andto=for the maximum flow from or to a given node net_by_adhesion()now reads tie weights as capacities, returning weighted minimum cut- Signed networks now read by their positive ties alone
- Added
net_by_divergence()for networks' Hamming, Jaccard, or portrait divergence ideal=takes a network or anymanynet::create_*()ormanynet::generate_*()function- Falls back to portrait divergence where the networks' nodes differ
- Added
net_by_linkdensity()for the partition density of a tie membership
Memberships
- Fixed nodetie memberships returning
NAfor groups beyond the 702nd - Fixed single community algorithms erroring on a signed 'stocnet' (closes #32)
- Added
node_in_faction()for thekgroups, of any size, that come closest to separate cliques - Uses a tabu search, as the UCINET 'Factions' routine does
variant=scores the fit by"hamming"(default),"phi", or"modularity"- Added
search=tonode_in_block()for searching by"tabu"(default) or"iterated" - The tabu search lets positions take any size, where the iterated search held them near equal
- Partitions may therefore differ from earlier versions; pass
search = "iterated"to reproduce them - Added
tie_in_community()for link communities (Ahn et al. 2010), which group ties rather than nodes (closes #20) - A node belongs to every community one of its ties does, so nodes' communities can overlap
- Fixed twomodes in
node_in_partition(),node_in_regular()etc by replacingto_multilevel()withmanynet::to_onemode()to create square matrices - Improved the equivalence functions to compare nodes' profiles once, rather than twice, thanks @Kaladani (closes #29)
node_in_equivalence(),node_in_structural(),node_in_motif(), andnode_in_automorphic()now cluster the proximities between nodes' profiles directly, as documented and assna::equiv.clust()does- Memberships may therefore differ from earlier versions; pass
distance = "euclidean"to reproduce them - Added
proximity=to choose how profiles are compared, by default"pearson", from any measure inmanynet::to_proximity(), e.g."cosine","ruzicka", or"overlap" distance=is nowNULLby default; naming a distance compares nodes a second time on their dissimilarities, as before- Unbounded proximities such as
"count"or"crossmin"are subtracted from the largest proximity, with a message, rather than returning negative merge heights - A square census is now compared as the profile matrix it is, rather than as a one-mode network
node_in_regular()now clusters theregularity_*()similarity directly- Deprecated
cluster = "cosine"andcluster_cosine()in favour ofproximity = "cosine" cluster_hierarchical()now also returns the proximities it clustered as$proximity- Fixed
node_in_automorphic()erroring withk = "elbow"on weighted or unconnected networks - Nodes that cannot reach each other are now treated as one step further apart than the most distant nodes that can, with a message
- Improved
node_in_roulette(), with some implications fornode_in_block() - Now uses an iterated local search to improve the partition, rather than a single pass of greedy moves
- Weak moves now kept only if they improve the partition
- Strong perturbation now restarts from the best partition
- Improved speed by several times
- Improved
groups=to accept a vector of group sizes - Added
attribute=andbalance=to mix groups by a node attribute - Added
decay=to discount ties from earlier waves or times, by default uniform - Now stops with a message on a two-mode network
- Split the documentation of the non-hierarchical community algorithms into three pages, by the idea they share
?member_community_modular,?member_community_spread, and?member_community_partitionreplace?member_community_non?member_communitynow compares all the algorithms in one table
Methods
- Added
search_tabu()andsearch_iterated()for finding membership that minimises a cost
Motifs
- Fixed
net_x_stability()miscounting the ties that changed between networks ==bound after*, so it counted every absent tie, including self-ties, as changed- Now also counts undirected and weighted ties only once
- Fixed
net_x_correlation()requiring a second network (closes #27) - Now correlates consecutive waves of a longitudinal network
- Fixed
net_x_change()andnet_x_stability()on networks with missing ties - Fixed
node_x_path()on weighted networks to return shortest path lengths (Opsahl et al. 2010) - Was inverting tie weights, so every dyad without a tie was infinitely far apart
- Two-mode weighted networks now return a square matrix
- Improved
node_x_alters(), thanks @RWKrause (closes #39) - Added
direction=for out, in, reciprocated, or all (default) alters - Added
WeightedSum, each alter's value times the strength of the tie to it - Alters with missing values are now left out of the summary
- Nodes without alters of known value now return
NA, also if categorical - Two-mode attributes on one mode only are now read at distance two
- Signed ties now count by their magnitude
- Added
node_x_percolation()for overlapping communities by clique percolation (Palla et al. 2005) (closes #21)
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-06
- ERROR11 OK, 2 ERROR2026-08-29
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-01
Show 7 earlier changesHide 7 earlier changes
- ERROR12 OK, 1 ERROR2026-06-22
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- WARNING12 OK, 1 WARNING2026-06-07
- OK13 OK2026-04-08
- WARNING12 OK, 1 WARNING2026-04-05
- OK7 OK2026-03-27
Documentation
The repository also keeps web-only articles.
- Help pages
- 72 (1 internal)
- Examples that run
- 100%68 run in a plain check
- Exported functions with examples
- 94%
- Documented parameters
- 99%
- Return-value docs
- 100%
- Help pages citing references
- 69%
Downloads
Repository
- PRs merged (all time)
- 91%
- Median days to close, 50 most recently updated closed issues
- 22
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Releases over time
Issues over time
PRs over time
Commits over time
16 development-tooling and community-health practices detected across 8 families in the upstream repository
Checks run against github.com/stocnet/netrics on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows
GitHub Pages site last deployed 2026-10-17 · The repository has a site deploy workflow
pkgdown site last built 2026-10-17
Show all practicesHide 4 practices
This repository shows signs of AI coding tools.
- GitHub Copilotfirst seen 2026-02-28Pull request: opened by its own accountCommits: 15 by its own account
- Claude Codefirst seen 2026-04-25Seen in the repository: CLAUDE.mdNamed in .Rbuildignore: .claude, CLAUDE.mdCommits: at least 2 crediting it in the message
- Claude Opus 52 commits · Sep 2026
Dependencies
Installing netrics adds 26 packages (16 with compiled code, 26 MB of source tarballs). Heaviest: stringi 11 MB, igraph 4.8 MB, manynet 2.4 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.1.0Latest2026-10-05 · current release · diff ↗ ·
added 7 exports
net_by_divergence, net_by_linkdensity, node_in_faction, node_x_percolation, search_iterated, search_tabu, tie_in_community - 1.0.32026-09-09 · diff ↗
- 1.0.12026-08-31 · diff ↗ ·
added 27 exports
coreness_correlation, coreness_hub, coreness_rich, coreness_transition, net_by_bipartivity, net_by_compactness, net_by_cyclicality, net_by_decay, net_by_inconsistency, net_by_integration, net_x_homophily, node_by_core, node_by_decay, node_by_integration, node_by_radiality, node_in_block, node_in_labels, node_in_motif, node_x_alters, node_x_clique, node_x_similarity, node_x_ties, regularity_rege, regularity_rolesim, split_bins, split_kmeans, split_quantiles - 0.4.02026-07-24 · diff ↗ ·
added 6 exports
mode_by_betweenness, mode_by_closeness, mode_by_degree, mode_by_eigenvector, mode_by_indegree, mode_by_outdegree - 0.3.1
- RR 4.6.0 released · 2026-04-24
- 0.2.12026-04-06 · diff ↗
- 0.2.02026-03-26
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-03-26
- Total releases
- 7 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 4.8 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("netrics")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
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.