Skip to contents

R Interface

is_igraph()
igraph_ptr: cpp11-powered class for igraph objects
as_igraph() as.data.frame(<igraph_ptr>) as.matrix(<igraph_ptr>)
Convert igraph objects to and from other formats.
graph_from_data_frame() graph_from_symbolic_edgelist() graph_from_edgelist()
Convert edge lists to igraph objects.
graph_empty() graph_copy()
Graph constructors
vcount() ecount() is_directed()
Basic query operations
edge() neighbors() incident() degree()
Basic query operations to get adjacency
add_edges() add_vertices() delete_edges() delete_vertices()
Adding and deleting vertices and edges
IGRAPH_VCOUNT_MAX IGRAPH_ECOUNT_MAX IGRAPH_UNLIMITED
Miscellaneous macros
as_adjlist() as_inclist()
Adjacency lists and incidence lists
igraph_rng_seed()
Seeds a random number generator

Graph Generators

Deterministic Graph Generators

graph_create()
Create a graph with the specified edges
graph_star()
Create a star graph
graph_square_lattice() graph_ring()
Create arbitrary dimensional lattices
graph_kary_tree()
Create a tree graph
graph_full()
Create a full graph (complete graph)
graph_famous()
Create a famous graph by simply providing its name

Stochastic Graph Generators (“games”)

erdos_renyi_game_gnm() erdos_renyi_game_gnp()
The Erdős-Rényi and related models
degree_sequence_game() k_regular_game() rewire()
Degree-constrained models
watts_strogatz_game() rewire_edges()
Edge rewiring models

Attributes of Graph, Vertices, and Edges

Vattr() `Vattr<-`() Eattr() `Eattr<-`() V() E()
Get and set vertex and edge attributes
Vnames() as_vids() as_vnames()
Conversion between vertex IDs and names
igraph_from() igraph_to()
Quick access to edge list columns
is_dag() is_acyclic()
Acyclic graphs and feedback sets
is_eulerian()
Eulerian cycles and paths

Generating Layouts for Graph Drawing

igraph_version()
Get the version of the igraph C library
common_params()
Common parameters used throughout the package

Reading and writing graphs from and to files

Other Packages

as_igraph(<phylo>) as_phylo()
Conversion between phylo and igraph
as_igraph(<tbl_tree>) as_tbl_tree()
Conversion between tbl_tree and igraph
is_sink() is_source() Vsink() Vsource()
Shortcuts to get sink/source vertices.
find_common_ancestors() upstream_vertices()
Experimental functions