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
as_adjlist() as_inclist()
Adjacency lists and incidence lists
igraph_rng_seed()
Seeds a random number generator

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

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

Generating Layouts for Graph Drawing

layout_random() layout_drl() layout_fruchterman_reingold() layout_mds()
2D layout generators
layout_reingold_tilford() layout_reingold_tilford_circular()
Layouts for trees and acyclic graphs
layout_nicely()
Choose a layout algorithm automatically
augment(<igraph_ptr>) plot(<igraph_ptr>)
Methods for quick visualization
igraph_version()
Get the version of the igraph C library
common_params()
Common parameters used throughout the package

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