Making

Making functions help you obtain networks from inside or outside the package.

Importing

Functions for importing and exporting networks from and to a range of external formats.

read_matrix() read_edgelist() read_nodelist() read_pajek() read_ucinet() read_dynetml() read_graphml() read_gml() read_gdf()

Making networks from external files

write_matrix() write_edgelist() write_nodelist() write_pajek() write_ucinet() write_graphml()

Making networks to external files

Inventing

Functions for deterministically creating and stochastically generating directed and undirected, one-mode and two-mode networks.

print(<mnet>) print_all()

Multilevel, multiplex, multimodal, signed, dynamic or longitudinal changing networks

make_stocnet() print(<stocnet>) validate_stocnet()

Multilevel, multiplex, multimodal, signed, dynamic or longitudinal changing networks

create_explicit()

Making networks with explicit ties

create_motifs()

Making motifs

create_empty() create_filled() create_ring() create_star() create_tree() create_lattice() create_components() create_degree() create_core() create_windmill() create_cycle() create_wheel()

Making networks with defined structures

generate_random() generate_configuration() generate_man() generate_utilities()

Making unconditional and conditional random networks

generate_smallworld() generate_scalefree() generate_fire() generate_islands() generate_citations()

Making networks with a stochastic element

Collecting

Functions for collecting data from external sources, such as interviews or APIs, and converting them into networks.

collect_cran() collect_pkg()

Making networks of inter- and intra-package dependencies

collect_ego()

Making ego networks through interviewing

Playing

Functions for simulating diffusion or learning processes, i.e. nodal change, upon networks.

play_learning() play_segregation()

Making learning models on networks

play_diffusion()

Making diffusion models on networks

Manipulating

Functions for manipulating aspects within networks, such as their nodes, ties, changes, and network metadata (information). This includes functions to add and delete nodes and ties, as well as to add and delete nodal and tie attributes.

Info

add_info() mutate_info() net_attributes()

Manipulating network information

Nodes

add_node_attribute() mutate() mutate_nodes() select() select_nodes() join_nodes() bind_node_attributes() rename_nodes() rename()

Manipulating node attributes

add_nodes() delete_nodes() filter_nodes()

Manipulating number of nodes

Changes

add_changes() delete_changes() mutate_changes() filter_changes() select_changes() gather_changes() apply_changes()

Manipulating changes to nodes over time

Ties

add_tie_attribute() mutate_ties() rename_ties() arrange_ties() bind_ties() join_ties() select_ties() summarise_ties()

Manipulating tie attributes

add_ties() delete_ties() filter_ties()

Manipulating number of ties

Coercion

Functions for modifying networks into other classes. All functions for coercing networks into other classes have the prefix as_. Those ending in list are extractive, and so will result in some information loss, but coercion to and especially between graph classes is as lossless as possible.

as_igraph() as_tidygraph() as_network() as_siena() as_graphAM() as_diffusion() as_diffnet() as_stocnet()

Coercing into graph objects

as_nodelist() as_changelist() as_edgelist() as_infolist() as_matrix()

Coercing into lists or matrices

Modifying

Functions for modifying networks into other formats. This includes functions for reformatting networks into networks of the same dimensions but a different type, e.g. from directed to undirected. It also includes functions for transforming networks into networks with other dimensions, such as from a two-mode network into a one-mode network. There are also functions for splitting networks, e.g. into a list of ego networks, and rejoining them from such lists.

Formatting

Functions for reformatting networks, retaining the same network dimensions.

to_directed() to_undirected() to_redirected() to_reciprocated() to_acyclic()

Modifying networks by formatting their directionality

to_unsigned() to_unweighted() to_signed() to_weighted()

Modifying tie weight formats

to_named() to_unnamed()

Modifying node labels

to_anti() to_simplex() to_uniplex()

Modifying network complexity

Transforming

Functions for transforming networks, which may change the network’s dimensions.

to_matching() to_mentoring() to_eulerian() to_tree() to_dominating()

Modifying networks paths

to_no_missing() to_ego() to_time() to_giant() to_no_isolates() to_subgraph() to_blocks()

Modifying networks scope

Levels

Functions for modifying multimodal networks.

to_onemode() to_twomode() to_multilevel()

Modifying network levels

to_mode1() to_mode2() to_ties()

Modifying networks projection

Converting

Functions for permuting networks or constructing a network from the nodal correlations of another network.

to_permuted()

Network permutation

to_correlation() to_cosine()

Node correlation

Splits

Functions for splitting networks into a list of networks, or (re)joining a list of networks into a single network.

to_egos() to_subgraphs() to_components() to_waves() to_slices()

Splitting networks into lists

from_subgraphs() from_egos() from_waves() from_slices() from_ties()

Joining lists of networks, graphs, and matrices

Missing

Functions for modifying how missing data is treated.

na_to_zero() na_to_mean()

Modifying missing tie data

Identifying

Functions for identifying properties of networks, nodes (where the function prefix is node_), or ties (where the function prefix is tie_).

Network descriptions

describe_*() functions return a character string describing a network.

describe_network() describe_nodes() describe_ties() describe_changes()

Describe a network

Network measures

net_*() functions return a numeric output.

net_nodes() net_modes() net_ties() net_layers() net_dims()

Describing network dimensions

Network members

net_node_*() and net_tie_*() functions return a string vector relating to nodes or ties in the network.

net_name() mode_names() net_node_attributes() layer_names() net_tie_attributes()

Describing network names

Network marks

is_*() functions return a single logical value for the network.

is_connected() is_perfect_matching() is_eulerian() is_acyclic() is_aperiodic()

Marking networks features

is_longitudinal() is_dynamic() is_changing()

Marking networks change formats

is_twomode() is_labelled() is_attributed() is_egonet()

Marking networks nodal formats

is_weighted() is_directed() is_signed() is_complex() is_multiplex() is_uniplex()

Marking networks tie formats

is_manynet() is_graph() is_edgelist() is_list()

Marking networks classes

Nodal attributes

node_*() functions return a vector of values the length of the nodes in the network.

node_attribute() node_names() node_is_mode()

Describing attributes of nodes in a network

Tie attributes

tie_*() functions return a vector of values the length of the ties in the network.

tie_attribute() tie_weights() tie_signs() tie_is_twomode()

Describing attributes of ties in a network

Practicing

Interface

Functions to support new users in learning and interacting with network concepts and data.

gloss() print_glossary() clear_glossary()

Adding network glossary items

snet_info() snet_minor_info() snet_warn() snet_abort() snet_success() snet_prompt() snet_unavailable()

Console command line interface

snet_progress_step() snet_progress_along() snet_progress_seq() snet_progress_nodes() seq_nodes() seq_ties()

Console command line interface

Data

The package contains a variety of networks useful for pedagogical purposes and used in the course ‘Social Networks Theories and Methods’ and other workshops. Each page documents the source of the data and its format. References are provided for further reading and citation.

table_data()

Obtain overview of available network data

Classic data

ison_ include classic datasets used for introducing and teaching network analysis, though are sometimes quite limited in terms of the attributes of nodes and ties collected.

ison_adolescents

One-mode subset of the adolescent society network (Coleman 1961)

ison_algebra

Multiplex graph object of friends, social, and task ties (McFarland 2001)

ison_brandes

One-mode and two-mode centrality demonstration networks

ison_dolphins

One-mode, undirected network of frequent associations in a dolphin pod (Lusseau et al. 2003)

ison_emotions

One-mode, weighted network of emotional transitions (Trampe et al. 2015)

ison_hightech

One-mode multiplex, directed network of managers of a high-tech company (Krackhardt 1987)

ison_judo_moves

One-mode judo moves network (Bastazini 2025)

ison_karateka

One-mode karateka network (Zachary 1977)

ison_koenigsberg

One-mode Seven Bridges of Koenigsberg network (Euler 1741)

ison_laterals

Two-mode projection examples (Hollway 2021)

ison_lawfirm

One-mode lawfirm (Lazega 2001)

ison_monks

Multiplex network of three one-mode signed, weighted networks and a three-wave longitudinal network of monks (Sampson 1969)

ison_networkers

One-mode EIES dataset (Freeman and Freeman 1979)

ison_physicians

Four multiplex one-mode physician diffusion data (Coleman, Katz, and Menzel, 1966)

ison_southern_women

Two-mode southern women (Davis, Gardner and Gardner 1941)

Fictional data

fict_ data are popular fictional datasets, treating recognisable themes, and often have more attributes coded.

fict_actually

Two-mode network of Love Actually characters and their scene appearances (Robinson 2015)

fict_friends

One-mode undirected Friends character scene co-appearances (McNulty, 2020)

fict_greys

One-mode undirected network of characters hook-ups on Grey's Anatomy TV show

fict_lotr

One-mode network of Lord of the Rings character interactions

fict_marvel

Multiplex two-mode affiliation and one-mode signed relationship network of Marvel comic book characters (Yuksel 2017)

fict_potter

Six complex one-mode support data in Harry Potter books (Bossaert and Meidert 2013)

fict_starwars

Seven one-mode Star Wars character interactions (Gabasova 2016)

fict_thrones

One-mode Game of Thrones kinship (Glander 2017)

Political data

irps_ network data concern various international and domestic political networks and problems.

irps_911

One-mode multiplex network of relationships between 9/11 hijackers (Krebs 2002)

irps_blogs

One-mode directed network of links between US political blogs (Adamic and Glance 2005)

irps_books

One-mode undirected network of co-purchased books about US politics on Amazon

irps_nuclear

Two-mode dynamic discourse network of Germany's nuclear energy phase-out (Haunss and Hollway 2023)

irps_revere

Two-mode network of Paul Revere's (Fischer 1995)

irps_usgeo

One-mode undirected network of US state contiguity (Meghanathan 2017)

irps_wwi

One-mode signed network of relationships between European major powers (Antal et al. 2006)