Skip to contents

The goal of netkit is to provide a comprehensive and user-friendly toolkit for network-based data analysis, particularly for biological systems analysis. It includes tools for flexible graph annotation, topological analysis, network visualization, and diffusion-based signal propagation.

What it does

Analysis functions return a named list with a consistent vocabulary — plot, result, graph, method — which is what lets them chain:

g <- node_metrics(g)$graph        # eleven metrics as vertex attributes
g <- find_hubs(g)$graph           # plus is_hub
g <- find_modules(g)$graph        # plus module
robustness_analysis(g, removal_strategy = "pagerank")

At the console those results print as a summary — what was computed, the head of the table, and the shape of everything else — rather than as a dump of the whole graph. The objects are still plain lists; unclass() restores the default output.

Edge weights

Every function that can use edge weights takes weights and a weight_type declaring whether the values are a strength (confidence scores, correlations — larger means more tightly connected) or a distance (costs, dissimilarities — larger means further apart). netkit ignores edge weights unless asked, and warns when a graph carries a weight attribute it is ignoring.

That is deliberate, and differs from plain igraph, which reads the attribute automatically while giving it opposite meanings in different functions — a cost in betweenness() and distances(), a strength in cluster_louvain(). See vignette("weighted-networks").

With a special scope to generate high-quality and interpretable figures suitable for publication, most of the functions generate both tabular results and diagnostic plots. Altogether, netkit is designed to help researchers explore, interpret, and visualize complex networks with minimal friction and maximum insight.

Installation

You can install the development version of netkit from GitHub using the devtools or remotes package:

# If not already installed:
install.packages("devtools")

# Install netkit from GitHub
devtools::install_github("agallinat/netkit")

Documentation

Full usage examples and tutorial are available in the package vignettes:

browseVignettes("netkit")

Or online:

Contributing

Contributions are welcome! If you’d like to report a bug, suggest a feature, or improve documentation, please open an issue or submit a pull request at:

https://github.com/agallinat/netkit/issues

For larger changes, feel free to open a discussion first.