Skip to contents

Creating Networks

Functions for constructing netify objects

netify()
Create network object from various data types
new_netify()
low-level constructor for netify objects
layer_netify()
Create multilayer networks from multiple netify objects
bind_netifies()
Combine multiple netify objects
merge(<netify>)
merge method for netify objects (s3 alias for bind_netifies)
ego_netify()
Create ego network from a netify object
to_netify()
Convert igraph, network, or matrix objects to netify format
pivot_dyad_to_network()
Pivot a dyadic variable to become the network
netify_workflows
Common netify workflows – index of patterns

Adding Attributes

Add nodal and dyadic attributes

add_node_vars() add_vertex_attributes()
Add nodal variables to a netify object
add_dyad_vars() add_edge_attributes()
Add dyadic variables to a netify object

Manipulating Networks

Subset, transform, reshape, and clean networks

subset_netify()
internal subset function for netify objects
subset(<netify>)
Subset netify objects
mutate_weights()
Mutate edge weights in a netify object
aggregate_dyad()
Aggregate dyadic event data by actor pairs
binarize()
Binarize a netify object at a threshold
decompose_netify()
Decompose a netify object into edge and node data frames
drop_na_actors()
Drop actors with NA covariates from a netify object
gen_symm_id()
generate symmetric identifiers for dyadic data

Analysis

Network statistics and comparisons

summary(<netify>)
Calculate graph-level statistics for netify objects
summary(<netify_comparison>)
summary method for netify_comparison objects
summary_actor()
Calculate actor-level network statistics
netify_measurements() measurements()
Extract measurements and dimensions from a netify object
compare_networks()
Compare networks across time, layers, or attributes
print(<netify_comparison>)
Print method for netify_comparison objects
homophily()
Analyze homophily in network data
mixing_matrix()
Create attribute mixing matrices for network data
dyad_correlation()
Analyze correlations between dyadic attributes and network ties
attribute_report()
Summary of network-attribute relationships
get_actor_time_info()
Extract actor time range information

Inference

Bootstrap, null comparison, and simulation

bootstrap_netlet()
Bootstrap any user-supplied function of a netify object
compare_to_null()
Test an observed network statistic against a NULL distribution
simulate(<netify>)
Simulate NULL-model networks from a netify object

Visualization

Plot networks and statistics

plot(<netify>)
Plotting method for netify objects
plot(<netify_comparison>)
Plot method for netify_comparison objects
plot(<summary.netify>)
plot graph-level summary statistics
plot(<summary_actor>)
plot method for summary_actor output
plot_actor_stats()
Visualize actor-level network statistics
plot_graph_stats()
Visualize network-level statistics
plot_homophily()
Visualize homophily analysis results
plot_mixing_matrix()
Visualize attribute mixing matrix results
plot_mixing_matrix_facet()
create a multi-panel mixing matrix visualization
animate_netify()
Animate a longitudinal netify object with gganimate
theme_netify()
theme_netify function
theme_stat_netify()
theme_stat_netify function
theme_publication_netify()
ggplot theme for netify network plots
theme_publication_netify_ts()
ggplot theme for netify time-series / stat plots
list_network_styles()
list available network styles
list_palettes()
list available color palettes

Plot Styles

Pre-built visual style presets

style_random()
apply random network style
style_rose()
rose network style
style_red_blue()
red and blue network style
style_orange_teal()
orange and teal network style
style_solarized()
solarized-inspired network style
style_navy_maroon()
navy and maroon network style
style_scientific_blue()
scientific blue network style
style_cyberpunk()
cyberpunk-inspired network style
style_tufte()
minimal tufte-inspired network style
style_pastel()
pastel rainbow network style
style_retro80s()
retro 80s-inspired network style
style_dark2()
colorbrewer dark2-based network style
style_crimson_silver()
crimson and silver network style
style_green_gold()
green and gold network style
style_slate_silver()
slate and silver network style
style_bronze_block()
bronze block network style
style_lime_magenta()
lime and magenta network style
style_black_yellow()
black and yellow network style
style_sunburst()
sunburst network style
style_racing_blue()
racing blue network style
style_bipartite_network()
preset style for bipartite networks
style_temporal_network()
preset style for temporal/longitudinal networks

Plot Components

Low-level plot building blocks

net_plot_data()
Prepare netify data for network visualization
get_node_layout()
Calculate node layout positions for netify visualization
get_edge_layout()
Generate edge layout coordinates for netify visualization
get_ego_layout()
Calculate ego-centric layout positions for network visualization
create_hierarchical_ego_layout() create_radial_ego_layout() create_ego_centric_layout()
Create ego-centric layouts for ego networks
remove_ego_edges()
remove ego-alter edges from ego network
assemble_netify_plot()
assemble netify plot from components
netify_edge()
Extract edges layer from netify plot components
netify_node()
extract nodes layer from netify plot components
netify_text()
extract text layer from netify plot components
netify_label()
extract label layer from netify plot components
netify_text_repel()
extract text_repel layer from netify plot components
netify_label_repel()
extract label_repel layer from netify plot components
netify_scale_labels()
set scale labels for netify plots
reset_scales()
reset aesthetic scales in ggplot
plot_with_style()
Apply style to netify plot
validate_plot_params()
Validate plot parameters and warn about common mistakes
print(<netify_plot_components>)
print netify plot components
ggplot_add(<netify_edge>)
add netify_edge to ggplot
ggplot_add(<netify_node>)
add netify_node to ggplot
ggplot_add(<netify_text>)
add netify_text to ggplot
ggplot_add(<netify_label>)
add netify_label to ggplot
ggplot_add(<netify_text_repel>)
add netify_text_repel to ggplot
ggplot_add(<netify_label_repel>)
add netify_label_repel to ggplot
ggplot_add(<netify_scale_reset>)
add scale resets to ggplot
ggplot_add(<netify_labels>)
add netify scale labels to ggplot

Conversion

Convert between netify and other formats

netify_to_igraph() to_igraph()
Convert netify objects to igraph format
netify_to_statnet() netify_to_network() to_statnet() to_network()
Convert netify objects to statnet network format
netify_to_amen() to_amen()
Convert netify objects to amen format
netify_to_lame() to_lame()
Convert a netify object to the format expected by lame::ame()
netify_to_dbn() to_dbn()
Convert netify objects to dbn format
from_lame_fit()
Convert a fitted lame/amen AME object back into a netify
unnetify() netify_to_df()
Convert netify objects back to dyadic data frames
melt()
Melt methods for netify objects
decompose_igraph()
decompose an igraph object into base r components
decompose_statnet() decompose_network()
decompose a network object into base r components
read_graphml() read_pajek() read_gml()
Read a network from common file formats into a netify object
as.matrix(<netify>)
coerce a netify object to a plain matrix
as.igraph.netify()
as.igraph method for netify objects
as.network.netify()
as.network method for netify objects
as_tibble.netify()
convert a netify object to a tibble (long edge frame)
as_tibble.netify_comparison()
Convert a netify_comparison to a tibble
tidy.netify()
Tidy a netify object into a long edge data frame
glance.netify()
one-row-per-network summary of a netify object (broom style)

Inspection

Examine and query netify objects

print(<netify>)
Print method for netify objects
peek()
Preview subsets of network data from netify objects
get_raw()
get raw network data without netify attributes
get_adjacency()
Create a netify matrix from cross-sectional dyadic data
get_adjacency_array()
Create a netify array from longitudinal dyadic data
get_adjacency_list()
Create a netify list from longitudinal dyadic data
is_netify()
is this object a netify object?
is_binary() nodal_data() is_bipartite() is_bipartite_netify() is_directed_netify() is_longitudinal() is_multilayer() is_symmetric_netify() n_actors() n_periods() n_layers()
Type predicates and convenience accessors for netify objects
validate_netify()
Deep coherence check on a netify object

Data

Example datasets

icews
Event data slice from ICEWS
mexico
Event data slice from UCDP on Mexico
myanmar
event data slice from ucdp on myanmar
classroom_edges
synthetic high-school friendship edgelist
classroom_nodes
Synthetic high-school friendship roster (nodes)