Learn R Programming

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

igraph (version 1.0.0)

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.0.0

License

GPL (>= 2)

Maintainer

Gabor Csardi

Last Published

June 24th, 2015

Functions in igraph (1.0.0)

automorphisms

Number of automorphisms
delete_graph_attr

Delete a graph attribute
get.edge.ids

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

Convert a graph to an adjacency matrix
igraph-vs-attributes

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

Create graphs from adjacency lists
constraint

Burt's constraint
as_ids

Convert a vertex or edge sequence to an ordinary vector
coreness

K-core decomposition of graphs
cluster_label_prop

Finding communities based on propagating labels
graphlet_basis

Graphlet decomposition of a graph
cluster_walktrap

Community strucure via short random walks
dfs

Depth-first search
c.igraph.es

Concatenate edge sequences
read_graph

Reading foreign file formats
igraph-es-indexing

Indexing edge sequences
component_wise

Component-wise layout
is_graphical

Is a degree sequence graphical?
rev.igraph.es

Reverse the order in an edge sequence
make_de_bruijn_graph

De Bruijn graphs
bfs

Breadth-first search
igraph-vs-indexing2

Select vertices and show their metadata
intersection.igraph

Intersection of graphs
gclust.rsvt

Graph Clustering Using SVT and NMF -- Clusters Implied by Singular Value Thresholding
graph_from_incidence_matrix

Create graphs from an incidence matrix
sample_pa_age

Generate an evolving random graph with preferential attachment and aging
sample_traits_callaway

Graph generation based on different vertex types
graph_from_literal

Creating (small) graphs via a simple interface
is_chordal

Chordality of a graph
ivs

Independent vertex sets
igraph_test

Run package tests
laplacian_matrix

Graph Laplacian
layout_on_grid

Simple grid layout
scg

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

The GEM layout algorithm
layout_with_kk

The Kamada-Kawai layout algorithm
shapes

Various vertex shapes when plotting igraph graphs
merge_coords

Merging graph layouts
add_layout_

Add layout to graph
tkigraph

Experimental basic igraph GUI
as.directed

Convert between directed and undirected graphs
vertex_connectivity

Vertex connectivity.
print.igraph

Print graphs to the terminal
layout_randomly

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

Find Bonacich alpha centrality scores of network positions
sample_fitness_pl

Scale-free random graphs, from vertex fitness scores
plot.sir

Plotting the results on multiple SIR model runs
sample_smallworld

The Watts-Strogatz small-world model
cluster_fast_greedy

Community structure via greedy optimization of modularity
as.igraph

Conversion to igraph
add_vertices

Add vertices to a graph
sample_gnp

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

Incidence matrix of a bipartite graph
time_bins.sir

SIR model on graphs
delete_vertex_attr

Delete a vertex attribute
authority_score

Kleinberg's authority centrality scores.
difference.igraph

Difference of graphs
delete_edges

Delete edges from a graph
without_loops

Constructor modifier to drop loop edges
sample_pref

Trait-based random generation
sample_hierarchical_sbm

Sample the hierarchical stochastic block model
sample_growing

Growing random graph generation
igraph-es-indexing2

Select edges and show their metadata
centr_betw

Centralize a graph according to the betweenness of vertices
membership

Functions to deal with the result of network community detection
canonical_permutation

Canonical permutation of a graph
plot_dendrogram.igraphHRG

HRG dendrogram plot
graph_attr<-

Set all or some graph attributes
split_join_distance

Split-join distance of two community structures
delete_vertices

Delete vertices from a graph
as_adj_list

Adjacency lists
component_distribution

Connected components of a graph
articulation_points

Articulation points of a graph
edge_attr<-

Set one or more edge attributes
hrg

Create a hierarchical random graph from an igraph graph
count_motifs

Graph motifs
as_edgelist

Convert a graph to an edge list
graph_

Convert object to a graph
union.igraph.vs

Union of vertex sequences
make_clusters

Creates a communities object.
igraph-minus

Delete vertices or edges from a graph
igraph-vs-indexing

Indexing vertex sequences
dim_select

Dimensionality selection for singular values using profile likelihood.
layout_as_star

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

Create an igraph graph from a hierarchical random graph model
girth

Girth of a graph
+.igraph

Add vertices, edges or another graph to a graph
print.igraph.vs

Show a vertex sequence on the screen
as_membership

Declare a numeric vector as a membership vector
layout_nicely

Choose an appropriate graph layout algorithm automatically
assortativity

Assortativity coefficient
edge_density

Graph density
sample_gnm

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

Spectral Embedding of the Laplacian of a Graph
E

Edges of a graph
sample_seq

Sampling a random integer sequence
layout_with_drl

The DrL graph layout generator
head_of

Head of the edge(s) in a graph
difference.igraph.vs

Difference of vertex sequences
edge

Helper function for adding and deleting edges
layout_in_circle

Graph layout with vertices on a circle.
igraph-package

The igraph package
gsize

The size of the graph (number of edges)
layout.spring

Spring layout, this was removed from igraph
identical_graphs

Decide if two graphs are identical
graph_from_graphnel

Convert graphNEL objects from the graph package to igraph
intersection

Intersection of two or more sets
max_flow

Maximum flow in a graph
keeping_degseq

Graph rewiring while preserving the degree distribution
is_named

Named graphs
layout.svd

SVD layout, this was removed from igraph
sample_islands

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

Centralize a graph according to the closeness of vertices
is_bipartite

Create a bipartite graph
make_tree

Create tree graphs
vertex_attr_names

List names of vertex attributes
compare

Compares community structures using various metrics
centralize

Centralization of a graph
make_line_graph

Line graph of a graph
permute

Permute the vertices of a graph
centr_degree_tmax

Theoretical maximum for degree centralization
layout_on_sphere

Graph layout with vertices on the surface of a sphere
consensus_tree

Create a consensus tree from several hierarchical random graph models
layout_with_graphopt

The graphopt layout algorithm
is_separator

Vertex separators
edge_connectivity

Edge connectivity.
union

Union of two or more sets
graph_from_edgelist

Create a graph from an edge list matrix
incident

Incident edges of a vertex in a graph
make_

Make a new graph
plot.igraph

Plotting of graphs
isomorphism_class

Isomorphism class of a graph
make_kautz_graph

Kautz graphs
eccentricity

Eccentricity of the vertices in a graph
knn

Average nearest neighbor degree
c.igraph.vs

Concatenate vertex sequences
rev.igraph.vs

Reverse the order in a vertex sequence
norm_coords

Normalize coordinates for plotting graphs
min_st_separators

Minimum size vertex separators
path

Helper function to add or delete edges along a path
sample_k_regular

Create a random regular graph
print.igraph.es

Print an edge sequence to the screen
sample_grg

Geometric random graphs
rewire

Rewiring edges of a graph
edge_attr

Query edge attributes of a graph
print.igraphHRGConsensus

Print a hierarchical random graph consensus tree to the screen
dyad_census

Dyad census of a graph
biconnected_components

Biconnected components
ego

Neighborhood of graph vertices
sample_correlated_gnp_pair

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

Scan statistics on a time series of graphs
sample_sbm

Sample stochastic block model
sample_fitness

Random graphs from vertex fitness scores
edge_attr_names

List names of edge attributes
eigen_centrality

Find Eigenvector Centrality Scores of Network Positions
diversity

Graph diversity
is_directed

Check whether a graph is directed
similarity

Similarity measures of two vertices
isomorphisms

Calculate all isomorphic mappings between the vertices of two graphs
isomorphic

Decide if two graphs are isomorphic
graph_version

Igraph data structure versions
power_centrality

Find Bonacich Power Centrality Scores of Network Positions
subgraph

Subgraph of a graph
topo_sort

Topological sorting of vertices in a graph
tkplot

Interactive plotting of graphs
union.igraph.es

Union of edge sequences
intersection.igraph.es

Intersection of edge sequences
unfold_tree

Convert a general graph into a forest
vertex_attr<-

Set one or more vertex attributes
make_lattice

Create a lattice graph
are_adjacent

Are two vertices adjacent?
is_igraph

Is this object an igraph graph?
spectrum

Eigenvalues and eigenvectors of the adjacency matrix of a graph
vertex

Helper function for adding and deleting vertices
which_multiple

Find the multiple or loop edges in a graph
scg_semi_proj

Semi-Projectors
without_attr

Construtor modifier to remove all attributes from a graph
arpack_defaults

ARPACK eigenvector calculation
transitivity

Transitivity of a graph
with_graph_

Constructor modifier to add graph attributes
without_multiples

Constructor modifier to drop multiple edges
make_chordal_ring

Create an extended chordal ring graph
upgrade_graph

Igraph data structure versions
vertex_attr

Query vertex attributes of a graph
igraph-es-attributes

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

Find mutual edges in a directed graph
V

Vertices of a graph
layout_with_sugiyama

The Sugiyama graph layout generator
estimate_betweenness

Vertex and edge betweenness centrality
page_rank

The Page Rank algorithm
min_separators

Minimum size vertex separators
sample_degseq

Generate random graphs with a given degree sequence
r_pal

The default R palette
dominator_tree

Dominator tree
predict_edges

Predict edges based on a hierarchical random graph model
sequential_pal

Sequential palette
bipartite_projection

Project a bipartite graph
st_min_cuts

List all minimum $(s,t)$-cuts of a graph
mst

Minimum spanning tree
local_scan

Compute local scan statistics on graphs
intersection.igraph.vs

Intersection of vertex sequences
sample_correlated_gnp

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

Sample vectors uniformly from the volume of a sphere
sample_dirichlet

Sample from a Dirichlet distribution
[[.igraph

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

Palette for categories
scg-method

Spectral Coarse Graining
layout_with_mds

Graph layout by multidimensional scaling
centr_clo_tmax

Theoretical maximum for closeness centralization
cluster_leading_eigen

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

In- or out- component of a vertex
compose

Compose two graphs as binary relations
%>%

Magrittr's pipes
write_graph

Writing the graph to a file in some format
print.igraphHRG

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

Remove duplicate vertices from a vertex sequence
sample_last_cit

Random citation graphs
random_walk

Random walk on a graph
tail_of

Tails of the edge(s) in a graph
unique.igraph.es

Remove duplicate edges from an edge sequence
embed_adjacency_matrix

Spectral Embedding of Adjacency Matrices
fit_hrg

Fit a hierarchical random graph model
graph_from_adjacency_matrix

Create graphs from adjacency matrices
simplify

Simple graphs
Pie charts as vertices

Using pie charts as vertices in graph plots
make_full_graph

Create a full graph
graph_from_lcf

Creating a graph from LCF notation
match_vertices

Match Graphs given a seeding of vertex correspondences
normalize

Normalize layout
cluster_spinglass

Finding communities in graphs based on statistical meachanics
cluster_optimal

Optimal community structure
print.nexusDatasetInfo

Query and download from the Nexus network repository
reciprocity

Reciprocity of graphs
centr_betw_tmax

Theoretical maximum for betweenness centralization
scg_group

SCG Problem Solver
subgraph_isomorphic

Decide if a graph is subgraph isomorphic to another one
closeness

Closeness centrality of vertices
sample_dot_product

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

Decompose a graph into components
difference.igraph.es

Difference of edge sequences
gclust.app

Graph Clustering Using NMF (and no SVT) -- Apparent Clusters
igraph_options

Parameters for the igraph package
set_graph_attr

Set a graph attribute
subgraph_isomorphisms

All isomorphic mappings between a graph and subgraphs of another graph
igraph-dollar

Getting and setting graph attributes, shortcut
layout_as_tree

The Reingold-Tilford graph layout algorithm
layout_with_lgl

Large Graph Layout
is_matching

Graph matching
rep.igraph

Replicate a graph multiple times
sample_

Sample from a random graph model
rglplot

3D plotting of graphs with OpenGL
with_edge_

Constructor modifier to add edge attributes
all_simple_paths

List all simple paths from one source
count_subgraph_isomorphisms

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

Disjoint union of graphs
fit_power_law

Fitting a power-law distribution function to discrete data
getAICc

Compute AIC based on a Poisson Approximation using the output from gclust
groups

Groups of a vertex partitioning
layout.fruchterman.reingold.grid

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

Maximum cardinality search
neighbors

Neighboring (adjacent) vertices in a graph
Drawing graphs

Drawing graphs
scg_eps

Error of the spectral coarse graining (SCG) approximation
strength

Strength or weighted vertex degree
add_edges

Add edges to a graph
complementer

Complementer of a graph
convex_hull

Convex hull of a set of vertices
degree

Degree and degree distribution of the vertices
delete_edge_attr

Delete an edge attribute
cliques

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

Centralize a graph according to the eigenvector centrality of vertices
diameter

Diameter of a graph
ends

Incident vertices of some graph edges
erdos.renyi.game

Generate random graphs according to the Erdos-Renyi model
adjacent_vertices

Adjacent vertices of multiple vertices in a graph
cluster_infomap

Infomap community finding
graph_attr

Graph attributes of a graph
cluster_louvain

Finding community structure by multi-level optimization of modularity
cohesive_blocks

Calculate Cohesive Blocks
graph_attr_names

List names of graph attributes
bipartite_mapping

Decide whether a graph is bipartite
contract

Contract several vertices into a single one
centr_eigen_tmax

Theoretical maximum for betweenness centralization
cocitation

Cocitation coupling
count_triangles

Find triangles in graphs
graph_from_atlas

Create a graph from the Graph Atlas
igraph_demo

Run igraph demos, step by step
igraph_version

Query igraph's version string
graph_from_graphdb

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

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

Community structure dendrogram plots
radius

Radius of a graph
curve_multiple

Optimal edge curvature when plotting graphs
diverging_pal

Diverging palette
layout_as_bipartite

Simple two-row layout for bipartite graphs
motifs

Graph motifs
each_edge

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

Sample from a hierarchical random graph model
sample_motifs

Graph motifs
sample_pa

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

Order (number of vertices) of a graph
sample_sphere_surface

Sample vectors uniformly from the surface of a sphere
is_weighted

Weighted graphs
set_edge_attr

Set edge attributes
running_mean

Running mean of a time series
make_full_citation_graph

Create a complete (full) citation graph
make_star

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

A graph with no edges
as_long_data_frame

Convert a graph to a long data frame
make_full_bipartite_graph

Create a full bipartite graph
set_vertex_attr

Set vertex attributes
as_graphnel

Convert igraph graphs to graphNEL objects from the graph package
centr_degree

Centralize a graph according to the degrees of vertices
stochastic_matrix

Stochastic matrix of a graph
console

The igraph console
count_isomorphisms

Count the number of isomorphic mappings between two graphs
difference

Difference of two sets
distance_table

Shortest (directed or undirected) paths between vertices
hrg-methods

Hierarchical random graphs
hub_score

Kleinberg's hub centrality scores.
is_min_separator

Minumal vertex separators
make_ring

Create a ring graph
layout_with_fr

The Fruchterman-Reingold layout algorithm
modularity.igraph

Modularity of a community structure of a graph
sample_forestfire

Forest Fire Network Model
simplified

Constructor modifier to drop multiple and loop edges
[.igraph

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

Find subgraph centrality scores of network positions
with_vertex_

Constructor modifier to add vertex attributes
cluster_edge_betweenness

Community structure detection based on edge betweenness
as_data_frame

Creating igraph graphs from data frames or vice-versa
graph_from_isomorphism_class

Create a graph from an isomorphism class
igraph-attribute-combination

How igraph functions handle attributes when the graph changes
incident_edges

Incident edges of multiple vertices in a graph
is_dag

Directed acyclic graphs
layout.reingold.tilford

Deprecated layout functions
layout_

Graph layouts
layout_with_dh

The Davidson-Harel layout algorithm
make_graph

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

Bipartite random graphs
srand

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

Minimum cut in a graph
triad_census

Triad census, subgraphs with three vertices
union.igraph

Union of graphs
st_cuts

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