Functions for importing, exporting, constructing, and simulating directed and undirected, one-mode and two-mode networks. This includes functions for playing games upon networks, changing the distribution of nodal attributes.

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

Making networks from external files

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

Making networks to external files

create_empty() create_filled() create_ring() create_star() create_tree() create_lattice() create_components() create_core() create_explicit()

Making networks with defined structures

generate_random() generate_smallworld() generate_scalefree() generate_permutation() generate_utilities()

Making networks with a stochastic element

play_learning() play_segregation()

Making learning models on networks

play_diffusion() play_diffusions()

Making diffusion models on networks


Functions for modifying networks into other classes or formats, or mofifying their properties or attributes. 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. There are also tidy-style and igraph-style functions for adding or joining new data on nodes or ties to networks.

as_edgelist() as_matrix() as_igraph() as_tidygraph() as_network() as_siena() as_graphAM() as_diffusion()

Modifying network classes

add_nodes() delete_nodes() add_node_attribute() mutate_nodes() mutate() bind_node_attributes() join_nodes() rename_nodes() rename() filter_nodes()

Modifying node data

add_ties() delete_ties() add_tie_attribute() mutate_ties() rename_ties() bind_ties() join_ties() filter_ties() select_ties() summarise_ties()

Modifying tie data

to_uniplex() to_undirected() to_directed() to_redirected() to_reciprocated() to_acyclic() to_unweighted() to_unsigned() to_unnamed() to_named() to_simplex() to_anti()

Modifying network formats

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

Splitting networks into lists

to_onemode() to_twomode() to_multilevel()

Modifying network levels

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

Modifying networks paths

to_mode1() to_mode2() to_ties() to_galois()

Modifying networks projection

to_giant() to_no_isolates() to_subgraph() to_blocks()

Modifying networks scope

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

Joining lists of networks, graphs, and matrices

na_to_zero() na_to_mean()

Modifying missing tie data


Functions for identifying properties of networks, nodes, or ties, all returning logical scalars or vectors. Note that all node_ and tie_ measures return a single vector so that they can be added directly to graph objects. network_ measures return one or, in some cases of two-mode measures, two values. All node_ and tie_ measures return a single vector, the length of the nodes or ties in the network, respectively.

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

Marking networks features

is_manynet() is_graph() is_edgelist() is_list() is_longitudinal() is_dynamic()

Marking networks classes

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

Marking networks formats

node_is_latent() node_is_infected() node_is_recovered() node_is_exposed()

Marking nodes based on diffusion properties

node_is_isolate() node_is_cutpoint() node_is_core() node_is_fold() node_is_mentor()

Marking nodes based on structural properties

node_is_random() node_is_max() node_is_min()

Marking nodes for selection based on measures

tie_is_random() tie_is_max() tie_is_min()

Marking ties for selection based on measures

tie_is_multiple() tie_is_loop() tie_is_reciprocated() tie_is_feedback() tie_is_bridge()

Marking ties based on structural properties


Functions for plotting and visualising graphs of different types. autographr() graphs any manynet-compatible class object automagically. autographs() and autographt() do the same for multiple networks and dynamic networks, respectively.

network_nodes() network_ties() network_dims() network_node_attributes() network_tie_attributes()

Describing network properties

node_attribute() node_names() node_mode() tie_attribute() tie_weights() tie_signs()

Describing attributes of nodes or ties in a network

autographr() graphr()

Easily graph networks with sensible defaults

autographs() graphs()

Easily graph a set of networks with sensible defaults

autographt() autographd() grapht()

Easily animate dynamic networks with sensible defaults

layout_tbl_graph_configuration() layout_tbl_graph_triad() layout_tbl_graph_quad()

Layout algorithms based on configurational positions

layout_tbl_graph_hierarchy() layout_tbl_graph_alluvial() layout_tbl_graph_railway() layout_tbl_graph_ladder() layout_tbl_graph_concentric() layout_tbl_graph_multilevel() layout_tbl_graph_lineage()

Layout algorithms based on bi- or other partitions

theme_iheid() theme_ethz() theme_uzh() theme_rug()

Many themes

scale_fill_iheid() scale_colour_iheid() scale_color_iheid() scale_edge_colour_iheid() scale_edge_color_iheid() scale_fill_centres() scale_colour_centres() scale_color_centres() scale_edge_colour_centres() scale_edge_color_centres() scale_fill_sdgs() scale_colour_sdgs() scale_color_sdgs() scale_edge_colour_sdgs() scale_edge_color_sdgs() scale_fill_ethz() scale_colour_ethz() scale_color_ethz() scale_edge_colour_ethz() scale_edge_color_ethz() scale_fill_uzh() scale_colour_uzh() scale_color_uzh() scale_edge_colour_uzh() scale_edge_color_uzh() scale_fill_rug() scale_colour_rug() scale_color_rug() scale_edge_colour_rug() scale_edge_color_rug()

Many scales


Many palettes generator


Functions for loading and extracting code from tutorials. There is also a function for tabulating the various network data included in the package, providing an overview of their properties.

run_tute() extract_tute() pkg_data()

Open and extract code from tutorials


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.


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


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


One-mode and two-mode centrality demonstration networks


One-mode Friends character connections (McNulty, 2020)


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


One-mode karateka network (Zachary 1977)


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


Two-mode projection examples (Hollway 2021)


One-mode lawfirm (Lazega 2001)


One-mode network of Lord of the Rings character interactions

ison_marvel_teams ison_marvel_relationships

Multilevel two-mode affiliation, signed one-mode networks of Marvel comic book characters (Yuksel 2017)

ison_monastery_like ison_monastery_esteem ison_monastery_influence ison_monastery_praise

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


One-mode EIES dataset (Freeman and Freeman 1979)


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


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


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


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


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