Methods

Package

  • Removed CRAN version check from .onAttach() making library(netrics) faster to attach
  • Fixed release workflow doubling actions/actions/checkout path segment
  • Updated GitHub Actions workflows to latest major action versions
  • Updated CONTRIBUTING to be clearer about documentation, website and NEWS conventions
  • Added roxygen templates to standardise argument vocabulary
    • param_cutoff
    • param_decay
    • param_times
    • param_variant
    • param_standardized
    • param_connectivity
  • Updated the website function overview to use the NEWS.md family headings
  • Updated the README to recommend installing the whole family via migraph

Measures

Memberships

  • Added k= to community detection functions to target a specific number of communities (thanks @tomasdiviak)
    • Hierarchical algorithms cut their dendrograms at k
    • node_in_louvain() and node_in_leiden() search the resolution parameter for the value that returns k
    • node_in_fluid() passes k straight to the algorithm, which also makes it much faster
    • node_in_labels() seeds k fixed labels and merges any surplus groups by modularity
    • node_in_partition() is now a k-way Kernighan-Lin, and no longer returns only two groups
    • node_in_community() considers only these algorithms when k is given
    • k also accepts "silhouette", "elbow", and "strict", as in node_in_equivalence()
    • Note k= is now positioned second, so positional calls must name arguments
  • Fixed node_in_fluid() and node_in_spinglass() aborting silently on disconnected networks
  • Added node_in_labels() for label propagation community detection
  • Renamed times= in node_in_walktrap() to steps=
  • Added consensus= to node_in_community() for combining partitions of all applicable algorithms
    • Runs each algorithm (stochastic ones times), then converges on common groupings
    • consensus = FALSE default, and ignored where network small enough for node_in_optimal()
    • Fixed returning nothing but an error whenever verbosity was not "verbose"
  • Renamed node_by_coreness() to node_by_core()
    • Fixed search starting points rather than random
    • Fixed it returning identical scores for a directed network and its reverse
    • Fixed it erroring on two-mode networks whose modes are of unequal size
  • Improved node_in_core()
    • Renamed centrality= to coreness=
      • "rich" by default for weighted, directed or two-mode networks
      • "correlation" otherwise
    • Adds direction= for directed networks
      • "Sender" for core out-ties and periphery in-ties
      • "Receiver" for core in-ties and periphery out-ties
    • Fixed sorting numbered middle labels alphabetically or from arbitrary cluster numbers
  • Improved node_in_equivalence() to announce the cluster_*() and k_*() used
  • Added node_in_block() for direct blockmodelling for partitions that minimise net_by_inconsistency()
  • Fixed node_in_regular() to compute regular equivalence correctly
    • Choose between regularity = "rolesim" (default) and "rege" for recursive similarity
    • Note existing scripts calling node_in_regular() will now return more correct results
    • Moved counting of motif types to node_in_motif(), though neither is Burt’s equivalence or an orbit-aware census (thanks @Kaladani)
  • Renamed Kmax= to max_k= in the community and equivalence functions
  • Renamed num_groups= to groups= in node_in_roulette()
  • Renamed cluster_by= to split= in node_in_core()
  • Added connectivity= to node_in_component() for weak as well as strong component membership
    • Defaults to "strong", so existing scripts are unaffected
    • Ignored for undirected networks, where the two notions coincide
    • Deprecated node_in_weak() and node_in_strong()

Motifs

  • Improved net_x_triad()
    • Added a mixed census for multiplex networks by folding in net_x_mixed()
    • Will fire by default for multiplex networks, taking layers by mode rather than by position
    • Deprecated net_x_mixed()
  • Added node_x_clique(), returning which maximal cliques each node belongs to
    • It branches on two-mode networks to find bicliques (closes #8, thanks @noortjemay)
    • Note that it considers only positive ties, since a clique is a cohesive subgroup
  • Improved node_x_tie()
  • Added node_x_ties(), describing the distribution of each node’s tie values
    • In a multiplex network it describes their spread across layers
  • Added node_x_alters() for describing composition of each node’s alters
  • Added node_x_similarity() for describing similarity of each node to its alters
    • For two-mode networks, compares each node with those at distance two
  • Added net_x_homophily() for the table behind the EI index against expected baseline

Methods

Tutorials

  • Updated position tutorial to use node_in_regular() for regular equivalence rather than the triad census
  • Updated topology tutorial with weighted, directed, and continuous core-periphery

Package

  • Fixed the website deploy job installing Config/Needs/check packages instead of Config/Needs/website, which meant learnr was never actually installed before the pkgdown deploy step

Tutorials

  • Added missing alt-text to the decorative gifs in the centrality tutorial’s article, which was failing pkgdown’s accessibility check
  • Fixed broken glossary references (equivalency, partition, faction) in the community tutorial that had no matching manynet glossary entry, which was breaking the tutorial’s article rendering
  • Added a section on Gould and Fernandez’s brokerage roles (node_x_brokerage() and net_x_brokerage()) to the position tutorial

Measures

Tutorials

  • Improved the centrality tutorial (netrics1) with a new interactive style, and added an article version to the website
    • Added more examples to the centrality tutorial for degree-style analysis of directed and weighted networks
    • Added extensions to the centrality tutorial’s betweenness, closeness, and eigenvector sections (the latter including power and influence)
    • Added a “which centrality?” section to the centrality tutorial
    • Improved the centrality tutorial by moving degree distribution and centralisation together and expanding the discussion
  • Improved the community tutorial (netrics2) with a new version
  • Improved the position tutorial (netrics3) with a new interactive style
    • Added sections introducing regular and automorphic equivalence in more detail to the position tutorial
    • Added a section on structural folds and ties that torture to the position tutorial
  • Improved the topology tutorial (netrics4) with a new interactive style
    • Added a section on degree mixing measures for characterising centralisation to the topology tutorial
    • Added a section on further generators, such as fire, islands, and citations, to the topology tutorial

Package

  • Updated manynet dependency to 2.1.2 to fix reverse dependency issue

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

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 %>%

Tutorials

  • Fixed object reference in position tutorial

Package

  • Updated logos

Tutorials

  • Updated centrality tutorial
  • Updated community tutorial
  • Updated position tutorial
  • Updated topology tutorial

Package

  • Added network analysis tutorials from manynet

Memberships

Package

  • Added roxygen2 parameter templates (param_attr, param_data, param_dir, param_memb, param_motf, param_norm, param_select) and net/node/tie-level templates (net_measure, net_motif, node_mark, node_measure, node_member, node_motif, tie_mark, tie_measure) for consistent function documentation.
  • Fixed startup messages.

Measures

  • Renamed node_adoption_time() to node_by_adopt_time()
  • Renamed node_thresholds() to node_by_adopt_threshold()
  • Renamed node_exposure() to node_by_adopt_exposure()
  • Renamed node_recovery() to node_by_adopt_recovery()
  • Separated centralisation scripts into different files per measure type (betweenness, closeness, degree, eigenvector) for easier maintenance, and into different documentation per level (node, tie) for better organization.
  • Updated and separated brokerage, diversity/assortativity, cohesion, closure, cliques, components, features, and hierarchy documentation by level.

Memberships

  • Separated node_in_community() documentation from the hierarchical and non-hierarchical community-detection algorithms.
  • Core documentation split into separate mark, measure, and member pages.
  • Improved various functions that rely on a membership argument to accept both a membership vector and a string identifier of a network attribute.

Motifs

  • Renamed net_by_change() to net_x_change() and related functions to reflect their motif (subgraph-counting) nature.

Methods

  • Added gap method for cluster k-selection in method_k().
  • Renamed model_k() to method_k() and related cluster-selection utilities renamed for clarity.

Release notes

netrics 0.1.0 is the first formal release of the package as a standalone analytic engine for the stocnet ecosystem. The analytic functions — marks, measures, motifs, and memberships — have been extracted from manynet and migraph into this dedicated package, with consistent naming conventions and a range of bug fixes.

New naming conventions

All functions now follow a consistent verb–object–qualifier naming scheme:

  • Marks (node_is_*(), tie_is_*()): logical vectors identifying which nodes or ties hold a particular structural property.
  • Measures (*_by_*()): numeric vectors at the network (net_by_*()), node (node_by_*()), or tie (tie_by_*()) level.
  • Motifs (*_x_*()): tabular counts of nodes’ or networks’ participation in structural sub-patterns.
  • Memberships (*_in_*()): categorical vectors assigning nodes to groups (components, communities, equivalence classes, etc.).

Functions previously named with other prefixes (e.g. node_centrality_*, net_cohesion_*, node_equivalency_*) have been renamed to follow the *_by_*() / *_x_*() / *_in_*() convention. tie_by_cohesion() now correctly returns a tie_measure class object.

Functions moved from {manynet} / {migraph}

The following groups of functions have been moved into netrics:

Measures

Bug fixes