Learn R Programming

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

igraph (version 1.2.10)

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

733,150

Version

1.2.10

License

GPL (>= 2)

Maintainer

Tam<c3><a1>s Nepusz

Last Published

December 15th, 2021

Functions in igraph (1.2.10)

igraph-package

The igraph package
are_adjacent

Are two vertices adjacent?
E

Edges of a graph
alpha_centrality

Find Bonacich alpha centrality scores of network positions
adjacent_vertices

Adjacent vertices of multiple vertices in a graph
add_layout_

Add layout to graph
add_edges

Add edges to a graph
V

Vertices of a graph
as.directed

Convert between directed and undirected graphs
as.igraph

Conversion to igraph
as_ids

Convert a vertex or edge sequence to an ordinary vector
automorphisms

Number of automorphisms
estimate_betweenness

Vertex and edge betweenness centrality
as_incidence_matrix

Incidence matrix of a bipartite graph
as_graphnel

Convert igraph graphs to graphNEL objects from the graph package
biconnected_components

Biconnected components
as_adjacency_matrix

Convert a graph to an adjacency matrix
bfs

Breadth-first search
all_simple_paths

List all simple paths from one source
as_edgelist

Convert a graph to an edge list
as_adj_list

Adjacency lists
c.igraph.es

Concatenate edge sequences
bipartite_projection

Project a bipartite graph
add_vertices

Add vertices to a graph
bipartite_mapping

Decide whether a graph is bipartite
canonical_permutation

Canonical permutation of a graph
categorical_pal

Palette for categories
cluster_infomap

Infomap community finding
authority_score

Kleinberg's authority centrality scores.
centralize

Centralization of a graph
assortativity

Assortativity coefficient
articulation_points

Articulation points of a graph
cluster_label_prop

Finding communities based on propagating labels
arpack_defaults

ARPACK eigenvector calculation
centr_betw

Centralize a graph according to the betweenness of vertices
cliques

The functions find cliques, ie. complete subgraphs in a graph
cocitation

Cocitation coupling
cohesive_blocks

Calculate Cohesive Blocks
centr_betw_tmax

Theoretical maximum for betweenness centralization
console

The igraph console
consensus_tree

Create a consensus tree from several hierarchical random graph models
cluster_walktrap

Community strucure via short random walks
cluster_spinglass

Finding communities in graphs based on statistical meachanics
c.igraph.vs

Concatenate vertex sequences
as_membership

Declare a numeric vector as a membership vector
as_long_data_frame

Convert a graph to a long data frame
centr_degree

Centralize a graph according to the degrees of vertices
delete_edges

Delete edges from a graph
centr_eigen

Centralize a graph according to the eigenvector centrality of vertices
cluster_louvain

Finding community structure by multi-level optimization of modularity
curve_multiple

Optimal edge curvature when plotting graphs
constraint

Burt's constraint
cluster_optimal

Optimal community structure
centr_clo

Centralize a graph according to the closeness of vertices
convex_hull

Convex hull of a set of vertices
centr_eigen_tmax

Theoretical maximum for betweenness centralization
edge_attr<-

Set one or more edge attributes
contract

Contract several vertices into a single one
coreness

K-core decomposition of graphs
count_motifs

Graph motifs
count_isomorphisms

Count the number of isomorphic mappings between two graphs
dim_select

Dimensionality selection for singular values using profile likelihood.
delete_graph_attr

Delete a graph attribute
dyad_census

Dyad census of a graph
each_edge

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

Disjoint union of graphs
edge_attr

Query edge attributes of a graph
eigen_centrality

Find Eigenvector Centrality Scores of Network Positions
cluster_edge_betweenness

Community structure detection based on edge betweenness
centr_clo_tmax

Theoretical maximum for closeness centralization
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.
dfs

Depth-first search
closeness

Closeness centrality of vertices
edge_attr_names

List names of edge attributes
diversity

Graph diversity
diameter

Diameter of a graph
centr_degree_tmax

Theoretical maximum for degree centralization
edge_connectivity

Edge connectivity.
graph_attr

Graph attributes of a 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
delete_vertex_attr

Delete a vertex attribute
graph_version

Igraph data structure versions
graph_from_isomorphism_class

Create a graph from an isomorphism class
difference

Difference of two sets
decompose

Decompose a graph into components
graph_from_lcf

Creating a graph from LCF notation
embed_adjacency_matrix

Spectral Embedding of Adjacency Matrices
delete_vertices

Delete vertices from a graph
dominator_tree

Dominator tree
difference.igraph

Difference of graphs
erdos.renyi.game

Generate random graphs according to the Erdos-Renyi model
fit_hrg

Fit a hierarchical random graph model
cluster_fluid_communities

Community detection algorithm based on interacting fluids
compare

Compares community structures using various metrics
cluster_fast_greedy

Community structure via greedy optimization of modularity
membership

Functions to deal with the result of network community detection
diverging_pal

Diverging palette
embed_laplacian_matrix

Spectral Embedding of the Laplacian of a Graph
distance_table

Shortest (directed or undirected) paths between vertices
eccentricity

Eccentricity of the vertices in a graph
graph_from_literal

Creating (small) graphs via a simple interface
graph_attr_names

List names of graph attributes
graph_

Convert object to a graph
graphlet_basis

Graphlet decomposition of a graph
edge

Helper function for adding and deleting edges
graph_from_adj_list

Create graphs from adjacency lists
graph_from_adjacency_matrix

Create graphs from adjacency matrices
gorder

Order (number of vertices) of a graph
ends

Incident vertices of some graph edges
handle_vertex_type_arg

Common handler for vertex type arguments in igraph functions
girth

Girth of a graph
head_of

Head of the edge(s) in a graph
hub_score

Kleinberg's hub centrality scores.
graph_from_graphnel

Convert graphNEL objects from the graph package to igraph
graph_attr<-

Set all or some graph attributes
igraph-es-indexing2

Select edges and show their metadata
graph_from_atlas

Create a graph from the Graph Atlas
as_data_frame

Creating igraph graphs from data frames or vice-versa
igraph-minus

Delete vertices or edges from a graph
intersection

Intersection of two or more sets
intersection.igraph

Intersection of graphs
gsize

The size of the graph (number of edges)
graph_id

Get the id of a graph
groups

Groups of a vertex partitioning
is_min_separator

Minimal vertex separators
igraph_options

Parameters for the igraph package
component_wise

Component-wise layout
graph_from_incidence_matrix

Create graphs from an incidence matrix
igraph_test

Run package tests
complementer

Complementer of a graph
degree

Degree and degree distribution of the vertices
identical_graphs

Decide if two graphs are identical
difference.igraph.es

Difference of edge sequences
delete_edge_attr

Delete an edge attribute
difference.igraph.vs

Difference of vertex sequences
is_named

Named graphs
igraph-es-indexing

Indexing edge sequences
igraph_version

Query igraph's version string
igraph-es-attributes

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

Print the only the head of an R object
layout_as_star

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

Is a degree sequence graphical?
is_igraph

Is this object an igraph graph?
layout_as_tree

The Reingold-Tilford graph layout algorithm
is_weighted

Weighted graphs
isomorphic

Decide if two graphs are isomorphic
layout_

Graph layouts
intersection.igraph.vs

Intersection of vertex sequences
keeping_degseq

Graph rewiring while preserving the degree distribution
intersection.igraph.es

Intersection of edge sequences
layout_randomly

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

Independent vertex sets
ego_size

Neighborhood of graph vertices
layout_with_drl

The DrL graph layout generator
fit_power_law

Fitting a power-law distribution function to discrete data
edge_density

Graph density
make_full_citation_graph

Create a complete (full) citation graph
layout_with_fr

The Fruchterman-Reingold layout algorithm
layout_with_dh

The Davidson-Harel layout algorithm
make_chordal_ring

Create an extended chordal ring graph
min_st_separators

Minimum size vertex separators
modularity.igraph

Modularity of a community structure of a graph
is_bipartite

Create a bipartite graph
get.edge.ids

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

A graph with no edges
layout_on_grid

Simple grid layout
graph_from_edgelist

Create a graph from an edge list matrix
layout_as_bipartite

Simple two-row layout for bipartite graphs
layout_on_sphere

Graph layout with vertices on the surface of a sphere
hrg

Create a hierarchical random graph from an igraph graph
neighbors

Neighboring (adjacent) vertices in a graph
print.nexusDatasetInfo

Query and download from the Nexus network repository
power_centrality

Find Bonacich Power Centrality Scores of Network Positions
graph_from_graphdb

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

Create an igraph graph from a hierarchical random graph model
predict_edges

Predict edges based on a hierarchical random graph model
rep.igraph

Replicate a graph multiple times
motifs

Graph motifs
make_full_graph

Create a full graph
rev.igraph.es

Reverse the order in an edge sequence
incident

Incident edges of a vertex in a graph
indent_print

Indent a printout
igraph-dollar

Getting and setting graph attributes, shortcut
igraph-attribute-combination

How igraph functions handle attributes when the graph changes
incident_edges

Incident edges of multiple vertices in a graph
isomorphism_class

Isomorphism class of a graph
isomorphisms

Calculate all isomorphic mappings between the vertices of two graphs
layout.svd

SVD layout, this was removed from igraph
layout.spring

Spring layout, this was removed from igraph
make_full_bipartite_graph

Create a full bipartite graph
mst

Minimum spanning tree
layout_with_gem

The GEM layout algorithm
normalize

Normalize layout
plot.sir

Plotting the results on multiple SIR model runs
norm_coords

Normalize coordinates for plotting graphs
hrg-methods

Hierarchical random graphs
layout_with_mds

Graph layout by multidimensional scaling
make_graph

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

Kautz graphs
sample_gnm

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

The graphopt layout algorithm
layout_with_sugiyama

The Sugiyama graph layout generator
make_tree

Create tree graphs
sample_gnp

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

Random citation graphs
match_vertices

Match Graphs given a seeding of vertex correspondences
max_flow

Maximum flow in a graph
is_chordal

Chordality of a graph
min_cut

Minimum cut in a graph
page_rank

The Page Rank algorithm
path

Helper function to add or delete edges along a path
min_separators

Minimum size vertex separators
print.igraphHRGConsensus

Print a hierarchical random graph consensus tree to the screen
printer_callback

Create a printer callback function
plot_dendrogram

Community structure dendrogram plots
igraph-vs-indexing

Indexing vertex sequences
igraph-vs-attributes

Query or set attributes of the vertices in a vertex sequence
igraph-vs-indexing2

Select vertices and show their metadata
is_degseq

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

Run igraph demos, step by step
is_directed

Check whether a graph is directed
+.igraph

Add vertices, edges or another graph to a graph
plot_dendrogram.igraphHRG

HRG dendrogram plot
rev.igraph.vs

Reverse the order in a vertex sequence
is_separator

Vertex separators
is_printer_callback

Is this a printer callback?
is_dag

Directed acyclic graphs
layout_in_circle

Graph layout with vertices on a circle.
merge_coords

Merging graph layouts
read_graph

Reading foreign file formats
rewire

Rewiring edges of a graph
sample_fitness_pl

Scale-free random graphs, from vertex fitness scores
layout_nicely

Choose an appropriate graph layout algorithm automatically
sample_forestfire

Forest Fire Network Model
layout_with_kk

The Kamada-Kawai layout algorithm
scg_eps

Error of the spectral coarse graining (SCG) approximation
sample_motifs

Graph motifs
make_clusters

Creates a communities object.
make_ring

Create a ring graph
make_de_bruijn_graph

De Bruijn graphs
make_star

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

Large Graph Layout
sample_

Sample from a random graph model
sample_pa

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

Average nearest neighbor degree
layout.reingold.tilford

Deprecated layout functions
plot.igraph

Plotting of graphs
laplacian_matrix

Graph Laplacian
scg_semi_proj

Semi-Projectors
sample_pa_age

Generate an evolving random graph with preferential attachment and aging
Drawing graphs

Drawing graphs
reciprocity

Reciprocity of graphs
scg_group

SCG Problem Solver
similarity

Similarity measures of two vertices
rglplot

3D plotting of graphs with OpenGL
sequential_pal

Sequential palette
running_mean

Running mean of a time series
set_edge_attr

Set edge attributes
local_scan

Compute local scan statistics on graphs
layout.fruchterman.reingold.grid

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

Print graphs to the terminal
printr

Better printing of R packages
print.igraph.es

Print an edge sequence to the screen
set_graph_attr

Set a graph attribute
r_pal

The default R palette
which_mutual

Find mutual edges in a directed graph
make_

Make a new graph
tkplot

Interactive plotting of graphs
subgraph_centrality

Find subgraph centrality scores of network positions
subgraph

Subgraph of a graph
make_lattice

Create a lattice graph
topo_sort

Topological sorting of vertices in a graph
permute

Permute the vertices of a graph
is_matching

Graph matching
make_line_graph

Line graph of a graph
max_cardinality

Maximum cardinality search
sample_bipartite

Bipartite random graphs
sample_seq

Sampling a random integer sequence
sample_smallworld

The Watts-Strogatz small-world model
vertex

Helper function for adding and deleting vertices
sample_growing

Growing random graph generation
sample_grg

Geometric random graphs
scg-method

Spectral Coarse Graining
%>%

Magrittr's pipes
Pie charts as vertices

Using pie charts as vertices in graph plots
which_multiple

Find the multiple or loop edges in a graph
sample_degseq

Generate random graphs with a given degree sequence
scan_stat

Scan statistics on a time series of graphs
sample_traits_callaway

Graph generation based on different vertex types
print.igraphHRG

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

Show a vertex sequence on the screen
sample_dirichlet

Sample from a Dirichlet distribution
scg

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

Random walk on a graph
radius

Radius of a graph
sample_correlated_gnp

Generate a new random graph from a given graph by randomly adding/removing edges
spectrum

Eigenvalues and eigenvectors of the adjacency matrix of a graph
[[.igraph

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

Split-join distance of two community structures
sample_correlated_gnp_pair

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

Sample the hierarchical stochastic block model
sample_dot_product

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

Trait-based random generation
sample_hrg

Sample from a hierarchical random graph model
sample_sbm

Sample stochastic block model
vertex_attr<-

Set one or more vertex attributes
time_bins.sir

SIR model on graphs
srand

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

Construtor modifier to remove all attributes from a graph
vertex_attr

Query vertex attributes of a graph
without_loops

Constructor modifier to drop loop edges
simplify

Simple graphs
subgraph_isomorphic

Decide if a graph is subgraph isomorphic to another one
subcomponent

In- or out- component of a vertex
subgraph_isomorphisms

All isomorphic mappings between a graph and subgraphs of another graph
union.igraph

Union of graphs
union.igraph.es

Union of edge sequences
st_cuts

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

Random graphs from vertex fitness scores
simplified

Constructor modifier to drop multiple and loop edges
strength

Strength or weighted vertex degree
[.igraph

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

Triad census, subgraphs with three vertices
transitivity

Transitivity of a graph
with_igraph_opt

Run code with a temporary igraph options setting
with_vertex_

Constructor modifier to add vertex attributes
set_vertex_attr

Set vertex attributes
sample_islands

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

Various vertex shapes when plotting igraph graphs
sample_sphere_volume

Sample vectors uniformly from the volume of a sphere
sample_sphere_surface

Sample vectors uniformly from the surface of a sphere
sample_k_regular

Create a random regular graph
with_edge_

Constructor modifier to add edge attributes
with_graph_

Constructor modifier to add graph attributes
st_min_cuts

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

Experimental basic igraph GUI
unique.igraph.es

Remove duplicate edges from an edge sequence
upgrade_graph

Igraph data structure versions
unfold_tree

Convert a general graph into a forest
union

Union of two or more sets
unique.igraph.vs

Remove duplicate vertices from a vertex sequence
tail_of

Tails of the edge(s) in a graph
union.igraph.vs

Union of vertex sequences
stochastic_matrix

Stochastic matrix of a graph
without_multiples

Constructor modifier to drop multiple edges
vertex_attr_names

List names of vertex attributes
vertex_connectivity

Vertex connectivity.
write_graph

Writing the graph to a file in some format