Learn R Programming

netUtils

netUtils is a collection of tools for network analysis that may not deserve a package on their own and/or are missing from other network packages.

Installation

You can install the development version of netUtils with:

# install.packages("remotes")
remotes::install_github("schochastics/netUtils")

Functions

most functions only support igraph objects

helper/convenience functions
biggest_component() extracts the biggest connected component of a network.
delete_isolates() deletes vertices with degree zero.
bipartite_from_data_frame() creates a two mode network from a data frame.
graph_from_multi_edgelist() creates multiple graphs from a typed edgelist.
clique_vertex_mat() computes the clique vertex matrix.
graph_cartesian() computes the Cartesian product of two graphs.
graph_direct() computes the direct (or tensor) product of graphs.
str() extends str to work with igraph objects.

methods
dyad_census_attr() calculates dyad census with node attributes.
triad_census_attr() calculates triad census with node attributes.
core_periphery() fits a discrete core periphery model.
graph_kpartite() creates a random k-partite network.
split_graph() sample graph with perfect core periphery structure.
sample_coreseq() creates a random graph with given coreness sequence.
sample_pa_homophilic() creates a preferential attachment graph with two groups of nodes.
sample_lfr() create LFR benchmark graph for community detection.
structural_equivalence() finds structurally equivalent vertices.
reciprocity_cor() reciprocity as a correlation coefficient.

methods to use with caution
(this functions should only be used if you know what you are doing)
as_adj_list1() extracts the adjacency list faster, but less stable, from igraph objects.
as_adj_weighted() extracts the dense weighted adjacency matrix fast.

Copy Link

Version

Install

install.packages('netUtils')

Monthly Downloads

258

Version

0.8.3

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

David Schoch

Last Published

October 10th, 2024

Functions in netUtils (0.8.3)

str.igraph

Print graphs to terminal
triad_census_attr

triad census with node attributes
graph_kpartite

k partite graphs
helpers

helper function
as_adj_list1

Adjacency list
core_periphery

Discrete core-periphery model
clique_vertex_mat

Clique Vertex Matrix
as_adj_weighted

weighted dense adjacency matrix
graph_cartesian

Cartesian product of two graphs
as_multi_adj

Convert a list of graphs to an adjacency matrices
graph_cor

Graph correlation
bipartite_from_data_frame

two-mode network from a data.frame
split_graph

split graph
graph_direct

Direct product of two graphs
graph_from_multi_edgelist

Multiple networks from a single edgelist with a typed attribute
structural_equivalence

Maximal Structural Equivalence
reciprocity_cor

Reciprocity correlation coefficient
sample_coreseq

Generate random graphs with a given coreness sequence
dyad_census_attr

dyad census with node attributes
fast_cliques

Find Cliques, maximal or not, fast
sample_lfr

LFR benchmark graphs
sample_pa_homophilic

Homophilic random graph using BA preferential attachment model