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_cran()

Making networks of package dependencies

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

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.

create_explicit()

Making networks with explicit ties

create_ego()

Making ego networks through interviewing

create_motifs()

Making motifs

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

Making networks with defined structures

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

Making unconditional and conditional random networks

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

Making networks with a stochastic element

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() play_diffusions()

Making diffusion models on networks

Modifying

Functions for modifying networks into other classes or formats, or modifying 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.

Coercion

Functions for modifying networks into other classes.

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

Modifying network classes

Attributes

Functions for modifying nodal and tie attributes. These include tidy-style and igraph-style functions for adding or joining new data on nodes or ties to networks.

add_info()

Modifying network data

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() arrange_ties() bind_ties() join_ties() filter_ties() select_ties() summarise_ties()

Modifying tie data

Reformatting

Functions for reformatting networks, retaining the same network dimensions.

to_named() to_signed() to_weighted()

Modifying network formats

to_acyclic() to_anti() to_redirected() to_reciprocated() to_directed()

Modifying network formats

to_unnamed() to_undirected() to_unweighted() to_unsigned() to_simplex() to_uniplex()

Modifying network formats

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_ego() 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

Mapping

Functions for plotting and visualising graphs of different types.

Graphing

Functions for graphing networks and plotting results. graphr() graphs any manynet-compatible class object automagically. graphs() and grapht() do the same for multiple networks and dynamic networks, respectively.

graphr()

Easily graph networks with sensible defaults

graphs()

Easily graph a set of networks with sensible defaults

grapht()

Easily animate dynamic networks with sensible defaults

Laying Out

Functions for laying out the nodes in a graph. Included here are some improved or additional layouts to those offered in igraph and ggraph by default.

layout_tbl_graph_configuration() layout_tbl_graph_dyad() layout_tbl_graph_triad() layout_tbl_graph_tetrad() layout_tbl_graph_pentad() layout_tbl_graph_hexad()

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

Theming

Functions for tailoring graphs with themes, scales, and palettes.

set_manynet_theme() 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()

Many palettes generator

Marking

Functions for identifying properties of networks, nodes, or ties, all returning logical scalars or vectors.

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_twomode() is_weighted() is_directed() is_labelled() is_signed() is_complex() is_multiplex() is_uniplex() is_attributed()

Marking networks formats

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

Marking networks classes

Nodal marks

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

node_is_core() node_coreness()

Core-periphery clustering algorithms

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

Marking nodes based on diffusion properties

node_is_isolate() node_is_pendant() node_is_independent() node_is_cutpoint() node_is_fold() node_is_mentor() node_is_neighbor()

Marking nodes based on structural properties

node_is_random() node_is_max() node_is_min()

Marking nodes for selection based on measures

node_attribute() node_names() node_is_mode() tie_attribute() tie_weights() tie_signs()

Describing attributes of nodes or ties in a network

Tie marks

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

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() tie_is_path()

Marking ties based on structural properties

tie_is_triangular() tie_is_transitive() tie_is_triplet() tie_is_cyclical() tie_is_simmelian() tie_is_forbidden() tie_is_imbalanced()

Marking ties based on structural properties

Measuring

Functions for measuring networks and returning a numeric vector or value. net_ 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.

Description

node_attribute() node_names() node_is_mode() tie_attribute() tie_weights() tie_signs()

Describing attributes of nodes or ties in a network

net_nodes() net_ties() net_dims() net_node_attributes() net_tie_attributes()

Describing network properties

net_core() net_richclub() net_factions() net_modularity() net_smallworld() net_scalefree() net_balance()

Measures of network topological features

Centrality

node_betweenness() node_induced() node_flow() node_stress() tie_betweenness() net_betweenness()

Measures of betweenness-like centrality and centralisation

node_closeness() node_harmonic() node_reach() node_information() node_eccentricity() node_distance() node_vitality() tie_closeness() net_closeness() net_reach() net_harmonic()

Measures of closeness-like centrality and centralisation

node_degree() node_deg() node_outdegree() node_indegree() node_multidegree() node_posneg() node_leverage() tie_degree() net_degree() net_outdegree() net_indegree()

Measures of degree-like centrality and centralisation

node_eigenvector() node_power() node_alpha() node_pagerank() node_authority() node_hub() tie_eigenvector() net_eigenvector()

Measures of eigenvector-like centrality and centralisation

node_bridges() node_redundancy() node_effsize() node_efficiency() node_constraint() node_hierarchy() node_neighbours_degree() tie_cohesion()

Measures of structural holes

net_connectedness() net_efficiency() net_upperbound()

Graph theoretic dimensions of hierarchy

Cohesion

net_density() net_components() net_cohesion() net_adhesion() net_diameter() net_length() net_independence()

Measures of network cohesion or connectedness

net_reciprocity() node_reciprocity() net_transitivity() node_transitivity() net_equivalency() node_equivalency() net_congruency()

Measures of network closure

net_richness() node_richness() net_diversity() node_diversity() net_heterophily() node_heterophily() net_assortativity() net_spatial()

Measures of network diversity

Dynamics

over_membership() over_waves() over_time()

Helper functions for measuring over splits of networks

net_change() net_stability() net_correlation()

Measures of network change

net_infection_complete() net_infection_total() net_infection_peak()

Measures of network infection

net_transmissibility() net_recovery() net_reproduction() net_immunity() net_hazard()

Measures of network diffusion

node_adoption_time() node_thresholds() node_recovery() node_exposure()

Measures of nodes in a diffusion

Memberships

Motifs are functions for calculating network subgraphs, always return a matrix or table of nodes as rows and motif or other property as columns, and can be recognised by the _by_ in the function name. Memberships are functions for identifying community, cluster, or class memberships, always return a string vector the length of the nodes in the network, and can be recognised by the _in_ in the function name.

Motifs

node_by_brokerage() net_by_brokerage() node_brokering_activity() node_brokering_exclusivity()

Motifs of brokerage

node_by_exposure()

Motifs of diffusion

net_by_dyad() net_by_triad() net_by_tetrad() net_by_mixed()

Motifs at the network level

node_by_tie() node_by_dyad() node_by_triad() node_by_tetrad() node_by_path()

Motifs at the nodal level

Members

node_in_brokering()

Memberships of brokerage

node_in_roulette()

Clique partitioning algorithms

node_in_betweenness() node_in_greedy() node_in_eigen() node_in_walktrap()

Hierarchical community partitioning algorithms

node_in_community() node_in_optimal() node_in_partition() node_in_infomap() node_in_spinglass() node_in_fluid() node_in_louvain() node_in_leiden()

Non-hierarchical community partitioning algorithms

node_in_component() node_in_weak() node_in_strong()

Component partitioning algorithms

node_in_adopter()

Membership of nodes in a diffusion

node_in_equivalence() node_in_structural() node_in_regular() node_in_automorphic()

Equivalence clustering algorithms

Methods

Methods used in other functions but documented here:

cluster_hierarchical() cluster_cosine() cluster_concor()

Methods for equivalence clustering

k_strict() k_elbow() k_silhouette()

Methods for selecting clusters

Practicing

Learning

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()

Open and extract code from tutorials

gloss() print_glossary() clear_glossary()

Adding network glossary items

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_hightech

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

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_marvel_teams ison_marvel_relationships

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

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)

ison_starwars

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

Fictional data

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

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_potter

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

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_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_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)