Learn R Programming

igraph (version 1.3.5)

Network Analysis and Visualization

Description

Routines for simple graphs and network analysis. It can handle large graphs very well and provides functions for generating random and regular graphs, graph visualization, centrality methods and much more.

Copy Link

Version

Install

install.packages('igraph')

Monthly Downloads

473,412

Version

1.3.5

License

GPL (>= 2)

Last Published

September 22nd, 2022

Functions in igraph (1.3.5)

add_edges

Add edges to a graph
add_vertices

Add vertices to a graph
V

Vertices of a graph
E

Edges of a graph
igraph-package

The igraph package
add_layout_

Add layout to graph
as.directed

Convert between directed and undirected graphs
alpha_centrality

Find Bonacich alpha centrality scores of network positions
are_adjacent

Are two vertices adjacent?
as.matrix.igraph

Convert igraph objects to adjacency or edge list matrices
assortativity

Assortativity coefficient
as_membership

Declare a numeric vector as a membership vector
articulation_points

Articulation points and bridges of a graph
arpack_defaults

ARPACK eigenvector calculation
as.igraph

Conversion to igraph
as_adjacency_matrix

Convert a graph to an adjacency matrix
as_adj_list

Adjacency lists
adjacent_vertices

Adjacent vertices of multiple vertices in a graph
biconnected_components

Biconnected components
centr_betw_tmax

Theoretical maximum for betweenness centralization
centr_betw

Centralize a graph according to the betweenness of vertices
bfs

Breadth-first search
as_edgelist

Convert a graph to an edge list
all_simple_paths

List all simple paths from one source
centr_eigen_tmax

Theoretical maximum for betweenness centralization
centr_eigen

Centralize a graph according to the eigenvector centrality of vertices
as_graphnel

Convert igraph graphs to graphNEL objects from the graph package
authority_score

Kleinberg's authority centrality scores.
as_ids

Convert a vertex or edge sequence to an ordinary vector
cluster_fast_greedy

Community structure via greedy optimization of modularity
automorphisms

Number of automorphisms
cluster_louvain

Finding community structure by multi-level optimization of modularity
as_incidence_matrix

Incidence matrix of a bipartite graph
cluster_fluid_communities

Community detection algorithm based on interacting fluids
centr_clo

Centralize a graph according to the closeness of vertices
centr_clo_tmax

Theoretical maximum for closeness centralization
cluster_edge_betweenness

Community structure detection based on edge betweenness
cluster_optimal

Optimal community structure
closeness

Closeness centrality of vertices
estimate_betweenness

Vertex and edge betweenness centrality
canonical_permutation

Canonical permutation of a graph
centralize

Centralization of a graph
cliques

Functions to find cliques, ie. complete subgraphs in a graph
categorical_pal

Palette for categories
cluster_leading_eigen

Community structure detecting based on the leading eigenvector of the community matrix
component_distribution

Connected components of a graph
cluster_leiden

Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman.
curve_multiple

Optimal edge curvature when plotting graphs
as_long_data_frame

Convert a graph to a long data frame
automorphism_group

Generating set of the automorphism group of a graph
consensus_tree

Create a consensus tree from several hierarchical random graph models
centr_degree

Centralize a graph according to the degrees of vertices
centr_degree_tmax

Theoretical maximum for degree centralization
bipartite_mapping

Decide whether a graph is bipartite
cocitation

Cocitation coupling
bipartite_projection

Project a bipartite graph
count_subgraph_isomorphisms

Count the isomorphic mappings between a graph and the subgraphs of another graph
count_triangles

Find triangles in graphs
compose

Compose two graphs as binary relations
cohesive_blocks

Calculate Cohesive Blocks
count_isomorphisms

Count the number of isomorphic mappings between two graphs
console

The igraph console
component_wise

Component-wise layout
complementer

Complementer of a graph
delete_vertex_attr

Delete a vertex attribute
delete_vertices

Delete vertices from a graph
c.igraph.es

Concatenate edge sequences
decompose

Decompose a graph into components
dim_select

Dimensionality selection for singular values using profile likelihood.
.extract_constructor_and_modifiers

Takes an argument list and extracts the constructor specification and constructor modifiers from it.
disjoint_union

Disjoint union of graphs
c.igraph.vs

Concatenate vertex sequences
cluster_infomap

Infomap community finding
cluster_label_prop

Finding communities based on propagating labels
constraint

Burt's constraint
delete_edge_attr

Delete an edge attribute
difference

Difference of two sets
difference.igraph.es

Difference of edge sequences
difference.igraph

Difference of graphs
contract

Contract several vertices into a single one
degree

Degree and degree distribution of the vertices
difference.igraph.vs

Difference of vertex sequences
.apply_modifiers

Applies a set of constructor modifiers to an already constructed graph.
fit_power_law

Fitting a power-law distribution function to discrete data
connect

Neighborhood of graph vertices
diverging_pal

Diverging palette
count_motifs

Graph motifs
eigen_centrality

Find Eigenvector Centrality Scores of Network Positions
distance_table

Shortest (directed or undirected) paths between vertices
dyad_census

Dyad census of a graph
edge_attr

Query edge attributes of a graph
dot-data

.data and .env pronouns
get.edge.ids

Find the edge ids based on the incident vertices of the edges
edge_attr_names

List names of edge attributes
edge_connectivity

Edge connectivity.
edge_density

Graph density
graph_attr

Graph attributes of a graph
graph_

Convert object to a graph
graph_attr<-

Set all or some graph attributes
gorder

Order (number of vertices) of a graph
graph_id

Get the id of a graph
compare

Compares community structures using various metrics
cluster_walktrap

Community structure via short random walks
convex_hull

Convex hull of a set of vertices
membership

Functions to deal with the result of network community detection
cluster_spinglass

Finding communities in graphs based on statistical meachanics
feedback_arc_set

Finding a feedback arc set in a graph
diameter

Diameter of a graph
dfs

Depth-first search
graph_version

igraph data structure versions
graph_from_graphdb

Load a graph from the graph database for testing graph isomorphism.
fit_hrg

Fit a hierarchical random graph model
girth

Girth of a graph
global_efficiency

Efficiency of a graph
eccentricity

Eccentricity of the vertices in a graph
each_edge

Rewires the endpoints of the edges of a graph to a random vertex
graph_from_adj_list

Create graphs from adjacency lists
graph_from_literal

Creating (small) graphs via a simple interface
graph_attr_names

List names of graph attributes
igraph-vs-indexing

Indexing vertex sequences
igraph-vs-attributes

Query or set attributes of the vertices in a vertex sequence
graph_from_lcf

Creating a graph from LCF notation
graph_from_graphnel

Convert graphNEL objects from the graph package to igraph
delete_edges

Delete edges from a graph
delete_graph_attr

Delete a graph attribute
coreness

K-core decomposition of graphs
diversity

Graph diversity
dominator_tree

Dominator tree
ends

Incident vertices of some graph edges
erdos.renyi.game

Generate random graphs according to the Erdos-Renyi model
graph_from_edgelist

Create a graph from an edge list matrix
as_data_frame

Creating igraph graphs from data frames or vice-versa
intersection

Intersection of two or more sets
hrg_tree

Create an igraph graph from a hierarchical random graph model
head_print

Print the only the head of an R object
hrg

Create a hierarchical random graph from an igraph graph
edge

Helper function for adding and deleting edges
hrg-methods

Hierarchical random graphs
intersection.igraph.vs

Intersection of vertex sequences
graphlet_basis

Graphlet decomposition of a graph
handle_vertex_type_arg

Common handler for vertex type arguments in igraph functions
harmonic_centrality

Harmonic centrality of vertices
igraph-es-indexing2

Select edges and show their metadata
layout_as_star

Generate coordinates to place the vertices of a graph in a star-shape
greedy_vertex_coloring

Greedy vertex coloring
groups

Groups of a vertex partitioning
gsize

The size of the graph (number of edges)
hub_score

Kleinberg's hub centrality scores.
identical_graphs

Decide if two graphs are identical
intersection.igraph

Intersection of graphs
igraph-minus

Delete vertices or edges from a graph
is_graphical

Is a degree sequence graphical?
is_igraph

Is this object an igraph graph?
layout_with_graphopt

The graphopt layout algorithm
is_directed

Check whether a graph is directed
isomorphisms

Calculate all isomorphic mappings between the vertices of two graphs
ivs

Independent vertex sets
igraph_test

Run package tests
igraph_options

Parameters for the igraph package
is_degseq

Check if a degree sequence is valid for a multi-graph
edge_attr<-

Set one or more edge attributes
layout.svd

SVD layout, this was removed from igraph
isomorphic

Decide if two graphs are isomorphic
embed_laplacian_matrix

Spectral Embedding of the Laplacian of a Graph
embed_adjacency_matrix

Spectral Embedding of Adjacency Matrices
layout_

Graph layouts
layout_with_fr

The Fruchterman-Reingold layout algorithm
local_scan

Compute local scan statistics on graphs
incident_edges

Incident edges of multiple vertices in a graph
igraph-es-attributes

Query or set attributes of the edges in an edge sequence
indent_print

Indent a printout
layout_as_tree

The Reingold-Tilford graph layout algorithm
make_star

Create a star graph, a tree with n vertices and n - 1 leaves
isomorphism_class

Isomorphism class of a graph
make_

Make a new graph
layout_with_gem

The GEM layout algorithm
is_bipartite

Create a bipartite graph
make_chordal_ring

Create an extended chordal ring graph
make_clusters

Creates a communities object.
is_weighted

Weighted graphs
layout_on_sphere

Graph layout with vertices on the surface of a sphere
layout_randomly

Randomly place vertices on a plane or in 3d space
layout_in_circle

Graph layout with vertices on a circle.
igraph-es-indexing

Indexing edge sequences
intersection.igraph.es

Intersection of edge sequences
layout.fruchterman.reingold.grid

Grid Fruchterman-Reingold layout, this was removed from igraph
knn

Average nearest neighbor degree
keeping_degseq

Graph rewiring while preserving the degree distribution
make_ring

Create a ring graph
graph_from_adjacency_matrix

Create graphs from adjacency matrices
is_tree

Decide whether a graph is a tree.
graph_from_incidence_matrix

Create graphs from an incidence matrix
graph_from_atlas

Create a graph from the Graph Atlas
igraph-vs-indexing2

Select vertices and show their metadata
motifs

Graph motifs
make_kautz_graph

Kautz graphs
igraph_demo

Run igraph demos, step by step
layout_with_drl

The DrL graph layout generator
match_vertices

Match Graphs given a seeding of vertex correspondences
make_tree

Create tree graphs
mst

Minimum spanning tree
layout_with_dh

The Davidson-Harel layout algorithm
make_graph

Create an igraph graph from a list of edges, or a notable graph
layout.spring

Spring layout, this was removed from igraph
make_line_graph

Line graph of a graph
layout_with_kk

The Kamada-Kawai layout algorithm
make_lattice

Create a lattice graph
min_st_separators

Minimum size vertex separators
layout_with_sugiyama

The Sugiyama graph layout generator
layout_as_bipartite

Simple two-row layout for bipartite graphs
path

Helper function to add or delete edges along a path
is_matching

Graph matching
min_separators

Minimum size vertex separators
page_rank

The Page Rank algorithm
modularity.igraph

Modularity of a community structure of a graph
neighbors

Neighboring (adjacent) vertices in a graph
print.nexusDatasetInfo

Query and download from the Nexus network repository
max_cardinality

Maximum cardinality search
graph_from_isomorphism_class

Create a graph from an isomorphism class
make_full_graph

Create a full graph
make_de_bruijn_graph

De Bruijn graphs
is_dag

Directed acyclic graphs
is_chordal

Chordality of a graph
min_cut

Minimum cut in a graph
make_full_citation_graph

Create a complete (full) citation graph
layout.reingold.tilford

Deprecated layout functions
igraph_version

Query igraph's version string
laplacian_matrix

Graph Laplacian
permute

Permute the vertices of a graph
has_eulerian_path

Find Eulerian paths or cycles in a graph
layout_with_lgl

Large Graph Layout
plot.sir

Plotting the results on multiple SIR model runs
layout_with_mds

Graph layout by multidimensional scaling
predict_edges

Predict edges based on a hierarchical random graph model
plot_dendrogram

Community structure dendrogram plots
power_centrality

Find Bonacich Power Centrality Scores of Network Positions
print.igraph.es

Print an edge sequence to the screen
print.igraph

Print graphs to the terminal
%>%

Magrittr's pipes
plot.igraph

Plotting of graphs
Drawing graphs

Drawing graphs
head_of

Head of the edge(s) in a graph
incident

Incident edges of a vertex in a graph
igraph-attribute-combination

How igraph functions handle attributes when the graph changes
igraph-dollar

Getting and setting graph attributes, shortcut
is_printer_callback

Is this a printer callback?
normalize

Normalize layout
is_separator

Vertex separators
is_min_separator

Minimal vertex separators
+.igraph

Add vertices, edges or another graph to a graph
is_named

Named graphs
norm_coords

Normalize coordinates for plotting graphs
print.igraphHRGConsensus

Print a hierarchical random graph consensus tree to the screen
realize_degseq

Creating a graph from a given degree sequence, deterministically
read_graph

Reading foreign file formats
print.igraph.vs

Show a vertex sequence on the screen
printer_callback

Create a printer callback function
print.igraphHRG

Print a hierarchical random graph model to the screen
rev.igraph.vs

Reverse the order in a vertex sequence
rev.igraph.es

Reverse the order in an edge sequence
r_pal

The default R palette
rglplot

3D plotting of graphs with OpenGL
sample_dirichlet

Sample from a Dirichlet distribution
rewire

Rewiring edges of a graph
printr

Better printing of R packages
reverse_edges

Reverse edges in a graph
sample_dot_product

Generate random graphs according to the random dot product graph model
layout_nicely

Choose an appropriate graph layout algorithm automatically
layout_on_grid

Simple grid layout
sample_degseq

Generate random graphs with a given degree sequence
sample_fitness

Random graphs from vertex fitness scores
sample_forestfire

Forest Fire Network Model
radius

Radius of a graph
make_empty_graph

A graph with no edges
sample_correlated_gnp

Generate a new random graph from a given graph by randomly adding/removing edges
plot_dendrogram.igraphHRG

HRG dendrogram plot
sample_pa_age

Generate an evolving random graph with preferential attachment and aging
sample_grg

Geometric random graphs
make_full_bipartite_graph

Create a full bipartite graph
sample_fitness_pl

Scale-free random graphs, from vertex fitness scores
running_mean

Running mean of a time series
sample_correlated_gnp_pair

Sample a pair of correlated G(n,p) random graphs
make_from_prufer

Create an undirected tree graph from its Prufer sequence
random_walk

Random walk on a graph
max_flow

Maximum flow in a graph
reciprocity

Reciprocity of graphs
merge_coords

Merging graph layouts
sample_islands

A graph with subgraphs that are each a random graph.
sample_pa

Generate random graphs using preferential attachment
sample_hierarchical_sbm

Sample the hierarchical stochastic block model
sample_k_regular

Create a random regular graph
sample_tree

Sample trees randomly and uniformly
sample_hrg

Sample from a hierarchical random graph model
sample_growing

Growing random graph generation
sample_sphere_volume

Sample vectors uniformly from the volume of a sphere
sample_smallworld

The Watts-Strogatz small-world model
sample_traits_callaway

Graph generation based on different vertex types
rep.igraph

Replicate a graph multiple times
sample_

Sample from a random graph model
sample_motifs

Graph motifs
sample_gnm

Generate random graphs according to the G(n,m) Erdos-Renyi model
sample_bipartite

Bipartite random graphs
sample_gnp

Generate random graphs according to the G(n,p) Erdos-Renyi model
sample_last_cit

Random citation graphs
scg_eps

Error of the spectral coarse graining (SCG) approximation
sample_sphere_surface

Sample vectors uniformly from the surface of a sphere
set_edge_attr

Set edge attributes
scg_group

SCG Problem Solver
sample_pref

Trait-based random generation
scg_semi_proj

Semi-Projectors
sequential_pal

Sequential palette
sample_sbm

Sample stochastic block model
sample_spanning_tree

Samples from the spanning trees of a graph randomly and uniformly
scan_stat

Scan statistics on a time series of graphs
scg-method

Spectral Coarse Graining
scg

All-in-one Function for the SCG of Matrices and Graphs
sample_seq

Sampling a random integer sequence
spectrum

Eigenvalues and eigenvectors of the adjacency matrix of a graph
set_graph_attr

Set a graph attribute
st_min_cuts

List all minimum \((s,t)\)-cuts of a graph
stochastic_matrix

Stochastic matrix of a graph
similarity

Similarity measures of two vertices
simplified

Constructor modifier to drop multiple and loop edges
shapes

Various vertex shapes when plotting igraph graphs
set_vertex_attr

Set vertex attributes
st_cuts

List all (s,t)-cuts of a graph
srand

Deprecated function, used to set random seed of the C library's RNG
time_bins.sir

SIR model on graphs
simplify

Simple graphs
subcomponent

In- or out- component of a vertex
[[.igraph

Query and manipulate a graph as it were an adjacency list
split_join_distance

Split-join distance of two community structures
subgraph_centrality

Find subgraph centrality scores of network positions
subgraph

Subgraph of a graph
subgraph_isomorphisms

All isomorphic mappings between a graph and subgraphs of another graph
subgraph_isomorphic

Decide if a graph is subgraph isomorphic to another one
union.igraph.es

Union of edge sequences
strength

Strength or weighted vertex degree
[.igraph

Query and manipulate a graph as it were an adjacency matrix
to_prufer

Convert a tree graph to its Prufer sequence
tkplot

Interactive plotting of graphs
tkigraph

Experimental basic igraph GUI
unfold_tree

Convert a general graph into a forest
union.igraph

Union of graphs
tail_of

Tails of the edge(s) in a graph
union

Union of two or more sets
triad_census

Triad census, subgraphs with three vertices
union.igraph.vs

Union of vertex sequences
topo_sort

Topological sorting of vertices in a graph
unique.igraph.vs

Remove duplicate vertices from a vertex sequence
unique.igraph.es

Remove duplicate edges from an edge sequence
transitivity

Transitivity of a graph
vertex_connectivity

Vertex connectivity.
weighted_cliques

Functions to find weighted cliques, ie. weighted complete subgraphs in a graph
vertex

Helper function for adding and deleting vertices
upgrade_graph

igraph data structure versions
with_vertex_

Constructor modifier to add vertex attributes
with_igraph_opt

Run code with a temporary igraph options setting
without_loops

Constructor modifier to drop loop edges
without_attr

Construtor modifier to remove all attributes from a graph
vertex_attr

Query vertex attributes of a graph
Pie charts as vertices

Using pie charts as vertices in graph plots
without_multiples

Constructor modifier to drop multiple edges
vertex_attr<-

Set one or more vertex attributes
vertex_attr_names

List names of vertex attributes
write_graph

Writing the graph to a file in some format
which_multiple

Find the multiple or loop edges in a graph
which_mutual

Find mutual edges in a directed graph
with_graph_

Constructor modifier to add graph attributes
with_edge_

Constructor modifier to add edge attributes