Learn R Programming

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

igraph (version 1.2.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

372,396

Version

1.2.5

License

GPL (>= 2)

Maintainer

Last Published

March 19th, 2020

Functions in igraph (1.2.5)

E

Edges of a graph
V

Vertices of a graph
igraph-package

The igraph package
as_adj_list

Adjacency lists
add_edges

Add edges to a graph
adjacent_vertices

Adjacent vertices of multiple vertices in a graph
all_simple_paths

List all simple paths from one source
as_adjacency_matrix

Convert a graph to an adjacency matrix
add_vertices

Add vertices to a graph
add_layout_

Add layout to graph
as_ids

Convert a vertex or edge sequence to an ordinary vector
are_adjacent

Are two vertices adjacent?
alpha_centrality

Find Bonacich alpha centrality scores of network positions
authority_score

Kleinberg's authority centrality scores.
as.igraph

Conversion to igraph
arpack_defaults

ARPACK eigenvector calculation
as.directed

Convert between directed and undirected graphs
as_incidence_matrix

Incidence matrix of a bipartite graph
assortativity

Assortativity coefficient
as_edgelist

Convert a graph to an edge list
articulation_points

Articulation points of a graph
as_graphnel

Convert igraph graphs to graphNEL objects from the graph package
centr_degree

Centralize a graph according to the degrees of vertices
bipartite_mapping

Decide whether a graph is bipartite
centr_degree_tmax

Theoretical maximum for degree centralization
bipartite_projection

Project a bipartite graph
automorphisms

Number of automorphisms
as_long_data_frame

Convert a graph to a long data frame
estimate_betweenness

Vertex and edge betweenness centrality
bfs

Breadth-first search
biconnected_components

Biconnected components
cluster_label_prop

Finding communities based on propagating labels
centr_clo

Centralize a graph according to the closeness of vertices
as_membership

Declare a numeric vector as a membership vector
component_wise

Component-wise layout
c.igraph.vs

Concatenate vertex sequences
c.igraph.es

Concatenate edge sequences
component_distribution

Connected components of a graph
cluster_leading_eigen

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

Complementer of a graph
delete_vertex_attr

Delete a vertex attribute
delete_vertices

Delete vertices from a graph
compose

Compose two graphs as binary relations
centr_betw

Centralize a graph according to the betweenness of vertices
centr_betw_tmax

Theoretical maximum for betweenness centralization
centralize

Centralization of a graph
centr_clo_tmax

Theoretical maximum for closeness centralization
categorical_pal

Palette for categories
cliques

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

Canonical permutation of a graph
membership

Functions to deal with the result of network community detection
edge_attr<-

Set one or more edge attributes
dfs

Depth-first search
edge_attr

Query edge attributes of a graph
diameter

Diameter of a graph
closeness

Closeness centrality of vertices
edge_density

Graph density
compare

Compares community structures using various metrics
constraint

Burt's constraint
ego_size

Neighborhood of graph vertices
cluster_edge_betweenness

Community structure detection based on edge betweenness
contract

Contract several vertices into a single one
convex_hull

Convex hull of a set of vertices
delete_edges

Delete edges from a graph
coreness

K-core decomposition of graphs
girth

Girth of a graph
cluster_spinglass

Finding communities in graphs based on statistical meachanics
cluster_fast_greedy

Community structure via greedy optimization of modularity
gorder

Order (number of vertices) of 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
delete_graph_attr

Delete a graph attribute
count_isomorphisms

Count the number of isomorphic mappings between two graphs
centr_eigen_tmax

Theoretical maximum for betweenness centralization
cluster_walktrap

Community strucure via short random walks
cluster_infomap

Infomap community finding
graph_from_graphnel

Convert graphNEL objects from the graph package to igraph
distance_table

Shortest (directed or undirected) paths between vertices
hrg_tree

Create an igraph graph from a hierarchical random graph model
hub_score

Kleinberg's hub centrality scores.
count_motifs

Graph motifs
cluster_optimal

Optimal community structure
graph_from_incidence_matrix

Create graphs from an incidence matrix
count_subgraph_isomorphisms

Count the isomorphic mappings between a graph and the subgraphs of another graph
igraph-es-indexing

Indexing edge sequences
count_triangles

Find triangles in graphs
difference

Difference of two sets
degree

Degree and degree distribution of the vertices
difference.igraph

Difference of graphs
delete_edge_attr

Delete an edge attribute
consensus_tree

Create a consensus tree from several hierarchical random graph models
diverging_pal

Diverging palette
dyad_census

Dyad census of a graph
console

The igraph console
eccentricity

Eccentricity of the vertices in a graph
ends

Incident vertices of some graph edges
graph_

Convert object to a graph
graph_attr<-

Set all or some graph attributes
cocitation

Cocitation coupling
cohesive_blocks

Calculate Cohesive Blocks
embed_laplacian_matrix

Spectral Embedding of the Laplacian of a Graph
edge

Helper function for adding and deleting edges
each_edge

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

Fitting a power-law distribution function to discrete data
curve_multiple

Optimal edge curvature when plotting graphs
decompose

Decompose a graph into components
graph_from_atlas

Create a graph from the Graph Atlas
groups

Groups of a vertex partitioning
graph_from_edgelist

Create a graph from an edge list matrix
gsize

The size of the graph (number of edges)
as_data_frame

Creating igraph graphs from data frames or vice-versa
get.edge.ids

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

Select edges and show their metadata
difference.igraph.es

Difference of edge sequences
dim_select

Dimensionality selection for singular values using profile likelihood.
graph_from_graphdb

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

Run package tests
igraph_version

Query igraph's version string
graph_version

Igraph data structure versions
graphlet_basis

Graphlet decomposition of a graph
igraph_options

Parameters for the igraph package
indent_print

Indent a printout
difference.igraph.vs

Difference of vertex sequences
intersection

Intersection of two or more sets
is_igraph

Is this object an igraph graph?
igraph_demo

Run igraph demos, step by step
is_min_separator

Minumal vertex separators
layout.fruchterman.reingold.grid

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

Head of the edge(s) in a graph
layout.spring

Spring layout, this was removed from igraph
disjoint_union

Disjoint union of graphs
edge_attr_names

List names of edge attributes
isomorphic

Decide if two graphs are isomorphic
is_printer_callback

Is this a printer callback?
layout_nicely

Choose an appropriate graph layout algorithm automatically
head_print

Print the only the head of an R object
igraph-dollar

Getting and setting graph attributes, shortcut
make_full_bipartite_graph

Create a full bipartite graph
edge_connectivity

Edge connectivity.
layout_with_mds

Graph layout by multidimensional scaling
isomorphism_class

Isomorphism class of a graph
eigen_centrality

Find Eigenvector Centrality Scores of Network Positions
is_named

Named graphs
layout_with_lgl

Large Graph Layout
layout_on_grid

Simple grid layout
diversity

Graph diversity
intersection.igraph.es

Intersection of edge sequences
igraph-es-attributes

Query or set attributes of the edges in an edge sequence
erdos.renyi.game

Generate random graphs according to the Erdos-Renyi model
make_full_citation_graph

Create a complete (full) citation graph
fit_hrg

Fit a hierarchical random graph model
intersection.igraph

Intersection of graphs
dominator_tree

Dominator tree
graph_from_isomorphism_class

Create a graph from an isomorphism class
make_lattice

Create a lattice graph
layout_on_sphere

Graph layout with vertices on the surface of a sphere
graph_from_adj_list

Create graphs from adjacency lists
embed_adjacency_matrix

Spectral Embedding of Adjacency Matrices
graph_attr

Graph attributes of a graph
graph_id

Get the id of a graph
graph_attr_names

List names of graph attributes
graph_from_literal

Creating (small) graphs via a simple interface
graph_from_adjacency_matrix

Create graphs from adjacency matrices
is_directed

Check whether a graph is directed
layout_randomly

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

Neighboring (adjacent) vertices in a graph
hrg-methods

Hierarchical random graphs
mst

Minimum spanning tree
make_kautz_graph

Kautz graphs
graph_from_lcf

Creating a graph from LCF notation
igraph-minus

Delete vertices or edges from a graph
hrg

Create a hierarchical random graph from an igraph graph
printer_callback

Create a printer callback function
layout_with_fr

The Fruchterman-Reingold layout algorithm
is_graphical

Is a degree sequence graphical?
laplacian_matrix

Graph Laplacian
make_chordal_ring

Create an extended chordal ring graph
igraph-vs-attributes

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

The default R palette
identical_graphs

Decide if two graphs are identical
incident

Incident edges of a vertex in a graph
plot.igraph

Plotting of graphs
layout_with_gem

The GEM layout algorithm
make_line_graph

Line graph of a graph
plot.sir

Plotting the results on multiple SIR model runs
layout.reingold.tilford

Deprecated layout functions
incident_edges

Incident edges of multiple vertices in a graph
make_clusters

Creates a communities object.
rev.igraph.vs

Reverse the order in a vertex sequence
rewire

Rewiring edges of a graph
igraph-attribute-combination

How igraph functions handle attributes when the graph changes
is_separator

Vertex separators
print.igraph.es

Print an edge sequence to the screen
path

Helper function to add or delete edges along a path
min_cut

Minimum cut in a graph
make_ring

Create a ring graph
is_weighted

Weighted graphs
merge_coords

Merging graph layouts
sample_dot_product

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

Show a vertex sequence on the screen
permute

Permute the vertices of a graph
knn

Average nearest neighbor degree
radius

Radius of a graph
random_walk

Random walk on a graph
layout_as_tree

The Reingold-Tilford graph layout algorithm
keeping_degseq

Graph rewiring while preserving the degree distribution
igraph-vs-indexing2

Select vertices and show their metadata
igraph-vs-indexing

Indexing vertex sequences
intersection.igraph.vs

Intersection of vertex sequences
layout_with_graphopt

The graphopt layout algorithm
make_

Make a new graph
layout_in_circle

Graph layout with vertices on a circle.
is_chordal

Chordality of a graph
sample_correlated_gnp

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

Graph motifs
isomorphisms

Calculate all isomorphic mappings between the vertices of two graphs
sample_last_cit

Random citation graphs
is_degseq

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

The Kamada-Kawai layout algorithm
is_dag

Directed acyclic graphs
max_flow

Maximum flow in a graph
ivs

Independent vertex sets
sample_fitness

Random graphs from vertex fitness scores
scg_semi_proj

Semi-Projectors
max_cardinality

Maximum cardinality search
is_bipartite

Create a bipartite graph
layout.svd

SVD layout, this was removed from igraph
sequential_pal

Sequential palette
layout_

Graph layouts
layout_as_star

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

Create a random regular graph
sample_seq

Sampling a random integer sequence
without_attr

Construtor modifier to remove all attributes from a graph
layout_with_sugiyama

The Sugiyama graph layout generator
sample_smallworld

The Watts-Strogatz small-world model
local_scan

Compute local scan statistics on graphs
sample_sphere_surface

Sample vectors uniformly from the surface of a sphere
sample_islands

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

Minimum size vertex separators
sample_correlated_gnp_pair

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

Sample vectors uniformly from the volume of a sphere
make_empty_graph

A graph with no edges
subgraph_isomorphic

Decide if a graph is subgraph isomorphic to another one
layout_as_bipartite

Simple two-row layout for bipartite graphs
simplify

Simple graphs
set_edge_attr

Set edge attributes
layout_with_dh

The Davidson-Harel layout algorithm
subgraph_isomorphisms

All isomorphic mappings between a graph and subgraphs of another graph
time_bins.sir

SIR model on graphs
min_st_separators

Minimum size vertex separators
layout_with_drl

The DrL graph layout generator
set_graph_attr

Set a graph attribute
make_full_graph

Create a full graph
split_join_distance

Split-join distance of two community structures
spectrum

Eigenvalues and eigenvectors of the adjacency matrix of a graph
%>%

Magrittr's pipes
match_vertices

Match Graphs given a seeding of vertex correspondences
union.igraph.vs

Union of vertex sequences
make_de_bruijn_graph

De Bruijn graphs
triad_census

Triad census, subgraphs with three vertices
vertex

Helper function for adding and deleting vertices
unique.igraph.es

Remove duplicate edges from an edge sequence
transitivity

Transitivity of a graph
unique.igraph.vs

Remove duplicate vertices from a vertex sequence
with_igraph_opt

Run code with a temporary igraph options setting
print.igraphHRG

Print a hierarchical random graph model to the screen
upgrade_graph

Igraph data structure versions
subgraph

Subgraph of a graph
is_matching

Graph matching
make_graph

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

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

Find subgraph centrality scores of network positions
make_tree

Create tree graphs
with_vertex_

Constructor modifier to add vertex attributes
without_loops

Constructor modifier to drop loop edges
Drawing graphs

Drawing graphs
print.igraphHRGConsensus

Print a hierarchical random graph consensus tree to the screen
print.nexusDatasetInfo

Query and download from the Nexus network repository
Pie charts as vertices

Using pie charts as vertices in graph plots
normalize

Normalize layout
motifs

Graph motifs
sample_forestfire

Forest Fire Network Model
page_rank

The Page Rank algorithm
read_graph

Reading foreign file formats
+.igraph

Add vertices, edges or another graph to a graph
reciprocity

Reciprocity of graphs
plot_dendrogram

Community structure dendrogram plots
norm_coords

Normalize coordinates for plotting graphs
sample_fitness_pl

Scale-free random graphs, from vertex fitness scores
rep.igraph

Replicate a graph multiple times
modularity.igraph

Modularity of a community structure of a graph
predict_edges

Predict edges based on a hierarchical random graph model
sample_gnm

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

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

Reverse the order in an edge sequence
sample_gnp

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

HRG dendrogram plot
print.igraph

Print graphs to the terminal
sample_dirichlet

Sample from a Dirichlet distribution
sample_grg

Geometric random graphs
running_mean

Running mean of a time series
rglplot

3D plotting of graphs with OpenGL
sample_traits_callaway

Graph generation based on different vertex types
sample_degseq

Generate random graphs with a given degree sequence
sample_

Sample from a random graph model
scan_stat

Scan statistics on a time series of graphs
scg_eps

Error of the spectral coarse graining (SCG) approximation
sample_growing

Growing random graph generation
scg_group

SCG Problem Solver
simplified

Constructor modifier to drop multiple and loop edges
strength

Strength or weighted vertex degree
similarity

Similarity measures of two vertices
sample_bipartite

Bipartite random graphs
[.igraph

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

Generate an evolving random graph with preferential attachment and aging
sample_hrg

Sample from a hierarchical random graph model
set_vertex_attr

Set vertex attributes
union.igraph.es

Union of edge sequences
shapes

Various vertex shapes when plotting igraph graphs
sample_pa

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

Sample the hierarchical stochastic block model
which_multiple

Find the multiple or loop edges in a graph
union.igraph

Union of graphs
sample_pref

Trait-based random generation
st_min_cuts

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

Constructor modifier to drop multiple edges
stochastic_matrix

Stochastic matrix of a graph
[[.igraph

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

Find mutual edges in a directed graph
write_graph

Writing the graph to a file in some format
sample_sbm

Sample stochastic block model
scg-method

Spectral Coarse Graining
subcomponent

In- or out- component of a vertex
union

Union of two or more sets
scg

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

Query vertex attributes of a graph
vertex_attr<-

Set one or more vertex attributes
with_edge_

Constructor modifier to add edge attributes
srand

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

Convert a general graph into a forest
with_graph_

Constructor modifier to add graph attributes
st_cuts

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

Interactive plotting of graphs
tail_of

Tails of the edge(s) in a graph
tkigraph

Experimental basic igraph GUI
topo_sort

Topological sorting of vertices in a graph
vertex_attr_names

List names of vertex attributes
vertex_connectivity

Vertex connectivity.