Learn R Programming

⚠️There's a newer version (1.3.5) of this package.Take me there.

igraph (version 1.3.1)

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

405,103

Version

1.3.1

License

GPL (>= 2)

Maintainer

Tam<c3><a1>s Nepusz

Last Published

April 20th, 2022

Functions in igraph (1.3.1)

all_simple_paths

List all simple paths from one source
as_ids

Convert a vertex or edge sequence to an ordinary vector
adjacent_vertices

Adjacent vertices of multiple vertices in a graph
as_graphnel

Convert igraph graphs to graphNEL objects from the graph package
add_layout_

Add layout to graph
as.matrix.igraph

Convert igraph objects to adjacency or edge list matrices
add_vertices

Add vertices to a graph
add_edges

Add edges to a graph
E

Edges of a graph
as_membership

Declare a numeric vector as a membership vector
estimate_betweenness

Vertex and edge betweenness centrality
centr_clo_tmax

Theoretical maximum for closeness centralization
centr_eigen

Centralize a graph according to the eigenvector centrality of vertices
centr_clo

Centralize a graph according to the closeness of vertices
as.directed

Convert between directed and undirected graphs
articulation_points

Articulation points and bridges of a graph
automorphisms

Number of automorphisms
arpack_defaults

ARPACK eigenvector calculation
V

Vertices of a graph
assortativity

Assortativity coefficient
authority_score

Kleinberg's authority centrality scores.
c.igraph.vs

Concatenate vertex sequences
c.igraph.es

Concatenate edge sequences
as_long_data_frame

Convert a graph to a long data frame
as_incidence_matrix

Incidence matrix of a bipartite graph
centr_betw

Centralize a graph according to the betweenness of vertices
centr_betw_tmax

Theoretical maximum for betweenness centralization
as_adj_list

Adjacency lists
cliques

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

Centralization of a graph
centr_eigen_tmax

Theoretical maximum for betweenness centralization
alpha_centrality

Find Bonacich alpha centrality scores of network positions
automorphism_group

Generating set of the automorphism group of a graph
cluster_louvain

Finding community structure by multi-level optimization of modularity
are_adjacent

Are two vertices adjacent?
as_adjacency_matrix

Convert a graph to an adjacency matrix
as_edgelist

Convert a graph to an edge list
bipartite_projection

Project a bipartite graph
bipartite_mapping

Decide whether a graph is bipartite
centr_degree_tmax

Theoretical maximum for degree centralization
centr_degree

Centralize a graph according to the degrees of vertices
cluster_infomap

Infomap community finding
cluster_label_prop

Finding communities based on propagating labels
consensus_tree

Create a consensus tree from several hierarchical random graph models
count_isomorphisms

Count the number of isomorphic mappings between two graphs
cluster_optimal

Optimal community structure
as.igraph

Conversion to igraph
categorical_pal

Palette for categories
canonical_permutation

Canonical permutation of a graph
count_subgraph_isomorphisms

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

The igraph console
count_motifs

Graph motifs
difference.igraph.vs

Difference of vertex sequences
count_triangles

Find triangles in graphs
difference.igraph.es

Difference of edge sequences
dim_select

Dimensionality selection for singular values using profile likelihood.
cluster_fluid_communities

Community detection algorithm based on interacting fluids
cluster_fast_greedy

Community structure via greedy optimization of modularity
biconnected_components

Biconnected components
cluster_spinglass

Finding communities in graphs based on statistical meachanics
bfs

Breadth-first search
cocitation

Cocitation coupling
cluster_walktrap

Community structure via short random walks
membership

Functions to deal with the result of network community detection
cohesive_blocks

Calculate Cohesive Blocks
edge_attr_names

List names of edge attributes
component_distribution

Connected components of a graph
disjoint_union

Disjoint union of graphs
dfs

Depth-first search
degree

Degree and degree distribution of the vertices
eccentricity

Eccentricity of the vertices in a graph
edge

Helper function for adding and deleting edges
delete_edge_attr

Delete an edge attribute
.apply_modifiers

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

Diameter of a graph
closeness

Closeness centrality of vertices
compare

Compares community structures using various metrics
cluster_edge_betweenness

Community structure detection based on edge betweenness
erdos.renyi.game

Generate random graphs according to the Erdos-Renyi model
cluster_leading_eigen

Community structure detecting based on the leading eigenvector of the community matrix
.extract_constructor_and_modifiers

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

Edge connectivity.
compose

Compose two graphs as binary relations
graph_from_adj_list

Create graphs from adjacency lists
delete_vertex_attr

Delete a vertex attribute
delete_vertices

Delete vertices from a graph
contract

Contract several vertices into a single one
cluster_leiden

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

Burt's constraint
convex_hull

Convex hull of a set of vertices
complementer

Complementer of a graph
coreness

K-core decomposition of graphs
dyad_census

Dyad census of a graph
component_wise

Component-wise layout
curve_multiple

Optimal edge curvature when plotting graphs
gsize

The size of the graph (number of edges)
greedy_vertex_coloring

Greedy vertex coloring
groups

Groups of a vertex partitioning
graph_from_atlas

Create a graph from the Graph Atlas
graph_from_adjacency_matrix

Create graphs from adjacency matrices
each_edge

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

Convert graphNEL objects from the graph package to igraph
delete_edges

Delete edges from a graph
as_data_frame

Creating igraph graphs from data frames or vice-versa
feedback_arc_set

Finding a feedback arc set in a graph
decompose

Decompose a graph into components
embed_laplacian_matrix

Spectral Embedding of the Laplacian of a Graph
edge_attr<-

Set one or more edge attributes
edge_attr

Query edge attributes of a graph
head_of

Head of the edge(s) in a graph
head_print

Print the only the head of an R object
graph_from_incidence_matrix

Create graphs from an incidence matrix
graphlet_basis

Graphlet decomposition of a graph
graph_version

igraph data structure versions
get.edge.ids

Find the edge ids based on the incident vertices of the edges
igraph-es-indexing

Indexing edge sequences
girth

Girth of a graph
has_eulerian_path

Find Eulerian paths or cycles in a graph
difference

Difference of two sets
delete_graph_attr

Delete a graph attribute
harmonic_centrality

Harmonic centrality of vertices
difference.igraph

Difference of graphs
handle_vertex_type_arg

Common handler for vertex type arguments in igraph functions
igraph-vs-indexing2

Select vertices and show their metadata
incident_edges

Incident edges of multiple vertices in a graph
is_graphical

Is a degree sequence graphical?
igraph-vs-indexing

Indexing vertex sequences
is_directed

Check whether a graph is directed
incident

Incident edges of a vertex in a graph
igraph-dollar

Getting and setting graph attributes, shortcut
igraph-es-attributes

Query or set attributes of the edges in an edge sequence
igraph-es-indexing2

Select edges and show their metadata
knn

Average nearest neighbor degree
diversity

Graph diversity
ends

Incident vertices of some graph edges
distance_table

Shortest (directed or undirected) paths between vertices
fit_hrg

Fit a hierarchical random graph model
graph_attr

Graph attributes of a graph
edge_density

Graph density
indent_print

Indent a printout
intersection

Intersection of two or more sets
ego_size

Neighborhood of graph vertices
dominator_tree

Dominator tree
fit_power_law

Fitting a power-law distribution function to discrete data
diverging_pal

Diverging palette
graph_from_edgelist

Create a graph from an edge list matrix
is_dag

Directed acyclic graphs
eigen_centrality

Find Eigenvector Centrality Scores of Network Positions
embed_adjacency_matrix

Spectral Embedding of Adjacency Matrices
global_efficiency

Efficiency of a graph
graph_from_isomorphism_class

Create a graph from an isomorphism class
identical_graphs

Decide if two graphs are identical
graph_attr_names

List names of graph attributes
graph_from_lcf

Creating a graph from LCF notation
hub_score

Kleinberg's hub centrality scores.
hrg_tree

Create an igraph graph from a hierarchical random graph model
igraph-minus

Delete vertices or edges from a graph
graph_from_graphdb

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

Graph Laplacian
is_degseq

Check if a degree sequence is valid for a multi-graph
layout_randomly

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

The Davidson-Harel layout algorithm
graph_

Convert object to a graph
gorder

Order (number of vertices) of a graph
layout.reingold.tilford

Deprecated layout functions
hrg-methods

Hierarchical random graphs
graph_id

Get the id of a graph
graph_from_literal

Creating (small) graphs via a simple interface
graph_attr<-

Set all or some graph attributes
layout.fruchterman.reingold.grid

Grid Fruchterman-Reingold layout, this was removed from igraph
intersection.igraph

Intersection of graphs
igraph-vs-attributes

Query or set attributes of the vertices in a vertex sequence
intersection.igraph.es

Intersection of edge sequences
igraph_demo

Run igraph demos, step by step
layout_with_mds

Graph layout by multidimensional scaling
hrg

Create a hierarchical random graph from an igraph graph
isomorphism_class

Isomorphism class of a graph
isomorphisms

Calculate all isomorphic mappings between the vertices of two graphs
layout_as_star

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

Simple grid layout
layout_on_sphere

Graph layout with vertices on the surface of a sphere
layout_with_sugiyama

The Sugiyama graph layout generator
make_clusters

Creates a communities object.
make_star

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

Create tree graphs
make_de_bruijn_graph

De Bruijn graphs
min_separators

Minimum size vertex separators
path

Helper function to add or delete edges along a path
intersection.igraph.vs

Intersection of vertex sequences
min_st_separators

Minimum size vertex separators
permute

Permute the vertices of a graph
plot_dendrogram

Community structure dendrogram plots
igraph_options

Parameters for the igraph package
is_chordal

Chordality of a graph
is_igraph

Is this object an igraph graph?
sample_correlated_gnp

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

Print a hierarchical random graph model to the screen
print.igraphHRGConsensus

Print a hierarchical random graph consensus tree to the screen
sample_correlated_gnp_pair

Sample a pair of correlated G(n,p) random graphs
plot_dendrogram.igraphHRG

HRG dendrogram plot
is_min_separator

Minimal vertex separators
is_separator

Vertex separators
is_tree

Decide whether a graph is a tree.
igraph-attribute-combination

How igraph functions handle attributes when the graph changes
layout_

Graph layouts
sample_grg

Geometric random graphs
make_full_bipartite_graph

Create a full bipartite graph
make_full_citation_graph

Create a complete (full) citation graph
igraph_test

Run package tests
layout_with_drl

The DrL graph layout generator
layout_in_circle

Graph layout with vertices on a circle.
keeping_degseq

Graph rewiring while preserving the degree distribution
ivs

Independent vertex sets
igraph_version

Query igraph's version string
layout_as_tree

The Reingold-Tilford graph layout algorithm
make_chordal_ring

Create an extended chordal ring graph
layout_with_fr

The Fruchterman-Reingold layout algorithm
is_bipartite

Create a bipartite graph
layout_as_bipartite

Simple two-row layout for bipartite graphs
sample_growing

Growing random graph generation
sample_hrg

Sample from a hierarchical random graph model
scg-method

Spectral Coarse Graining
sample_hierarchical_sbm

Sample the hierarchical stochastic block model
layout_nicely

Choose an appropriate graph layout algorithm automatically
modularity.igraph

Modularity of a community structure of a graph
layout_with_gem

The GEM layout algorithm
max_flow

Maximum flow in a graph
max_cardinality

Maximum cardinality search
normalize

Normalize layout
predict_edges

Predict edges based on a hierarchical random graph model
motifs

Graph motifs
page_rank

The Page Rank algorithm
is_printer_callback

Is this a printer callback?
is_named

Named graphs
layout.svd

SVD layout, this was removed from igraph
isomorphic

Decide if two graphs are isomorphic
layout.spring

Spring layout, this was removed from igraph
is_weighted

Weighted graphs
layout_with_kk

The Kamada-Kawai layout algorithm
make_kautz_graph

Kautz graphs
make_lattice

Create a lattice graph
%>%

Magrittr's pipes
scg

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

Error of the spectral coarse graining (SCG) approximation
layout_with_lgl

Large Graph Layout
make_empty_graph

A graph with no edges
print.igraph

Print graphs to the terminal
rewire

Rewiring edges of a graph
random_walk

Random walk on a graph
rev.igraph.vs

Reverse the order in a vertex sequence
read_graph

Reading foreign file formats
make_from_prufer

Create an undirected tree graph from its Prufer sequence
tkplot

Interactive plotting of graphs
stochastic_matrix

Stochastic matrix of a graph
st_min_cuts

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

SCG Problem Solver
to_prufer

Convert a tree graph to its Prufer sequence
make_ring

Create a ring graph
local_scan

Compute local scan statistics on graphs
make_line_graph

Line graph of a graph
layout_with_graphopt

The graphopt layout algorithm
make_

Make a new graph
printer_callback

Create a printer callback function
Drawing graphs

Drawing graphs
printr

Better printing of R packages
rep.igraph

Replicate a graph multiple times
sample_dot_product

Generate random graphs according to the random dot product graph model
union.igraph.vs

Union of vertex sequences
union.igraph.es

Union of edge sequences
sample_fitness

Random graphs from vertex fitness scores
sample_sphere_volume

Sample vectors uniformly from the volume of a sphere
make_graph

Create an igraph graph from a list of edges, or a notable graph
make_full_graph

Create a full graph
+.igraph

Add vertices, edges or another graph to a graph
realize_degseq

Creating a graph from a given degree sequence, deterministically
power_centrality

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

Reverse the order in an edge sequence
merge_coords

Merging graph layouts
which_multiple

Find the multiple or loop edges in a graph
match_vertices

Match Graphs given a seeding of vertex correspondences
which_mutual

Find mutual edges in a directed graph
write_graph

Writing the graph to a file in some format
without_multiples

Constructor modifier to drop multiple edges
is_matching

Graph matching
norm_coords

Normalize coordinates for plotting graphs
print.igraph.es

Print an edge sequence to the screen
radius

Radius of a graph
print.nexusDatasetInfo

Query and download from the Nexus network repository
r_pal

The default R palette
print.igraph.vs

Show a vertex sequence on the screen
sample_traits_callaway

Graph generation based on different vertex types
scg_semi_proj

Semi-Projectors
sample_last_cit

Random citation graphs
sample_motifs

Graph motifs
sample_gnp

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

Set edge attributes
set_graph_attr

Set a graph attribute
min_cut

Minimum cut in a graph
subgraph_isomorphic

Decide if a graph is subgraph isomorphic to another one
sequential_pal

Sequential palette
sample_sbm

Sample stochastic block model
sample_pref

Trait-based random generation
sample_gnm

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

Eigenvalues and eigenvectors of the adjacency matrix of a graph
split_join_distance

Split-join distance of two community structures
mst

Minimum spanning tree
subgraph_isomorphisms

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

Sample trees randomly and uniformly
sample_

Sample from a random graph model
plot.igraph

Plotting of graphs
sample_fitness_pl

Scale-free random graphs, from vertex fitness scores
neighbors

Neighboring (adjacent) vertices in a graph
sample_forestfire

Forest Fire Network Model
topo_sort

Topological sorting of vertices in a graph
plot.sir

Plotting the results on multiple SIR model runs
sample_bipartite

Bipartite random graphs
reciprocity

Reciprocity of graphs
rglplot

3D plotting of graphs with OpenGL
running_mean

Running mean of a time series
upgrade_graph

igraph data structure versions
transitivity

Transitivity of a graph
vertex

Helper function for adding and deleting vertices
sample_degseq

Generate random graphs with a given degree sequence
with_edge_

Constructor modifier to add edge attributes
weighted_cliques

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

Vertex connectivity.
with_graph_

Constructor modifier to add graph attributes
simplify

Simple graphs
tail_of

Tails of the edge(s) in a graph
without_attr

Construtor modifier to remove all attributes from a graph
scan_stat

Scan statistics on a time series of graphs
without_loops

Constructor modifier to drop loop edges
time_bins.sir

SIR model on graphs
sample_islands

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

Create a random regular graph
sample_seq

Sampling a random integer sequence
sample_smallworld

The Watts-Strogatz small-world model
set_vertex_attr

Set vertex attributes
shapes

Various vertex shapes when plotting igraph graphs
srand

Deprecated function, used to set random seed of the C library's RNG
st_cuts

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

Union of two or more sets
tkigraph

Experimental basic igraph GUI
[[.igraph

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

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

Generate scale-free graphs according to the Barabasi-Albert model
sample_dirichlet

Sample from a Dirichlet distribution
union.igraph

Union of graphs
sample_pa_age

Generate an evolving random graph with preferential attachment and aging
unique.igraph.es

Remove duplicate edges from an edge sequence
vertex_attr

Query vertex attributes of a graph
sample_sphere_surface

Sample vectors uniformly from the surface of a sphere
subcomponent

In- or out- component of a vertex
simplified

Constructor modifier to drop multiple and loop edges
similarity

Similarity measures of two vertices
strength

Strength or weighted vertex degree
unique.igraph.vs

Remove duplicate vertices from a vertex sequence
with_vertex_

Constructor modifier to add vertex attributes
[.igraph

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

Run code with a temporary igraph options setting
vertex_attr_names

List names of vertex attributes
subgraph_centrality

Find subgraph centrality scores of network positions
vertex_attr<-

Set one or more vertex attributes
subgraph

Subgraph of a graph
triad_census

Triad census, subgraphs with three vertices
Pie charts as vertices

Using pie charts as vertices in graph plots
unfold_tree

Convert a general graph into a forest
igraph-package

The igraph package