Constructor modifiers (and related functions)
-make_()
,
-sample_()
,
+
@@ -43,7 +41,7 @@
diff --git a/reference/write_graph.html b/reference/write_graph.html
index d8e46a674c..d820f31b06 100644
--- a/reference/write_graph.html
+++ b/reference/write_graph.html
@@ -1,5 +1,5 @@
-Writing the graph to a file in some format — write_graph • igraphWriting the graph to a file in some format — write_graph • igraph
Skip to contents
@@ -9,7 +9,7 @@
igraph
- 2.1.1
+ 2.0.3
@@ -41,7 +39,7 @@
diff --git a/search.json b/search.json
index af16d75562..605ab42743 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":[]},{"path":"https://r.igraph.org/AUTHORS-list.html","id":"igraph-authors-in-alphabetical-order","dir":"","previous_headings":"","what":"igraph authors, in alphabetical order:","title":"Full list of authors","text":"Patrick R. Amestoy AMD library Adelchi Azzalini igraph.options based sm package Tamas Badics GLPK Gregory Benison Minimum cut calculation Adrian Bowman igraph.options based sm package Walter Böhm LSAP Keith Briggs Parts Nauty Graph Library Geometric random graphs Girth Various patches bug fixes Jeroen Bruggeman spinglass community detection Burt’s constraints Juergen Buchmueller Big number math implementation Carter T. Butts layout algorithms SNA R package bonpow function SNA R package R manual pages, SNA R package Aaron Clauset Hierarchical random graphs J.T. Conklin logbl function Topher Cooper GSL random number generators (used R) Gabor Csardi igraph Trevor Croft simpleraytracer Peter DalGaard zeroin root finder Timothy Davis CXSPARSE: Concise Sparse Matrix package - Extended AMD library Sparse matrix column ordering Laurent Deniau Bits error handling system Ulrich Drepper logbl function Iain S. Duff AMD library GLPK S.. Feldman f2c David Firth Display data frame Tk, relimp package P. Foggia VF2 graph isomorphism algorithm John Fox R: suppressing X11 warnings Alan George GLPK John Gilbert Sparse matrix column ordering D.Goldfarb GLPK Brian Gough GSL random number generators (used R) Tom Gregorovic Multilevel community detection M.Grigoriadis GLPK Oscar Gustafsson GLPK Kurt Hornik LSAP Szabolcs Horvat igraph C core library Paul Hsieh pstdint.h Ross Ihaka random number generators (used R) Tommi Junttila BLISS graph isomorphism library Petteri Kaski BLISS graph isomorphism library Oleg Keselyov zeroin root finder Darwin Klingman GLPK Donald E. Knuth GLPK Stefan . Larimore Sparse matrix column ordering Yusin Lee GLPK Richard Lehoucq ARPACK Rene Locher R arrow drawing function, IDPmisc package J.C. Nash BFGS optimizer Joseph W-H Liu GLPK Makoto Matsumoto GSL random number generators (used R) Vincent Matossian Graph laplacian igraph_neighborhood_graphs Line graphs Peter McMahan Cohesive blocking Andrew Makhorin GLPK David Morton de Lachapelle Spectral coarse graining Laurence Muller Fixes compilation MS Visual Studio Fionn Murtagh Order hierarchical clustering Emmanuel Navarro infomap community detection Various fixes patches Tamas Nepusz igraph Esmond Ng Sparse matrix column ordering Kevin O’Neill Maximal independent vertex sets Takuji Nishimura GSL random number generators (used R) Daniel Noom igraph C core library Jim Orlin GLPK Patric Ostergard GLPK Elliot Paquette psumtree data type Pascal Pons walktrap community detection Joerg Reichardt spinglass community detection Marc Rieffel GSL random number generators (used R) B.D. Ripley igraph.options based sm package BFGS optimizer Various bug fixes Martin Rosvall infomap community detection Andreas Ruckstuhl R arrow drawing function, IDPmisc package Heinrich Schuchardt GLPK J.K. Reid GLPK C. Sansone VF2 graph isomorphism algorithm Michael Schmuhl graphopt layout generator Christine Solnon LAD graph isomorphism library Danny Sorensen ARPACK James Theiler GSL random number generators (used R) Samuel Thiriot Interconnected islands graph generator Vincent . Traag igraph C core library Magnus Torfason R operators work name Theodore Y. Ts’o libuuid Minh Van Nguyen Microscopic update rules Various test cases Many documentation fixes M. Vento VF2 graph isomorphism algorithm Fabien Viger gengraph graph generator Phuong Vu ARPACK P.J. Weinberger f2c Garrett . Wollman qsort B.N. Wylie DrL layout generator Chao Yang ARPACK Fabio Zanini igraph C core library","code":""},{"path":"https://r.igraph.org/AUTHORS-list.html","id":"institutional-copyright-owners","dir":"","previous_headings":"","what":"Institutional copyright owners:","title":"Full list of authors","text":"Free Software Foundation, Inc Code generated bison Sandia Corporation DrL layout generator R Development Core Team random number generators (used R) R: .dendrogram stats package Regents University California qsort Xerox PARC Sparse matrix column ordering","code":""},{"path":"https://r.igraph.org/AUTHORS-list.html","id":"other-contributors","dir":"","previous_headings":"","what":"Other contributors","title":"Full list of authors","text":"Neal Becker Patches compile gcc 4.4 Richard Bowman R patches Alex Chen Patch compile Intel compilers Daniel Cordeiro Patches Tom Gregorovic Bug fixes Mayank Lahiri Forest fire game fix John Lapeyre Patches Christopher Lu Various fixes patches André Panisson R patches Bob Pap Bug fixes Keith Ponting R package bug fixes Martin J Reed Bug fixes Elena Tea Russo Bug fixes KennyTM Bug fixes Jordi Torrents Patches Matthew Walker Various patches Kai Willadsen Arrow size support Python","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to igraph","title":"Contributing to igraph","text":"outlines propose change igraph.","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to igraph","text":"can fix typos, spelling mistakes, grammatical errors documentation directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments .R, .Rd file. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"","what":"Bigger changes","title":"Contributing to igraph","text":"want make bigger change, ’s good idea first file issue make sure someone team agrees ’s needed. ’ve found bug, please file issue illustrates bug minimal reprex (also help write unit test, needed). See tidyverse guide create great issue advice.","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"dependencies-installation","dir":"","previous_headings":"Bigger changes","what":"Dependencies installation","title":"Contributing to igraph","text":"install dependencies igraph, including dependencies needed development, call, root rigraph Git repository:","code":"# All Imports and Suggests dependencies pak::pak() # Then install packages like roxygen2 add-ons pak::pak(dependencies = \"Config/Needs/build\")"},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"Bigger changes","what":"Pull request process","title":"Contributing to igraph","text":"Fork package clone onto computer. haven’t done , can use usethis::create_from_github(\"igraph/rigraph\", fork = TRUE). Install development dependencies pak::pak(), make sure package passes R CMD check running devtools::check(). R CMD check doesn’t pass cleanly, ’s good idea ask help continuing. Create Git branch pull request (PR). can use usethis, GitHub Desktop, etc. Make changes, commit git, create PR. title PR briefly describe change. body PR contain Fixes #issue-number.","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"Bigger changes","what":"Code style","title":"Contributing to igraph","text":"New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code nothing PR. use roxygen2, Markdown syntax, documentation. aspire document internal functions using devtag (thus documented yet). use testthat unit tests. Please add test cases change proposing, ask us help.","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"naming-conventions","dir":"","previous_headings":"Bigger changes","what":"Naming conventions","title":"Contributing to igraph","text":"Use max maximal largest maximum.","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"test-files","dir":"","previous_headings":"Bigger changes","what":"Test files","title":"Contributing to igraph","text":"strive align script test names. still work--progress goal code R/name.R tested tests/testthat/test-name.R. allows easy toggling two files thanks usethis::use_test() usethis::use_r().","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to igraph","text":"Please note igraph project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://r.igraph.org/articles/igraph.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"igraph (R interface)","text":"install library CRAN, use: details dependencies, requirements, troubleshooting installation found main documentation page.","code":"install.packages(\"igraph\")"},{"path":"https://r.igraph.org/articles/igraph.html","id":"usage","dir":"Articles","previous_headings":"","what":"Usage","title":"igraph (R interface)","text":"use igraph R code, must first load library: Now igraph functions available.","code":"library(\"igraph\") ## ## Attaching package: 'igraph' ## The following objects are masked from 'package:stats': ## ## decompose, spectrum ## The following object is masked from 'package:base': ## ## union"},{"path":"https://r.igraph.org/articles/igraph.html","id":"creating-a-graph","dir":"Articles","previous_headings":"","what":"Creating a graph","title":"igraph (R interface)","text":"igraph offers many ways create graph. simplest one function make_empty_graph(): common way create graph make_graph(), constructs network based specified edges. example, make graph 10 nodes (numbered 1 10) two edges connecting nodes 1-2 1-5: Starting igraph 0.8.0, can also include literal , via igraph’s formula notation. case, first term formula start ~ character, just like regular formulae R. expressions consist vertex names edge operators. edge operator sequence - + characters, former edges latter used arrow heads. edges can arbitrarily long, say, may use many - characters “draw” like. edge operators consist - characters graph undirected, whereas single + character implies directed graph: say create graph : can print graph get summary nodes edges: means: Undirected Named graph 10 vertices 2 edges, exact edges listed . graph [name] attribute, printed well. NOTE: summary() list edges, convenient large graphs millions edges: function make_graph() can create notable graphs just specifying name. example can create graph represents social network Zachary’s karate club, shows friendship 34 members karate club US university 1970s: visualize graph can use plot(): detailed description plotting options provided later tutorial.","code":"g <- make_empty_graph() g <- make_graph(edges = c(1, 2, 1, 5), n = 10, directed = FALSE) g <- make_graph(~ 1--2, 1--5, 3, 4, 5, 6, 7, 8, 9, 10) g ## IGRAPH 06bee96 UN-- 10 2 -- ## + attr: name (v/c) ## + edges from 06bee96 (vertex names): ## [1] 1--2 1--5 summary(g) ## IGRAPH 06bee96 UN-- 10 2 -- ## + attr: name (v/c) g <- make_graph(\"Zachary\") plot(g)"},{"path":"https://r.igraph.org/articles/igraph.html","id":"vertex-and-edge-ids","dir":"Articles","previous_headings":"","what":"Vertex and edge IDs","title":"igraph (R interface)","text":"Vertices edges numerical vertex IDs igraph. Vertex IDs always consecutive start 1. graph n vertices vertex IDs always 1 n. operation changes number vertices graphs, instance subgraph created via induced_subgraph(), vertices renumbered satisfy criterion. true edges well: edge IDs always 1 m, total number edges graph. NOTE: familiar C core Python interface igraph, might noticed languages vertex edge IDs start 0. R interface, start 1 instead, keep consistent convention language. addition IDs, vertices edges can assigned name attributes. makes easier track whenever graph altered. Examples pattern shown later tutorial.","code":""},{"path":"https://r.igraph.org/articles/igraph.html","id":"addingdeleting-vertices-and-edges","dir":"Articles","previous_headings":"","what":"Adding/deleting vertices and edges","title":"igraph (R interface)","text":"Let’s continue working Karate club graph. add one vertices existing graph, use add_vertices(): Similarly, add edges can use add_edges(): Edges added specifying source target vertex IDs edge. call added three edges, one connecting vertices 1 35, one connecting vertices 1 36, one connecting vertices 34 37. addition add_vertices() add_edges() functions, plus operator can used add vertices edges graph. actual operation performed depends type right hand side argument: can add single vertex/edge time using add_vertex() add_edge() (singular). Warning: need add multiple edges graph, much efficient call add_edges() rather repeatedly calling add_edge() single new edge. applies deleting edges vertices. try add edges vertices invalid IDs (.e., try add edge vertex 38 graph 37 vertices), igraph shows error: Let us add vertices edges graph. igraph can use magrittr package, provides mechanism chaining commands operator %>%: now undirected graph 40 vertices 86 edges. Vertex edge IDs always contiguous, delete vertex subsequent vertices renumbered. vertex renumbered, edges renumbered, source target vertices . Use delete_vertices() delete_edges() perform operations. instance, delete edge connecting vertices 1-34, get ID delete : example, create broken ring: example shows can also refer edges strings containing IDs source target vertices, connected pipe symbol |. \"10|1\" example means edge connects vertex 10 vertex 1. course can also use edge IDs directly, retrieve get_edge_ids() function: another example, let’s make chordal graph. Remember graph chordal (triangulated) cycles four nodes chord, edge joining two nodes adjacent cycle. First, let’s create initial graph using graph_from_literal(): example , : operator used define vertex sets. edge operator connects two vertex sets, every vertex first set connected every vertex second set. use is_chordal() evaluate graph chordal search edges missing fill-graph: can add edges required make initial graph chordal single line:","code":"g <- add_vertices(g, 3) g <- add_edges(g, edges = c(1, 35, 1, 36, 34, 37)) g <- g + edges(c(1, 35, 1, 36, 34, 37)) g <- add_edges(g, edges = c(38, 37)) ## Error in add_edges(g, edges = c(38, 37)): At vendor/cigraph/src/graph/type_indexededgelist.c:261 : Out-of-range vertex IDs when adding edges. Invalid vertex ID g <- g %>% add_edges(edges = c(1, 34)) %>% add_vertices(3) %>% add_edges(edges = c(38, 39, 39, 40, 40, 38, 40, 37)) g ## IGRAPH a7a89f3 U--- 40 86 -- Zachary ## + attr: name (g/c) ## + edges from a7a89f3: ## [1] 1-- 2 1-- 3 1-- 4 1-- 5 1-- 6 1-- 7 1-- 8 1-- 9 1--11 1--12 ## [11] 1--13 1--14 1--18 1--20 1--22 1--32 2-- 3 2-- 4 2-- 8 2--14 ## [21] 2--18 2--20 2--22 2--31 3-- 4 3-- 8 3--28 3--29 3--33 3--10 ## [31] 3-- 9 3--14 4-- 8 4--13 4--14 5-- 7 5--11 6-- 7 6--11 6--17 ## [41] 7--17 9--31 9--33 9--34 10--34 14--34 15--33 15--34 16--33 16--34 ## [51] 19--33 19--34 20--34 21--33 21--34 23--33 23--34 24--26 24--28 24--33 ## [61] 24--34 24--30 25--26 25--28 25--32 26--32 27--30 27--34 28--34 29--32 ## [71] 29--34 30--33 30--34 31--33 31--34 32--33 32--34 33--34 1--35 1--36 ## + ... omitted several edges edge_id_to_delete <- get_edge_ids(g, c(1, 34)) edge_id_to_delete ## [1] 82 g <- delete_edges(g, edge_id_to_delete) g <- make_ring(10) %>% delete_edges(\"10|1\") plot(g) g <- make_ring(5) g <- delete_edges(g, get_edge_ids(g, c(1, 5, 4, 5))) plot(g) g1 <- graph_from_literal( A - B:C:I, B - A:C:D, C - A:B:E:H, D - B:E:F, E - C:D:F:H, F - D:E:G, G - F:H, H - C:E:G:I, I - A:H ) plot(g1) is_chordal(g1, fillin = TRUE) ## $chordal ## [1] FALSE ## ## $fillin ## [1] 2 6 8 7 5 7 2 7 6 1 7 1 ## ## $newgraph ## NULL chordal_graph <- add_edges(g1, is_chordal(g1, fillin = TRUE)$fillin) plot(chordal_graph)"},{"path":"https://r.igraph.org/articles/igraph.html","id":"constructing-graphs","dir":"Articles","previous_headings":"","what":"Constructing graphs","title":"igraph (R interface)","text":"addition make_empty_graph(), make_graph(), make_graph_from_literal(), igraph includes many function construct graph. deterministic, say produce graph single time, instance make_tree(): generates regular tree graph 127 vertices, vertex two children. matter many times call make_tree(), generated graph always use parameters: functions generate graphs stochastically, means produce different graph time. instance sample_grg(): generates geometric random graph: n points chosen randomly uniformly inside unit square pairs points closer predefined distance d connected edge. generate GRGs parameters, different: slightly looser way check graphs equivalent via isomorphic. Two graphs said isomorphic number components (vertices edges) maintain one--one correspondence vertices edges, say, connected way. Checking isomorphism can take large graphs (case, answer can quickly given checking degree sequence two graphs). identical_graph() stricter criterion isomorphic(): two graphs must list vertices edges, exactly order, directedness, two graphs must also identical graph, vertex edge attributes.","code":"graph1 <- make_tree(127, 2, mode = \"undirected\") summary(graph1) ## IGRAPH cfd9c58 U--- 127 126 -- Tree ## + attr: name (g/c), children (g/n), mode (g/c) graph2 <- make_tree(127, 2, mode = \"undirected\") identical_graphs(graph1, graph2) ## [1] TRUE graph1 <- sample_grg(100, 0.2) summary(graph1) ## IGRAPH 9e5800a U--- 100 524 -- Geometric random graph ## + attr: name (g/c), radius (g/n), torus (g/l) graph2 <- sample_grg(100, 0.2) identical_graphs(graph1, graph2) ## [1] FALSE isomorphic(graph1, graph2) ## [1] FALSE"},{"path":"https://r.igraph.org/articles/igraph.html","id":"setting-and-retrieving-attributes","dir":"Articles","previous_headings":"","what":"Setting and retrieving attributes","title":"igraph (R interface)","text":"addition IDs, vertex edges can attributes name, coordinates plotting, metadata, weights. graph can attributes (instance name, show summary()). sense, every graph, vertex edge can used R namespace store retrieve attributes. demonstrate use attributes, let us create simple social network: vertex represents person, want store ages, genders types connection two people (is_formal() refers whether connection one person another formal informal, respectively colleagues friends). $ operator shortcut get set graph attributes. shorter just readable graph_attr() set_graph_attr(). V() E() standard way obtain sequence vertices edges, respectively. assigns attribute vertices/edges . Another way generate social network use set_vertex_attr() set_edge_attr() operator %>%: assign modify attribute single vertex/edge: Attribute values can set R object, note storing graph file formats might result loss complex attribute values. Vertices, edges graph can used set attributes, instance add date graph: retrieve attributes, can also use graph_attr(), vertex_attr(), edge_attr(). find ID vertex can use function match(): assign attributes subset vertices edges, can use: delete attributes: want save graph R attributes use R’s standard function dput() function retrieve later dget(). can also just save R workspace restore later.","code":"g <- make_graph( ~ Alice - Boris:Himari:Moshe, Himari - Alice:Nang:Moshe:Samira, Ibrahim - Nang:Moshe, Nang - Samira ) V(g)$age <- c(25, 31, 18, 23, 47, 22, 50) V(g)$gender <- c(\"f\", \"m\", \"f\", \"m\", \"m\", \"f\", \"m\") E(g)$is_formal <- c(FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE) summary(g) ## IGRAPH 74d12c9 UN-- 7 9 -- ## + attr: name (v/c), age (v/n), gender (v/c), is_formal (e/l) g <- make_graph( ~ Alice - Boris:Himari:Moshe, Himari - Alice:Nang:Moshe:Samira, Ibrahim - Nang:Moshe, Nang - Samira ) %>% set_vertex_attr(\"age\", value = c(25, 31, 18, 23, 47, 22, 50)) %>% set_vertex_attr(\"gender\", value = c(\"f\", \"m\", \"f\", \"m\", \"m\", \"f\", \"m\")) %>% set_edge_attr(\"is_formal\", value = c(FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE)) summary(g) E(g)$is_formal ## [1] FALSE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE E(g)$is_formal[1] <- TRUE E(g)$is_formal ## [1] TRUE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE g$date <- c(\"2022-02-11\") graph_attr(g, \"date\") ## [1] \"2022-02-11\" match(c(\"Ibrahim\"), V(g)$name) ## [1] 7 V(g)$name[1:3] <- c(\"Alejandra\", \"Bruno\", \"Carmina\") V(g) ## + 7/7 vertices, named, from 74d12c9: ## [1] Alejandra Bruno Carmina Moshe Nang Samira Ibrahim g <- delete_vertex_attr(g, \"gender\") V(g)$gender ## NULL"},{"path":"https://r.igraph.org/articles/igraph.html","id":"structural-properties-of-graphs","dir":"Articles","previous_headings":"","what":"Structural properties of graphs","title":"igraph (R interface)","text":"igraph provides large set functions calculate various structural properties graphs. beyond scope tutorial document , hence section introduce illustrative purposes. work small social network constructed previous section. Perhaps simplest property one can think degree. degree vertex equals number edges adjacent . case directed networks, can also define -degree (number edges pointing towards vertex) -degree (number edges originating vertex). igraph able calculate using simple syntax: graph directed, able calculate - -degrees separately using degree(mode = \"\") degree(mode = \"\"). can also pass single vertex ID list vertex IDs degree() want calculate degrees subset vertices: functions accept vertex IDs also accept vertex names (values name vertex attribute) long names unique: also works single vertices: similar syntax used structural properties igraph can calculate. vertex properties, functions accept vertex ID, vertex name, list vertex IDs names (omitted, default set vertices). edge properties, functions accept single edge ID list edge IDs. NOTE: measures, make sense calculate vertices edges instead whole graph, take time anyway. case, functions won’t accept vertex edge IDs, can still restrict resulting list later using standard operations. One example eigenvector centrality (evcent()). Besides degree, igraph includes built-routines calculate many centrality properties, including vertex edge betweenness (edge_betweenness()) Google’s PageRank (page_rank()) just name . just illustrate edge betweenness: Now can also figure connections highest betweenness centrality:","code":"degree(g) ## Alejandra Bruno Carmina Moshe Nang Samira Ibrahim ## 3 1 4 3 3 2 2 degree(g, 7) ## Ibrahim ## 2 degree(g, v = c(3, 4, 5)) ## Carmina Moshe Nang ## 4 3 3 degree(g, v = c(\"Carmina\", \"Moshe\", \"Nang\")) ## Carmina Moshe Nang ## 4 3 3 degree(g, \"Bruno\") ## Bruno ## 1 edge_betweenness(g) ## [1] 6 6 4 3 4 4 4 2 3 ebs <- edge_betweenness(g) as_edgelist(g)[ebs == max(ebs), ] ## [,1] [,2] ## [1,] \"Alejandra\" \"Bruno\" ## [2,] \"Alejandra\" \"Carmina\""},{"path":[]},{"path":"https://r.igraph.org/articles/igraph.html","id":"selecting-vertices","dir":"Articles","previous_headings":"Querying vertices and edges based on attributes","what":"Selecting vertices","title":"igraph (R interface)","text":"Imagine given social network, want find largest degree. can tools presented far .max() function: Another example select vertices odd IDs even ones, using V() function: course, possible select vertices edges positional indices: Selecting vertex exist results error: Attribute names can also used -within indexing brackets V() E(). can combined R’s ability use Boolean vectors indexing obtain concise readable expressions retrieve subset vertex edge set graph. instance, following command gives names individuals younger 30 years social network: course, < boolean operator can used . possibilities include following: can also create “” operator %% using Negate() function: attribute name igraph function, careful syntax can become little confusing. instance, attribute named degree represents grades exam person, confused igraph function computes degrees vertices network sense:","code":"which.max(degree(g)) ## Carmina ## 3 graph <- graph.full(n = 10) ## Warning: `graph.full()` was deprecated in igraph 2.1.0. ## ℹ Please use `make_full_graph()` instead. ## This warning is displayed once every 8 hours. ## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was ## generated. only_odd_vertices <- which(V(graph) %% 2 == 1) length(only_odd_vertices) ## [1] 5 seq <- V(graph)[2, 3, 7] seq ## + 3/10 vertices, from b51f27c: ## [1] 2 3 7 seq <- seq[1, 3] # filtering an existing vertex set seq ## + 2/10 vertices, from b51f27c: ## [1] 2 7 seq <- V(graph)[2, 3, 7, \"foo\", 3.5] ## Error in simple_vs_index(x, ii, na_ok) : Unknown vertex selected V(g)[age < 30]$name ## [1] \"Alejandra\" \"Carmina\" \"Moshe\" \"Samira\" `%notin%` <- Negate(`%in%`) V(g)$degree <- c(\"A\", \"B\", \"B+\", \"A+\", \"C\", \"A\", \"B\") V(g)$degree[degree(g) == 3] ## [1] \"A\" \"A+\" \"C\" V(g)$name[degree(g) == 3] ## [1] \"Alejandra\" \"Moshe\" \"Nang\""},{"path":"https://r.igraph.org/articles/igraph.html","id":"selecting-edges","dir":"Articles","previous_headings":"Querying vertices and edges based on attributes","what":"Selecting edges","title":"igraph (R interface)","text":"Edges can selected based attributes just like vertices. mentioned , standard way get edges E. Moreover, special structural properties selecting edges. Using .() allows filter edge sequence based source vertices edges. instance, select edges originating Carmina (vertex index 3): course also works vertex names: Using .() filters edge sequences based target vertices. different .() graph directed, gives answer undirected graphs. Using .inc() selects edges incident single vertex least one vertices, irrespective edge directions. %--% operator can used select edges specific groups vertices, ignoring edge directions directed graphs. instance, following expression selects edges Carmina (vertex index 3), Nang (vertex index 5) Samira (vertex index 6): make %--% operator work names, can build string vectors containing names use vectors operands. instance, select edges connect men women, can following re-adding gender attribute deleted earlier:","code":"E(g)[.from(3)] ## + 4/9 edges from 74d12c9 (vertex names): ## [1] Alejandra--Carmina Carmina --Moshe Carmina --Nang Carmina --Samira E(g)[.from(\"Carmina\")] ## + 4/9 edges from 74d12c9 (vertex names): ## [1] Alejandra--Carmina Carmina --Moshe Carmina --Nang Carmina --Samira E(g)[3:5 %--% 5:6] ## + 3/9 edges from 74d12c9 (vertex names): ## [1] Carmina--Nang Carmina--Samira Nang --Samira V(g)$gender <- c(\"f\", \"m\", \"f\", \"m\", \"m\", \"f\", \"m\") men <- V(g)[gender == \"m\"]$name men ## [1] \"Bruno\" \"Moshe\" \"Nang\" \"Ibrahim\" women <- V(g)[gender == \"f\"]$name women ## [1] \"Alejandra\" \"Carmina\" \"Samira\" E(g)[men %--% women] ## + 5/9 edges from 74d12c9 (vertex names): ## [1] Alejandra--Bruno Alejandra--Moshe Carmina --Moshe Carmina --Nang ## [5] Nang --Samira"},{"path":"https://r.igraph.org/articles/igraph.html","id":"treating-a-graph-as-an-adjacency-matrix","dir":"Articles","previous_headings":"","what":"Treating a graph as an adjacency matrix","title":"igraph (R interface)","text":"adjacency matrix another way represent graph. adjacency matrix, rows columns labeled graph vertices, elements matrix indicate number edges vertices j. adjacency matrix example graph : example, Carmina (1, 0, 0, 1, 1, 1, 0) directly connected Alejandra (vertex index 1), Moshe (index 4), Nang (index 5) Samira (index 6), Bruno (index 2) Ibrahim (index 7).","code":"as_adjacency_matrix(g) ## 7 x 7 sparse Matrix of class \"dgCMatrix\" ## Alejandra Bruno Carmina Moshe Nang Samira Ibrahim ## Alejandra . 1 1 1 . . . ## Bruno 1 . . . . . . ## Carmina 1 . . 1 1 1 . ## Moshe 1 . 1 . . . 1 ## Nang . . 1 . . 1 1 ## Samira . . 1 . 1 . . ## Ibrahim . . . 1 1 . ."},{"path":"https://r.igraph.org/articles/igraph.html","id":"layouts-and-plotting","dir":"Articles","previous_headings":"","what":"Layouts and plotting","title":"igraph (R interface)","text":"graph abstract mathematical object without specific representation 2D, 3D geometric space. means whenever want visualise graph, find mapping vertices coordinates two- three-dimensional space first, preferably way useful /pleasing eye. separate branch graph theory, namely graph drawing, tries solve problem via several graph layout algorithms. igraph implements quite layout algorithms also able draw onto screen output format R supports.","code":""},{"path":"https://r.igraph.org/articles/igraph.html","id":"layout-algorithms","dir":"Articles","previous_headings":"Layouts and plotting","what":"Layout algorithms","title":"igraph (R interface)","text":"layout functions igraph always start layout. following table summarises : Layout algorithms can called directly graph first argument. return matrix two columns many rows number vertices graph; row correspond position single vertex, ordered vertex IDs. algorithms 3D variant; case return 3 columns instead 2. layout algorithms take additional arguments; instance, laying graph tree, might make sense specify vertex placed root layout:","code":"layout <- layout_with_kk(g) layout <- layout_as_tree(g, root = 2)"},{"path":"https://r.igraph.org/articles/igraph.html","id":"drawing-a-graph-using-a-layout","dir":"Articles","previous_headings":"Layouts and plotting","what":"Drawing a graph using a layout","title":"igraph (R interface)","text":"can plot imaginary social network Kamada-Kawai layout algorithm follows: open new window showing visual representation network. Remember exact placement nodes may different machine since layout deterministic. layout argument also accepts functions; case, function called graph first argument. makes possible just pass name layout function directly, without creating layout variable: improve visuals, trivial addition color vertices according gender. also try place labels slightly outside vertices improve readability: can also treat gender attribute factor provide colors argument plot(), takes precedence color vertex attribute. Colors assigned automatically levels factor: seen vertex.color argument, can specify visual properties arguments plot instead using vertex edge attributes. following plot shows formal ties thick lines informal ones thin lines: latter approach preferred want keep properties visual representation graph separate graph . summary, special vertex edge properties correspond visual representation graph. attributes override default settings igraph (.e color, weight, name, shape, layout, etc.). following two tables summarise frequently used visual attributes vertices edges, respectively:","code":"layout <- layout_with_kk(g) plot(g, layout = layout, main = \"Social network with the Kamada-Kawai layout algorithm\") plot( g, layout = layout_with_fr, main = \"Social network with the Fruchterman-Reingold layout algorithm\" ) V(g)$color <- ifelse(V(g)$gender == \"m\", \"yellow\", \"red\") plot( g, layout = layout, vertex.label.dist = 3.5, main = \"Social network - with genders as colors\" ) plot(g, layout = layout, vertex.label.dist = 3.5, vertex.color = as.factor(V(g)$gender)) plot(g, layout = layout, vertex.label.dist = 3.5, vertex.size = 20, vertex.color = ifelse(V(g)$gender == \"m\", \"yellow\", \"red\"), edge.width = ifelse(E(g)$is_formal, 5, 1) )"},{"path":[]},{"path":[]},{"path":"https://r.igraph.org/articles/igraph.html","id":"generic-arguments-of-plot","dir":"Articles","previous_headings":"Layouts and plotting","what":"Generic arguments of plot()","title":"igraph (R interface)","text":"settings can specified arguments plot function control overall appearance plot.","code":""},{"path":"https://r.igraph.org/articles/igraph.html","id":"igraph-and-the-outside-world","dir":"Articles","previous_headings":"","what":"igraph and the outside world","title":"igraph (R interface)","text":"graph module complete without kind import/export functionality enables package communicate external programs toolkits. igraph exception: provides functions read common graph formats save graphs files obeying format specifications. main functions reading writing /file read_graph() write_graph(), respectively. following table summarises formats igraph can read write: NOTE: file format limitations. instance, can store attributes. best bet probably GraphML GML want save igraph graphs format can read external package want preserve numeric string attributes. Edge list NCOL also fine don’t attributes (NCOL supports vertex names edge weights, though).","code":""},{"path":"https://r.igraph.org/articles/igraph.html","id":"where-to-go-next","dir":"Articles","previous_headings":"","what":"Where to go next","title":"igraph (R interface)","text":"tutorial brief introduction igraph R. sincerely hope enjoyed reading useful network analyses. detailed description specific functions, see https://r.igraph.org/reference/. questions use igraph, please visit Forum. report bug, open Github issue. Please ask usage questions Github directly ’s meant developers rather users.","code":""},{"path":"https://r.igraph.org/articles/igraph.html","id":"session-info","dir":"Articles","previous_headings":"","what":"Session info","title":"igraph (R interface)","text":"sake reproducibility, session information code following:","code":"sessionInfo() ## R version 4.4.1 (2024-06-14) ## Platform: x86_64-pc-linux-gnu ## Running under: Ubuntu 22.04.5 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 ## [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 ## [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C ## [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] igraph_2.1.1 ## ## loaded via a namespace (and not attached): ## [1] crayon_1.5.3 vctrs_0.6.5 cli_3.6.3 knitr_1.48 ## [5] rlang_1.1.4 xfun_0.48 highr_0.11 textshaping_0.4.0 ## [9] jsonlite_1.8.9 glue_1.8.0 htmltools_0.5.8.1 ragg_1.3.3 ## [13] sass_0.4.9 fansi_1.0.6 rmarkdown_2.28 grid_4.4.1 ## [17] evaluate_1.0.1 jquerylib_0.1.4 fastmap_1.2.0 yaml_2.3.10 ## [21] lifecycle_1.0.4 compiler_4.4.1 fs_1.6.4 htmlwidgets_1.6.4 ## [25] pkgconfig_2.0.3 lattice_0.22-6 systemfonts_1.1.0 digest_0.6.37 ## [29] R6_2.5.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 ## [33] Matrix_1.7-0 bslib_0.8.0 tools_4.4.1 pkgdown_2.1.1 ## [37] cachem_1.1.0 desc_1.4.3"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"instalación","dir":"Articles","previous_headings":"","what":"Instalación","title":"igraph (interfaz R)","text":"Para instalar la librería desde CRAN, usa: Encontrarás más información sobre dependencias, requisitos y resolución de problemas sobre la instalación en la página principal.","code":"install.packages(\"igraph\")"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"uso-de-igraph","dir":"Articles","previous_headings":"","what":"Uso de igraph","title":"igraph (interfaz R)","text":"Para utilizar igraph en tu código de R, primero debes cargar la biblioteca: Ahora tienes todas las funciones de igraph disponibles.","code":"library(\"igraph\") ## ## Attaching package: 'igraph' ## The following objects are masked from 'package:stats': ## ## decompose, spectrum ## The following object is masked from 'package:base': ## ## union"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"crear-un-grafo","dir":"Articles","previous_headings":"","what":"Crear un grafo","title":"igraph (interfaz R)","text":"igraph ofrece muchas formas de crear un grafo. La más sencilla es con la función make_empty_graph(): La forma más común de crear un grafo es con make_graph(), que construye un grafo basado en especificar las aristas. Por ejemplo, Para hacer un grafo con 10 nodos (numerados 1 10) y dos aristas que conecten los nodos 1-2 y 1-5: partir de igraph 0.8.0, también puedes incluir literales mediante la notación de fórmulas de igraph. En este caso, el primer término de la fórmula tiene que empezar con un carácter ~, como comúnmente se usa en las fórmulas en R. Las expresiones constan de los nombres de los vértices y los operadores de las aristas. El operador de un arista es una secuencia de caracteres - y +, el primero es para indicar propiamente las aristas y el segundo para las puntas de flecha (dirección). Puedes utilizar tantos caracteres - como quieras para “dibujarlas”. Si todos los operadores de un arista están formados únicamente por caracteres -, el grafo será dirigido, mientras que un único carácter + implica un grafo dirigido. Por ejemplo, para crear el mismo grafo que antes: Podemos imprimir el grafo para obtener un resumen de sus nodos y aristas: Esto significa: grafo dirigido (Undirected) con 10 vértices y 2 aristas, que se enlistan en la última parte. Si el grafo tiene un atributo [nombre], también se imprime. NOTA: summary() enlista las aristas, lo cual es conveniente para grafos grandes con millones de aristas: También make_graph() puede crear algunos grafos destacados con sólo especificar su nombre. Por ejemplo, puedes generar el grafo que muestra la red social del club de kárate de Zachary, que refleja la amistad entre los 34 miembros del club de una universidad de los Estados Unidos en la década de los 70s: Para observar un grafo puedes utilizar plot(): Más adelante en este tutorial se ofrece una descripción detallada de las opciones para graficar un grafo.","code":"g <- make_empty_graph() g <- make_graph(edges = c(1,2, 1,5), n=10, directed = FALSE) g <- make_graph(~ 1--2, 1--5, 3, 4, 5, 6, 7, 8, 9, 10) g ## IGRAPH ff26282 UN-- 10 2 -- ## + attr: name (v/c) ## + edges from ff26282 (vertex names): ## [1] 1--2 1--5 summary(g) ## IGRAPH ff26282 UN-- 10 2 -- ## + attr: name (v/c) g <- make_graph(\"Zachary\") plot(g)"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"ids-de-vértices-y-aristas","dir":"Articles","previous_headings":"","what":"IDs de vértices y aristas","title":"igraph (interfaz R)","text":"Los vértices y las aristas tienen un identificador numérico en igraph. Los ID de los vértices son siempre consecutivos y empiezan por 1. Para un grafo con “n” vértices, los ID de los vértices están siempre entre 1 y “n”. Si alguna operación cambia el número de vértices en los grafos, por ejemplo, se crea un subgrafo mediante induced_subgraph(), entonces los vértices se vuelven enumerar para satisfacer este criterio. Lo mismo ocurre con las aristas: los ID de las aristas están siempre entre 1 y “m”, el número total de aristas del grafo. NOTA: Si estás familiarizado con C o con la interfaz Python de igraph, te habrás dado cuenta de que en esos lenguajes los IDs de vértices y aristas empiezan por 0. En la interfaz de R, ambos empiezan por 1, para mantener la coherencia con la convención de cada lenguaje. Además de los IDs, los vértices y aristas se les puede asignar un nombre y otros atributos. Esto facilita su seguimiento cada vez que se altera un grafo. Más adelante en este tutorial se muestran ejemplos de cómo alterar estas características.","code":""},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"añadir-y-borrar-vértices-y-aristas","dir":"Articles","previous_headings":"","what":"Añadir y borrar vértices y aristas","title":"igraph (interfaz R)","text":"Sigamos trabajando con el grafo del club de kárate. Para añadir uno o más vértices un grafo existente, utiliza add_vertices(): Del mismo modo, para añadir aristas puedes utilizar add_edges(): Las aristas se añaden especificando el ID del vértice origen y el vértice destino de cada arista. Con las instrucciones anteriores se añaden tres aristas, una que conecta los vértices 1 y 35, otra que conecta los vértices 1 y 36 y otra que conecta los vértices 34 y 37. Además de las funciones add_vertices() y add_edges(), se puede utilizar el operador “+” para añadir vértices o aristas al grafo. La operación que se realice dependerá del tipo de argumento del lado derecho: Puedes añadir un solo vértice/arista la vez usando add_vertex() y add_edge() (singular). Advertencia: Si necesitas añadir múltiples aristas un grafo, es mucho más eficiente usar add_edges() una vez que utilizar repetidamente add_edge() con una nueva arista la vez. Lo mismo ocurre al eliminar aristas y vértices. Si intentas añadir aristas vértices con IDs válidos (por ejemplo, intentas añadir una arista al vértice 38 cuando el grafo sólo tiene 37 vértices), igraph muestra un error: Añadamos más vértices y aristas nuestro grafo. En igraph podemos utilizar el paquete magrittr, que proporciona un mecanismo para encadenar comandos con el operador %>%: Ahora tenemos un grafo dirigido con 40 vértices y 89 aristas. Los IDs de los vértices y aristas son siempre contiguos, así que si borras un vértice, todos los vértices subsecuentes se vuelven enumerar. Cuando se re-numera un vértice, las aristas se vuelven enumerar, pero sí sus vértices origen y destino. Puedes usar delete_vertices() y delete_edges() para realizar estas operaciones. Por ejemplo, para borrar la arista que conecta los vértices 1-34, obtén su ID y luego bórrala: Por ejemplo, para crear un grafo con forma de anillo y para partirlo: El ejemplo anterior muestra que también puedes referirte las aristas indicando los IDs de los vértices origen y destino, conectados por el símbolo |. En el ejemplo, \"10|1\" significa la arista que conecta el vértice 10 con el vértice 1. Por supuesto, también puedes usar los IDs de las aristas directamente, o recuperarlos con la función get_edge_ids(): Veamos otro ejemplo, hagamos un grafo cordal. Recuerda que un grafo es cordal (o triangulado) si cada uno de sus ciclos de cuatro o más nodos tienen una “cuerda”, que es una arista que une dos nodos que son adyacentes en el ciclo. En primer lugar, vamos crear el grafo inicial utilizando graph_from_literal(): En este ejemplo, se ha utilizado el operador : para definir conjuntos de vértices. Si el operador de un arista conecta dos conjuntos de vértices, entonces cada vértice del primer conjunto estará conectado cada vértice del segundo conjunto. continuación utilizamos is_chordal() para evaluar si nuestro grafo es cordal y buscar qué aristas faltan para rellenar el grafo: Luego, en una sola línea podemos añadir las aristas necesarias para que el grafo inicial sea cordal:","code":"g <- add_vertices(g, 3) g <- add_edges(g, edges = c(1,35, 1,36, 34,37)) g <- g + edges(c(1,35, 1,36, 34,37)) g <- add_edges(g, edges = c(38, 37)) ## Error in add_edges(g, edges = c(38, 37)): At vendor/cigraph/src/graph/type_indexededgelist.c:261 : Out-of-range vertex IDs when adding edges. Invalid vertex ID g <- g %>% add_edges(edges = c(1, 34)) %>% add_vertices(3) %>% add_edges(edges = c(38, 39, 39, 40, 40, 38, 40, 37)) g ## IGRAPH ef7b81f U--- 40 86 -- Zachary ## + attr: name (g/c) ## + edges from ef7b81f: ## [1] 1-- 2 1-- 3 1-- 4 1-- 5 1-- 6 1-- 7 1-- 8 1-- 9 1--11 1--12 ## [11] 1--13 1--14 1--18 1--20 1--22 1--32 2-- 3 2-- 4 2-- 8 2--14 ## [21] 2--18 2--20 2--22 2--31 3-- 4 3-- 8 3--28 3--29 3--33 3--10 ## [31] 3-- 9 3--14 4-- 8 4--13 4--14 5-- 7 5--11 6-- 7 6--11 6--17 ## [41] 7--17 9--31 9--33 9--34 10--34 14--34 15--33 15--34 16--33 16--34 ## [51] 19--33 19--34 20--34 21--33 21--34 23--33 23--34 24--26 24--28 24--33 ## [61] 24--34 24--30 25--26 25--28 25--32 26--32 27--30 27--34 28--34 29--32 ## [71] 29--34 30--33 30--34 31--33 31--34 32--33 32--34 33--34 1--35 1--36 ## + ... omitted several edges edge_id_para_borrar <- get_edge_ids(g, c(1,34)) edge_id_para_borrar ## [1] 82 g <- delete_edges(g, edge_id_para_borrar) g <- make_ring(10) %>% delete_edges(\"10|1\") plot(g) g <- make_ring(5) g <- delete_edges(g, get_edge_ids(g, c(1,5, 4,5))) plot(g) g1 <- graph_from_literal( A-B:C:I, B-A:C:D, C-A:B:E:H, D-B:E:F, E-C:D:F:H, F-D:E:G, G-F:H, H-C:E:G:I, I-A:H ) plot(g1) is_chordal(g1, fillin=TRUE) ## $chordal ## [1] FALSE ## ## $fillin ## [1] 2 6 8 7 5 7 2 7 6 1 7 1 ## ## $newgraph ## NULL chordal_graph <- add_edges(g1, is_chordal(g1, fillin=TRUE)$fillin) plot(chordal_graph)"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"construcción-de-grafos","dir":"Articles","previous_headings":"","what":"Construcción de grafos","title":"igraph (interfaz R)","text":"Además de make_empty_graph(), make_graph() y make_graph_from_literal(), igraph incluye muchas otras funciones para construir un grafo. Algunas son deterministas, es decir, producen el mismo grafo cada vez, por ejemplo make_tree(): Esto genera un grafo regular en forma de árbol con 127 vértices, cada vértice con dos hijos. importa cuántas veces llames make_tree(), el grafo generado será siempre el mismo si utilizas los mismos parámetros: Otras funciones son estocásticas, lo cual quiere decir que producen un grafo diferente cada vez; por ejemplo, sample_grg(): Esto genera un grafo geométrico aleatorio: Se eligen n puntos de forma aleatoria y uniforme dentro del espacio métrico, y los pares de puntos más cercanos entre sí respecto una distancia predeterminada d se conectan mediante una arista. Si se generan GRGs con los mismos parámetros, serán diferentes: Una forma un poco más relajada de comprobar si los grafos son equivalentes es mediante isomorphic(). Se dice que dos grafos son isomorfos si tienen el mismo número de componentes (vértices y aristas) y mantienen una correspondencia uno uno entre vértices y aristas, es decir, están conectados de la misma manera: Comprobar el isomorfismo puede llevar un tiempo en el caso de grafos grandes (en este caso, la respuesta puede darse rápidamente comprobando la secuencia de grados de los dos grafos). identical_graph() es un criterio más estricto que isomorphic(): los dos grafos deben tener la misma lista de vértices y aristas, exactamente en el mismo orden, con la misma direccionalidad, y los dos grafos también deben tener idénticos atributos de grafo, vértice y arista.","code":"graph1 <- make_tree(127, 2, mode = \"undirected\") summary(g) ## IGRAPH 8a8fc6e U--- 5 3 -- Ring graph ## + attr: name (g/c), mutual (g/l), circular (g/l) graph2 <- make_tree(127, 2, mode = \"undirected\") identical_graphs(graph1, graph2) ## [1] TRUE graph1 <- sample_grg(100, 0.2) summary(graph1) ## IGRAPH e60a86e U--- 100 524 -- Geometric random graph ## + attr: name (g/c), radius (g/n), torus (g/l) graph2 <- sample_grg(100, 0.2) identical_graphs(graph1, graph2) ## [1] FALSE isomorphic(graph1, graph2) ## [1] FALSE"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"establecer-y-recuperar-atributos","dir":"Articles","previous_headings":"","what":"Establecer y recuperar atributos","title":"igraph (interfaz R)","text":"Además de los IDs, los vértices y aristas pueden tener atributos como un nombre, coordenadas para graficar, metadatos y pesos. El propio grafo también puede tener estos atributos (por ejemplo, un nombre, que se mostrará en summary). En cierto sentido, cada grafo, vértice y arista puede ser utilizado como un espacio de nombres en R para almacenar y recuperar estos atributos. Para demostrar el uso de los atributos, creemos una red social sencilla: Cada vértice representa una persona, por lo que queremos almacenar sus edades, géneros y el tipo de conexión entre dos personas (is_formal() se refiere si una conexión entre una persona y otra es formal o informal, es decir, colegas o amigos). El operador $ es un atajo para obtener y establecer atributos de un grafo. Es más corto y tan legible como graph_attr() y set_graph_attr(). V y E son la forma estándar de obtener una secuencia de todos los vértices y aristas respectivamente. Esto asigna un atributo todos los vértices/aristas la vez. Otra forma de generar nuestra red social es con el uso de set_vertex_attr() y set_edge_attr() y el operador %>%: Para asignar o modificar un atributo un único vértice/arista: Los valores de los atributos pueden establecerse en cualquier objeto de R, pero ten en cuenta que almacenar el grafo en algunos formatos puede provocar la pérdida de valores en atributos complejos. Los vértices, las aristas y el propio grafo pueden utilizarse para establecer atributos, por ejemplo, para añadir una fecha al grafo: Para recuperar atributos, también puedes utilizar graph_attr(), vertex_attr() y edge_attr(). Para encontrar el ID de un vértice puedes utilizar la función match(): Para asignar atributos un subconjunto de vértices o aristas, puedes utilizar: Para eliminar atributos: Si quieres guardar un grafo en R con todos los atributos utiliza la función estándar de R dput y recupéralo más tarde con dget. También puedes simplemente guardar el espacio de trabajo de R y restaurarlo más tarde.","code":"g <- make_graph( ~ Alice-Boris:Himari:Moshe, Himari-Alice:Nang:Moshe:Samira, Ibrahim-Nang:Moshe, Nang-Samira ) V(g)$age <- c(25, 31, 18, 23, 47, 22, 50) V(g)$gender <- c(\"f\", \"m\", \"f\", \"m\", \"m\", \"f\", \"m\") E(g)$is_formal <- c(FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE) summary(g) ## IGRAPH 8a7f045 UN-- 7 9 -- ## + attr: name (v/c), age (v/n), gender (v/c), is_formal (e/l) g <- make_graph( ~ Alice-Boris:Himari:Moshe, Himari-Alice:Nang:Moshe:Samira, Ibrahim-Nang:Moshe, Nang-Samira ) %>% set_vertex_attr(\"age\", value = c(25, 31, 18, 23, 47, 22, 50)) %>% set_vertex_attr(\"gender\", value = c(\"f\", \"m\", \"f\", \"m\", \"m\", \"f\", \"m\")) %>% set_edge_attr(\"is_formal\", value = c(FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE)) summary(g) E(g)$is_formal ## [1] FALSE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE E(g)$is_formal[1] <- TRUE E(g)$is_formal ## [1] TRUE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE g$date <- c(\"2022-02-11\") graph_attr(g, \"date\") ## [1] \"2022-02-11\" match(c(\"Ibrahim\"), V(g)$name) ## [1] 7 V(g)$name[1:3] <- c(\"Alejandra\", \"Bruno\", \"Carmina\") V(g) ## + 7/7 vertices, named, from 8a7f045: ## [1] Alejandra Bruno Carmina Moshe Nang Samira Ibrahim g <- delete_vertex_attr(g, \"gender\") V(g)$gender ## NULL"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"propiedades-estructurales-de-los-grafos","dir":"Articles","previous_headings":"","what":"Propiedades estructurales de los grafos","title":"igraph (interfaz R)","text":"igraph proporciona un amplio conjunto de métodos para calcular varias propiedades estructurales de los grafos. Está más allá del alcance de este tutorial documentar todos ellos, por lo que esta sección sólo presentará algunos de ellos con fines ilustrativos. Trabajaremos con la pequeña red social que construimos en la sección anterior. Probablemente, la propiedad más sencilla en la que se puede pensar es el “grado del vértice”. El grado de un vértice es igual al número de aristas incidentes él. En el caso de los grafos dirigidos, también podemos definir el grado de entrada (el número de aristas que apuntan hacia el vértice) y el grado de salida (el número de aristas que se originan en el vértice). igraph es capaz de calcularlos todos utilizando una sintaxis sencilla: Si el grafo fuera dirigido, podríamos calcular los grados de entrada y salida por separado utilizando degree(mode = \"\") y degree(mode = \"\"). También puedes pasar un único ID de un vértice o una lista de IDs de los vértices degree() si quieres calcular los grados sólo para un subconjunto de vértices: La mayoría de las funciones que aceptan los IDs de los vértices también aceptan los “nombres” de los vértices (es decir, los valores del atributo name del vértice) siempre que los nombres sean únicos: También funciona para vértices individuales: De igual manera, se utiliza una sintaxis similar para la mayoría de las propiedades estructurales que igraph puede calcular. Para las propiedades de los vértices, las funciones aceptan un ID, un nombre o una lista de IDs o nombres (y si se omiten, el valor predeterminado es el conjunto de todos los vértices). Para las propiedades de aristas, las funciones aceptan un único ID o una lista de IDs. NOTA: Para algunas mediciones, tiene sentido calcularlas sólo para unos pocos vértices o aristas en lugar de para todo el grafo, ya que de todas formas llevaría el mismo tiempo. En este caso, las funciones aceptan IDs de vértices o aristas, pero se puede restringir la lista resultante utilizando operaciones estándar. Un ejemplo es la centralidad de vectores propios (evcent()). Además del grado, igraph incluye funciones integradas para calcular muchas otras propiedades de centralidad, como la intermediación de vértices y aristas (edge_betweenness()) o el PageRank de Google (page_rank()), por nombrar algunas. Aquí sólo ilustraremos la intermediación de aristas: De este modo, ahora también podemos averiguar qué conexiones tienen la mayor centralidad de intermediación:","code":"degree(g) ## Alejandra Bruno Carmina Moshe Nang Samira Ibrahim ## 3 1 4 3 3 2 2 degree(g, 7) ## Ibrahim ## 2 degree(g, v = c(3,4,5)) ## Carmina Moshe Nang ## 4 3 3 degree(g, v = c(\"Carmina\", \"Moshe\", \"Nang\")) ## Carmina Moshe Nang ## 4 3 3 degree(g, \"Bruno\") ## Bruno ## 1 edge_betweenness(g) ## [1] 6 6 4 3 4 4 4 2 3 ebs <- edge_betweenness(g) as_edgelist(g)[ebs == max(ebs), ] ## [,1] [,2] ## [1,] \"Alejandra\" \"Bruno\" ## [2,] \"Alejandra\" \"Carmina\""},{"path":[]},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"selección-de-vértices","dir":"Articles","previous_headings":"Búsqueda de vértices y aristas basada en atributos","what":"Selección de vértices","title":"igraph (interfaz R)","text":"Tomando como ejemplo la red social anteriormente creada, te gustaría averiguar quién tiene el mayor grado. Puedes hacerlo con las herramientas presentadas hasta ahora y con la función .max(): Otro ejemplo sería seleccionar sólo los vértices que tienen IDs impares, utilizando la función V(): Por supuesto, es posible seleccionar vértices o aristas mediante índices posicionales: Al seleccionar un vértice que existe se produce un error: Los nombres de los atributos también pueden utilizarse tal cual dentro de los operadores de indexación (“[]”) de V() y E(). Esto puede combinarse con la capacidad de R de utilizar vectores booleanos para indexar y obtener expresiones muy concisas y legibles para recuperar un subconjunto del set de vértices o aristas de un grafo. Por ejemplo, el siguiente comando nos da los nombres de los individuos menores de 30 años de nuestra red social: Por supuesto, < es el único operador booleano que puede utilizarse para esto. Otras posibilidades son las siguientes: También puede crear un operador “incluido en” partir de %% utilizando el operador Negate: Si un atributo tiene el mismo nombre que una función de igraph, debes tener cuidado ya que la sintaxis puede llegar ser un poco confusa. Por ejemplo, si hay un atributo llamado degree que representa las notas de un examen para cada persona, debe confundirse con la función de igraph que calcula los grados de los vértices de una red:","code":"which.max(degree(g)) ## Carmina ## 3 graph <- graph.full(n=10) ## Warning: `graph.full()` was deprecated in igraph 2.1.0. ## ℹ Please use `make_full_graph()` instead. ## This warning is displayed once every 8 hours. ## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was ## generated. only_odd_vertices <- which(V(graph)%%2==1) length(only_odd_vertices) ## [1] 5 seq <- V(graph)[2, 3, 7] seq ## + 3/10 vertices, from 7604433: ## [1] 2 3 7 seq <- seq[1, 3] # filtrar un conjunto de vértices existente seq ## + 2/10 vertices, from 7604433: ## [1] 2 7 seq <- V(graph)[2, 3, 7, \"foo\", 3.5] ## Error in simple_vs_index(x, ii, na_ok): Unknown vertex selected V(g)[age < 30]$name ## [1] \"Alejandra\" \"Carmina\" \"Moshe\" \"Samira\" `%notin%` <- Negate(`%in%`) V(g)$degree <- c(\"A\", \"B\", \"B+\", \"A+\", \"C\", \"A\", \"B\") V(g)$degree[degree(g) == 3] ## [1] \"A\" \"A+\" \"C\" V(g)$name[degree(g) == 3] ## [1] \"Alejandra\" \"Moshe\" \"Nang\""},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"selección-de-aristas","dir":"Articles","previous_headings":"Búsqueda de vértices y aristas basada en atributos","what":"Selección de aristas","title":"igraph (interfaz R)","text":"Las aristas pueden seleccionarse basándose en atributos, igual que los vértices. Como ya se ha mencionado, la forma estándar de obtener aristas es E. Además, existen algunas propiedades estructurales especiales para seleccionar aristas. El uso de .() permite filtrar la serie de aristas desde los vértices de donde proceden. Por ejemplo, para seleccionar todas las aristas procedentes de Carmina (cuyo ID de vértice es el 3): Por supuesto, también funciona con nombres de vértices: Al usar .(), se filtran la serie de aristas en función de los vértices de destino o diana. Esto es diferente de .() si el grafo es dirigido, mientras que da la misma respuesta para grafos dirigidos. Con .inc() sólo se seleccionan las aristas que inciden en un único vértice o en al menos uno de los vértices, independientemente de la dirección de las aristas. La expresión %--% es un operador especial que puede utilizarse para seleccionar todas las aristas entre dos conjuntos de vértices. Ignora las direcciones de las aristas en los grafos dirigidos. Por ejemplo, la siguiente expresión selecciona todas las aristas entre Carmina (su ID de vértice es el 3), Nang (su ID de vértice es el 5) y Samira (su ID de vértice es el 6): Para que el operador %--% funcione con nombres, puedes construir vectores de caracteres que contengan los nombres y luego utilizar estos vectores como operandos. Por ejemplo, para seleccionar todas las aristas que conectan los hombres con las mujeres, podemos hacer lo siguiente, luego de volver añadir el atributo de género que hemos eliminado anteriormente:","code":"E(g)[.from(3)] ## + 4/9 edges from 8a7f045 (vertex names): ## [1] Alejandra--Carmina Carmina --Moshe Carmina --Nang Carmina --Samira E(g)[.from(\"Carmina\")] ## + 4/9 edges from 8a7f045 (vertex names): ## [1] Alejandra--Carmina Carmina --Moshe Carmina --Nang Carmina --Samira E(g) [ 3:5 %--% 5:6 ] ## + 3/9 edges from 8a7f045 (vertex names): ## [1] Carmina--Nang Carmina--Samira Nang --Samira V(g)$gender <- c(\"f\", \"m\", \"f\", \"m\", \"m\", \"f\", \"m\") men <- V(g)[gender == \"m\"]$name men ## [1] \"Bruno\" \"Moshe\" \"Nang\" \"Ibrahim\" women <- V(g)[gender == \"f\"]$name women ## [1] \"Alejandra\" \"Carmina\" \"Samira\" E(g)[men %--% women] ## + 5/9 edges from 8a7f045 (vertex names): ## [1] Alejandra--Bruno Alejandra--Moshe Carmina --Moshe Carmina --Nang ## [5] Nang --Samira"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"tratar-un-grafo-como-una-matriz-de-adyacencia","dir":"Articles","previous_headings":"","what":"Tratar un grafo como una matriz de adyacencia","title":"igraph (interfaz R)","text":"Una matriz de adyacencia es otra manera de representar un grafo. En la matriz de adyacencia, las filas y columnas están indicadas por los vértices del grafo y los elementos de la matriz indican el número de aristas entre los vértices y j. La matriz de adyacencia del grafo de nuestra red social imaginaria es: Por ejemplo, Carmina (1, 0, 0, 1, 1, 1, 0) está directamente conectada con Alejandra (que tiene el índice 1), Moshe (índice 4), Nang (índice 5), Samira (índice 6) y , pero con Bruno (índice 2) ni con Ibrahim (índice 7).","code":"as_adjacency_matrix(g) ## 7 x 7 sparse Matrix of class \"dgCMatrix\" ## Alejandra Bruno Carmina Moshe Nang Samira Ibrahim ## Alejandra . 1 1 1 . . . ## Bruno 1 . . . . . . ## Carmina 1 . . 1 1 1 . ## Moshe 1 . 1 . . . 1 ## Nang . . 1 . . 1 1 ## Samira . . 1 . 1 . . ## Ibrahim . . . 1 1 . ."},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"diseños-y-graficación","dir":"Articles","previous_headings":"","what":"Diseños y graficación","title":"igraph (interfaz R)","text":"Un grafo es un objeto matemático abstracto sin una representación específica en el espacio 2D, 3D o cualquier espacio geométrico. Esto significa que, cuando queremos visualizar un grafo, primero tenemos que encontrar una correspondencia entre los vértices y las coordenadas en un espacio bidimensional o tridimensional, preferiblemente de una manera útil y/o agradable la vista. Una rama separada de la teoría de grafos, denominada dibujo de grafos, trata de resolver este problema mediante varios algoritmos de diseño de grafos. igraph implementa varios algoritmos de diseño y también es capaz de dibujarlos en la pantalla o en cualquier formato de salida que soporte el propio R.","code":""},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"algoritmos-de-diseño","dir":"Articles","previous_headings":"Diseños y graficación","what":"Algoritmos de diseño","title":"igraph (interfaz R)","text":"Las funciones de diseño en igraph siempre empiezan por layout. La siguiente tabla las resume: Los algoritmos de diseño pueden ejecutarse directamente con un grafo como primer argumento. Devolverán una matriz con dos columnas y tantas filas como número de vértices del grafo; cada fila corresponderá la posición de un único vértice, ordenado según el ID del vértice. Algunos algoritmos tienen una variante 3D; en este caso devuelven tres columnas en lugar de 2. Algunos algoritmos de diseño toman argumentos adicionales; por ejemplo, cuando se diseña un grafo con la forma de un árbol, puede tener sentido especificar qué vértice debe colocarse en la raíz del diseño:","code":"layout <- layout_with_kk(g) layout <- layout_as_tree(g, root = 2)"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"dibujar-un-grafo-utilizando-un-diseño","dir":"Articles","previous_headings":"Diseños y graficación","what":"Dibujar un grafo utilizando un diseño","title":"igraph (interfaz R)","text":"Podemos trazar nuestra red social imaginaria con el algoritmo de diseño Kamada-Kawai de la siguiente manera: Esto debería abrir una nueva ventana mostrando una representación visual de la red. Recuerda que la ubicación exacta de los nodos puede ser diferente en tu máquina, ya que la disposición es determinista. El argumento layout también acepta funciones; en este caso, la función será llamada con el grafo como su primer argumento. Esto permite ingresar directamente el nombre de una función de diseño, sin tener que crear una variable de diseño, como en el ejemplo anterior: Para mejorar el aspecto visual, una adición trivial sería colorear los vértices según el género. También deberíamos intentar colocar los nombres ligeramente fuera de los vértices para mejorar la legibilidad: También puedes tratar el atributo gender como un factor y proporcionar los colores como un argumento plot(), que tiene prioridad sobre el atributo color que se asigna de manera estándar los vértices. Los colores se asignan automáticamente: Como se vio anteriormente, con el argumento vertex.color puedes especificar propiedades visuales para plot en lugar de usar y/o manipular los atributos de vértices o aristas. El siguiente gráfico muestra las relaciones formales con líneas gruesas y las informales con líneas finas: Este último procedimiento es preferible si quieres modificar la representación visual de tu grafo, pero quieres hacer modificaciones al grafo mismo. En resumen, hay propiedades especiales de vértices y aristas que corresponden la representación visual del grafo. Estos atributos pueden modificar la configuración predeterminada de igraph (es decir, color, peso, nombre, forma, diseño, etc.). Las dos tablas siguientes resumen los atributos visuales más utilizados para vértices y aristas, respectivamente:","code":"layout <- layout_with_kk(g) plot(g, layout = layout, main = \"Red social con el algoritmo de diseño Kamada-Kawai\") plot( g, layout = layout_with_fr, main = \"Red social con el algoritmo de disposición Fruchterman-Reingold\" ) V(g)$color <- ifelse(V(g)$gender == \"m\", \"yellow\", \"red\") plot( g, layout = layout, vertex.label.dist = 3.5, main = \"Red social - con los géneros como colores\" ) plot( g, layout = layout, vertex.label.dist = 3.5, vertex.color = as.factor(V(g)$gender)) plot( g, layout = layout, vertex.label.dist = 3.5, vertex.size = 20, vertex.color = ifelse(V(g)$gender == \"m\", \"yellow\", \"red\"), edge.width = ifelse(E(g)$is_formal, 5, 1) )"},{"path":[]},{"path":[]},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"argumentos-más-comunes-de-plot","dir":"Articles","previous_headings":"Diseños y graficación","what":"Argumentos más comunes de plot()","title":"igraph (interfaz R)","text":"Estos parámetros pueden especificarse como argumentos de la función plot para ajustar el aspecto general del gráfico.","code":""},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"igraph-y-el-mundo-exterior","dir":"Articles","previous_headings":"","what":"igraph y el mundo exterior","title":"igraph (interfaz R)","text":"Ningún módulo de grafos estaría completo sin algún tipo de funcionalidad de importación/exportación que permita al paquete comunicarse con programas y kits de herramientas externos. igraph es una excepción: proporciona funciones para leer los formatos de grafos más comunes y para guardar grafos en archivos que obedezcan estas especificaciones de formato. Las funciones principales para leer y escribir de/un fichero son read_graph() y write_graph(), respectivamente. La siguiente tabla resume los formatos que igraph puede leer o escribir: NOTA: La mayoría de los formatos tienen sus propias limitaciones; por ejemplo, todos pueden almacenar atributos. Tu mejor opción es probablemente GraphML o GML si quieres guardar los grafos de igraph en un formato que pueda ser leído desde un paquete externo y quieres preservar los atributos numéricos y de cadena. Edge list y NCOL también están bien si tienes atributos (aunque NCOL admite nombres de vértices y pesos de aristas).","code":""},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"dónde-ir-a-continuación","dir":"Articles","previous_headings":"","what":"Dónde ir a continuación","title":"igraph (interfaz R)","text":"Este tutorial es una breve introducción igraph en R. Esperamos que hayas disfrutado de su lectura y que te resulte útil para tus propios análisis de redes. Para una descripción detallada de funciones específicas, consulta https://r.igraph.org/reference/. Si tienes preguntas sobre cómo utilizar igraph, visita nuestro Foro. Para informar de un error, abre una incidencia en Github. Por favor, hagas preguntas de uso en Github directamente, ya que está pensado para desarrolladores y para usuarios.","code":""},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"información-de-la-sesión","dir":"Articles","previous_headings":"","what":"Información de la sesión","title":"igraph (interfaz R)","text":"En favor de la reproducibilidad, la información de la sesión para el código anterior es la siguiente:","code":"sessionInfo() ## R version 4.4.1 (2024-06-14) ## Platform: x86_64-pc-linux-gnu ## Running under: Ubuntu 22.04.5 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 ## [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 ## [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C ## [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] igraph_2.1.1 ## ## loaded via a namespace (and not attached): ## [1] crayon_1.5.3 vctrs_0.6.5 cli_3.6.3 knitr_1.48 ## [5] rlang_1.1.4 xfun_0.48 highr_0.11 textshaping_0.4.0 ## [9] jsonlite_1.8.9 glue_1.8.0 htmltools_0.5.8.1 ragg_1.3.3 ## [13] sass_0.4.9 fansi_1.0.6 rmarkdown_2.28 grid_4.4.1 ## [17] evaluate_1.0.1 jquerylib_0.1.4 fastmap_1.2.0 yaml_2.3.10 ## [21] lifecycle_1.0.4 compiler_4.4.1 fs_1.6.4 htmlwidgets_1.6.4 ## [25] pkgconfig_2.0.3 lattice_0.22-6 systemfonts_1.1.0 digest_0.6.37 ## [29] R6_2.5.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 ## [33] Matrix_1.7-0 bslib_0.8.0 tools_4.4.1 pkgdown_2.1.1 ## [37] cachem_1.1.0 desc_1.4.3"},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"cannot-compile-igraph-from-sources-on-windows-or-macos","dir":"Articles","previous_headings":"","what":"Cannot compile igraph from sources on Windows or macOS","title":"Installation troubleshooting","text":"compile igraph sources, unless know ! much convenient use binaries CRAN instead. can installed using install.packages(\"igraph\"). Usually, takes days binary releases become available CRAN new igraph source release. period, install.packages() give choice using latest source release previous binary release. Just choose use binary release, .e. respond “” “want install sources?” CRAN provides Windows macOS binaries last two minor releases R (e.g. 4.4 4.3), older ones (e.g. 4.2). Make sure using one supported R versions. Refer https://r-project.org/ find latest R version moment. Note pre-compiled binaries CRAN compatible R distribution provided CRAN . obtained R different sources, Homebrew MacPorts macOS, able use , way install packages compile sources.","code":"> install.packages('igraph') There is a binary version available but the source version is later: binary source needs_compilation igraph 1.2.7 1.2.8 TRUE Do you want to install from sources the package which needs compilation? (Yes/no/cancel) no"},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"i-still-want-to-compile-igraph-from-sources","dir":"Articles","previous_headings":"Cannot compile igraph from sources on Windows or macOS","what":"I still want to compile igraph from sources","title":"Installation troubleshooting","text":"decide try compile sources anyway, basic requirements listed . assumed comfortable compiling software sources resolving basic issues arise. Otherwise, please use binaries. Make sure compatible toolchain installed, including Fortran compiler. macOS, make sure Xcode gfortran . Windows, need Rtools. Windows, see instructions installing Rtools version R. Check “Using pacman” link Rtools 4.0 instructions. find copyable pacman command installing dependencies. Windows, make sure GLPK C library installed. Rglpk R package. Instructions installing libraries Rtools4 Windows ","code":""},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"cannot-compile-igraph-from-sources-on-linux","dir":"Articles","previous_headings":"","what":"Cannot compile igraph from sources on Linux","title":"Installation troubleshooting","text":"Since CRAN provide binary packages Linux, Linux users usually need compile igraph sources. order , make sure prerequisites: C, C++ Fortran compilers. Debian-based distros, use sudo apt install build-essential gfortran. Fedora, use yum install gcc gcc-c++ gcc-gfortran. Development packages glpk libxml2. Debian-based distros, use sudo apt install libglpk-dev libxml2-dev. Fedora, use yum install glpk-devel libxml2-devel. Anaconda environment active, deactivate compiling igraph. conda environments active known cause number issues, compilation later usage. Set Anaconda installation environment active default. Make sure Anaconda’s bin directory present PATH environment variable. add directory path manually. Instead, let Anaconda manage using conda init, recommended Anaconda. Anaconda’s condabin, bin, present PATH.","code":""},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"fatal-error-glpk-h-no-such-file-or-directory","dir":"Articles","previous_headings":"","what":"fatal error: glpk.h: No such file or directory","title":"Installation troubleshooting","text":"using Windows macOS, please refer compile igraph sources Windows macOS. using Linux, please refer compile igraph sources Linux.","code":""},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"libgfortran-so-4-cannot-open-shared-object-file-no-such-file-or-directory","dir":"Articles","previous_headings":"","what":"libgfortran.so.4: cannot open shared object file: No such file or directory","title":"Installation troubleshooting","text":"problem occurs multiple incompatible gfortran versions machine. commonly, one comes active Anaconda environment. Always deactivate Anaconda environments using conda deactivate installing igraph using install.packages(). Set Anaconda installation environment active default. Make sure Anaconda’s bin directory present PATH environment variable. add directory path manually. Instead, let Anaconda manage using conda init, recommended Anaconda. Anaconda’s condabin, bin, present PATH.","code":""},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"libmkl_rt-so-1-cannot-open-shared-object-file-no-such-file-or-directory","dir":"Articles","previous_headings":"","what":"libmkl_rt.so.1: cannot open shared object file: No such file or directory","title":"Installation troubleshooting","text":"issue typically occurs Anaconda environment containing conflicting BLAS libraries active. Please refer instructions section “libgfortran..4: open shared object file”.","code":""},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"libglpk-so-40-cannot-open-shared-object-file-no-such-file-or-directory","dir":"Articles","previous_headings":"","what":"libglpk.so.40: cannot open shared object file: No such file or directory","title":"Installation troubleshooting","text":"error occur Linux systems igraph compiled GLPK support, GLPK currently installed system. resolve , install GLPK. Debian-based systems, simply use sudo apt install libglpk40. may happen binary version igraph installed https://packagemanager.rstudio.com. binaries assume GLPK present system.","code":""},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"glpk-is-not-available-unimplemented-function-call","dir":"Articles","previous_headings":"","what":"GLPK is not available, Unimplemented function call","title":"Installation troubleshooting","text":"error occurs calling igraph function relies GLPK, igraph compiled without GLPK support. happen igraph 2.0.3 later. compiling earlier version, please refer “compile igraph sources Linux” instructions compiling igraph GLPK support.","code":""},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Gábor Csárdi. Author. Tamás Nepusz. Author. Vincent Traag. Author. Szabolcs Horvát. Author. Fabio Zanini. Author. Daniel Noom. Author. Kirill Müller. Author, maintainer. Maëlle Salmon. Contributor. Michael Antonov. Contributor. Chan Zuckerberg Initiative. Funder.","code":""},{"path":"https://r.igraph.org/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Csardi G, Nepusz T (2006). “igraph software package complex network research.” InterJournal, Complex Systems, 1695. https://igraph.org. Csárdi G, Nepusz T, Traag V, Horvát Sz, Zanini F, Noom D, Müller K (2024). _igraph: Network Analysis Visualization R_. doi:10.5281/zenodo.7682609 , R package version 2.1.1, .","code":"@Article{, title = {The igraph software package for complex network research}, author = {Gabor Csardi and Tamas Nepusz}, journal = {InterJournal}, volume = {Complex Systems}, pages = {1695}, year = {2006}, url = {https://igraph.org}, } @Manual{, title = {{igraph}: Network Analysis and Visualization in R}, author = {Gábor Csárdi and Tamás Nepusz and Vincent Traag and Szabolcs Horvát and Fabio Zanini and Daniel Noom and Kirill Müller}, year = {2024}, note = {R package version 2.1.1}, doi = {10.5281/zenodo.7682609}, url = {https://CRAN.R-project.org/package=igraph}, }"},{"path":[]},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"igraph authors, in alphabetical order:"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"--------------------------------------"},{"path":[]},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Patrick R. Amestoy\tAMD library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Adelchi Azzalini\tigraph.options based on the sm package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Tamas Badics\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Gregory Benison\t\tMinimum cut calculation"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Adrian Bowman\t\tigraph.options based on the sm package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Walter Böhm\t\tLSAP"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Keith Briggs\t\tParts from the Very Nauty Graph Library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Geometric random graphs"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Girth"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Various patches and bug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Jeroen Bruggeman\tspinglass community detection"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Burt's constraints"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Juergen Buchmueller\tBig number math implementation"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Carter T. Butts\t\tSome layout algorithms from the SNA R package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"bonpow function in the SNA R package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Some R manual pages, from the SNA R package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Aaron Clauset\t\tHierarchical random graphs"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"J.T. Conklin\t\tlogbl function"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Topher Cooper\t\tGSL random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Gabor Csardi\t\tMost of igraph"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Trevor Croft\t\tsimpleraytracer"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Peter DalGaard\t\tzeroin root finder"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Timothy A Davis\t\tCXSPARSE: a Concise Sparse Matrix package - Extended"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"AMD library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Sparse matrix column ordering"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Laurent Deniau\t\tBits of the error handling system"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Ulrich Drepper\t\tlogbl function"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Iain S. Duff\t\tAMD library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"GLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"S.I. Feldman\t\tf2c"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"David Firth\t\tDisplay data frame in Tk, from relimp package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"P. Foggia\t\tVF2 graph isomorphism algorithm"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"John Fox\t\tR: suppressing X11 warnings"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Alan George \t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"John Gilbert\t\tSparse matrix column ordering"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"D.Goldfarb\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Brian Gough\t\tGSL random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Tom Gregorovic\t\tMultilevel community detection"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"M.Grigoriadis\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Oscar Gustafsson\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Kurt Hornik\t\tLSAP"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Szabolcs Horvat\t\tigraph C core library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Paul Hsieh\t\tpstdint.h"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Ross Ihaka\t\tSome random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Tommi Junttila\t\tBLISS graph isomorphism library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Petteri Kaski\t\tBLISS graph isomorphism library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Oleg Keselyov\t\tzeroin root finder"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Darwin Klingman\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Donald E. Knuth\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Stefan I. Larimore\tSparse matrix column ordering"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Yusin Lee \t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Richard Lehoucq\t\tARPACK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Rene Locher\t\tR arrow drawing function, from IDPmisc package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"J.C. Nash\t\tBFGS optimizer"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Joseph W-H Liu\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Makoto Matsumoto\tGSL random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Vincent Matossian\tGraph laplacian"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"igraph_neighborhood_graphs"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Line graphs"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Peter McMahan\t\tCohesive blocking"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Andrew Makhorin\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"David Morton de Lachapelle\tSpectral coarse graining"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Laurence Muller\t\tFixes for compilation on MS Visual Studio"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Fionn Murtagh\t\tOrder a hierarchical clustering"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Emmanuel Navarro\tinfomap community detection"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Various fixes and patches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Tamas Nepusz\t\tMost of igraph"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Esmond Ng \t\tSparse matrix column ordering"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Kevin O'Neill\t\tMaximal independent vertex sets"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Takuji Nishimura\tGSL random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Daniel Noom\t\tigraph C core library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Jim Orlin\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Patric Ostergard\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Elliot Paquette\t\tpsumtree data type"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Pascal Pons\t\twalktrap community detection"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Joerg Reichardt\t\tspinglass community detection"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Marc Rieffel\t\tGSL random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"B.D. Ripley\t\tigraph.options based on the sm package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"BFGS optimizer"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Various bug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Martin Rosvall\t\tinfomap community detection"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Andreas Ruckstuhl\tR arrow drawing function, from IDPmisc package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Heinrich Schuchardt\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"J.K. Reid \t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"C. Sansone\t\tVF2 graph isomorphism algorithm"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Michael Schmuhl\t\tThe graphopt layout generator"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Christine Solnon\tLAD graph isomorphism library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Danny Sorensen\t\tARPACK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"James Theiler\t\tGSL random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Samuel Thiriot\t\tInterconnected islands graph generator"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Vincent A. Traag\tigraph C core library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Magnus Torfason\t\tR operators that work by name"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Theodore Y. Ts'o libuuid"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Minh Van Nguyen\t\tMicroscopic update rules"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Various test cases"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Many documentation and other fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"M. Vento\t\tVF2 graph isomorphism algorithm"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Fabien Viger\t\tgengraph graph generator"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Phuong Vu\t\tARPACK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"P.J. Weinberger\t\tf2c"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Garrett A. Wollman\tqsort"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"B.N. Wylie \t\tDrL layout generator"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Chao Yang\t\tARPACK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Fabio Zanini\t\tigraph C core library"},{"path":[]},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Institutional copyright owners:"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"-------------------------------"},{"path":[]},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Free Software Foundation, Inc\tCode generated by bison"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Sandia Corporation\t \tDrL layout generator"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"The R Development Core Team \tSome random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"R: as.dendrogram from stats package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"The Regents of the University of California\tqsort"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Xerox PARC\t\t \tSparse matrix column ordering"},{"path":[]},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Other contributors"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"------------------"},{"path":[]},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Neal Becker\t\tPatches to compile with gcc 4.4"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Richard Bowman\t\tR patches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Alex Chen\t\tPatch to compile on Intel compilers"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Daniel Cordeiro \tPatches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Tom Gregorovic\t\tBug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Mayank Lahiri\t\tForest fire game fix"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"John Lapeyre \t\tPatches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Christopher Lu\t\tVarious fixes and patches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"André Panisson\t\tR patches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Bob Pap \t\tBug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Keith Ponting\t\tR package bug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Martin J Reed\t\tBug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Elena Tea Russo\t\tBug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"KennyTM\t\t\tBug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Jordi Torrents\t\tPatches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Matthew Walker\t\tVarious patches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Kai Willadsen\t\tArrow size support in Python"},{"path":"https://r.igraph.org/cran-comments.template.html","id":"test-environments","dir":"","previous_headings":"","what":"Test environments","title":"NA","text":"local R installation, R 4.1.1 ubuntu 20.04 (Github Actions), R 3.4.4, R 3.5.3, R 4.0.5, R 4.1.1 R-devel windows-latest (Github Actions), R 4.1.1 macOS-latest (Github Actions), R 4.1.1","code":""},{"path":"https://r.igraph.org/cran-comments.template.html","id":"r-cmd-check-results","dir":"","previous_headings":"","what":"R CMD check results","title":"NA","text":"X errors | Y warnings | Z notes Add comments CRAN maintainers .","code":""},{"path":"https://r.igraph.org/cran-comments.template.html","id":"revdepcheck-results","dir":"","previous_headings":"","what":"revdepcheck results","title":"NA","text":"Paste output revdepcheck revdep/ Extend output explanations failure believe ignored fault","code":""},{"path":"https://r.igraph.org/index.html","id":"rigraph-","dir":"","previous_headings":"","what":"Network Analysis and Visualization","title":"Network Analysis and Visualization","text":"R/igraph R package igraph network analysis library.","code":""},{"path":"https://r.igraph.org/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Network Analysis and Visualization","text":"can install stable version R/igraph CRAN: development version, can use R-universe Github, pak package: compiling sources, make sure C, C++ Fortran compilers, well development packages glpk libxml2. Debian/Ubuntu, use apt install libglpk-dev libxml2-dev. Fedora, use yum install glpk-devel libxml2-devel. installation source Windows, need RTools installed. versions R >= 4.0 can install dependencies using:","code":"install.packages(\"igraph\") options( repos = c( igraph = 'https://igraph.r-universe.dev', CRAN = 'https://cloud.r-project.org' ) ) install.packages('igraph') pak::pak(\"igraph/rigraph\") pacman -Sy mingw-w64-{i686,x86_64}-glpk mingw-w64-{i686,x86_64}-libxml2"},{"path":"https://r.igraph.org/index.html","id":"installation-troubleshooting","dir":"","previous_headings":"","what":"Installation troubleshooting","title":"Network Analysis and Visualization","text":"See Installation FAQ.","code":""},{"path":"https://r.igraph.org/index.html","id":"documentation","dir":"","previous_headings":"","what":"Documentation","title":"Network Analysis and Visualization","text":"See igraph package’s website complete manual.","code":""},{"path":"https://r.igraph.org/index.html","id":"contributions","dir":"","previous_headings":"","what":"Contributions","title":"Network Analysis and Visualization","text":"Please read contribution guide.","code":""},{"path":"https://r.igraph.org/index.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Network Analysis and Visualization","text":"GNU GPL version 2 later","code":""},{"path":"https://r.igraph.org/index.html","id":"contributors","dir":"","previous_headings":"","what":"Contributors","title":"Network Analysis and Visualization","text":"contributions project gratefully acknowledged using allcontributors package following -contributors specification. Contributions kind welcome!","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":"https://r.igraph.org/reference/E.html","id":null,"dir":"Reference","previous_headings":"","what":"Edges of a graph — E","title":"Edges of a graph — E","text":"edge sequence vector containing numeric edge ids, special class attribute allows custom operations: selecting subsets edges based attributes, graph structure, creating intersection, union edges, etc.","code":""},{"path":"https://r.igraph.org/reference/E.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Edges of a graph — E","text":"","code":"E(graph, P = NULL, path = NULL, directed = TRUE)"},{"path":"https://r.igraph.org/reference/E.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Edges of a graph — E","text":"graph graph. P list vertices select edges via pairs vertices. first second vertices select first edge, third fourth second, etc. path list vertices, select edges along path. Note works reliable simple graphs. graph multiple edges, one chosen arbitrarily included edge sequence. directed Whether consider edge directions P argument, directed graphs.","code":""},{"path":"https://r.igraph.org/reference/E.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Edges of a graph — E","text":"edge sequence graph.","code":""},{"path":"https://r.igraph.org/reference/E.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Edges of a graph — E","text":"Edge sequences usually used igraph function arguments refer edges graph. edge sequence tied graph refers : really denoted specific edges graph, used together another graph. edge sequence often created E() function. result includes edges increasing edge id order default (. none P path arguments used). edge sequence can indexed numeric vector, just like regular R vector. See links edge sequence operations .","code":""},{"path":"https://r.igraph.org/reference/E.html","id":"indexing-edge-sequences","dir":"Reference","previous_headings":"","what":"Indexing edge sequences","title":"Edges of a graph — E","text":"Edge sequences mostly behave like regular vectors, additional indexing operations specific ; e.g. selecting edges based graph structure, based edge attributes. See [.igraph.es details.","code":""},{"path":"https://r.igraph.org/reference/E.html","id":"querying-or-setting-attributes","dir":"Reference","previous_headings":"","what":"Querying or setting attributes","title":"Edges of a graph — E","text":"Edge sequences can used query set attributes edges sequence. See $.igraph.es() details.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/E.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Edges of a graph — E","text":"","code":"# Edges of an unnamed graph g <- make_ring(10) E(g) #> + 10/10 edges from 678dfd8: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 # Edges of a named graph g2 <- make_ring(10) %>% set_vertex_attr(\"name\", value = letters[1:10]) E(g2) #> + 10/10 edges from 47c5265 (vertex names): #> [1] a--b b--c c--d d--e e--f f--g g--h h--i i--j a--j"},{"path":"https://r.igraph.org/reference/V.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertices of a graph — V","title":"Vertices of a graph — V","text":"Create vertex sequence (vs) containing vertices graph.","code":""},{"path":"https://r.igraph.org/reference/V.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertices of a graph — V","text":"","code":"V(graph)"},{"path":"https://r.igraph.org/reference/V.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertices of a graph — V","text":"graph graph","code":""},{"path":"https://r.igraph.org/reference/V.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Vertices of a graph — V","text":"vertex sequence containing vertices, order numeric vertex ids.","code":""},{"path":"https://r.igraph.org/reference/V.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Vertices of a graph — V","text":"vertex sequence just name says : sequence vertices. Vertex sequences usually used igraph function arguments refer vertices graph. vertex sequence tied graph refers : really denoted specific vertices graph, used together another graph. implementation level, vertex sequence simply vector containing numeric vertex ids, special class attribute makes possible perform graph specific operations , like selecting subset vertices based graph structure, vertex attributes. vertex sequence often created V() function. result includes vertices increasing vertex id order. vertex sequence can indexed numeric vector, just like regular R vector. See [.igraph.vs additional links vertex sequence operations .","code":""},{"path":"https://r.igraph.org/reference/V.html","id":"indexing-vertex-sequences","dir":"Reference","previous_headings":"","what":"Indexing vertex sequences","title":"Vertices of a graph — V","text":"Vertex sequences mostly behave like regular vectors, additional indexing operations specific ; e.g. selecting vertices based graph structure, based vertex attributes. See [.igraph.vs details.","code":""},{"path":"https://r.igraph.org/reference/V.html","id":"querying-or-setting-attributes","dir":"Reference","previous_headings":"","what":"Querying or setting attributes","title":"Vertices of a graph — V","text":"Vertex sequences can used query set attributes vertices sequence. See $.igraph.vs() details.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/V.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Vertices of a graph — V","text":"","code":"# Vertex ids of an unnamed graph g <- make_ring(10) V(g) #> + 10/10 vertices, from c25370a: #> [1] 1 2 3 4 5 6 7 8 9 10 # Vertex ids of a named graph g2 <- make_ring(10) %>% set_vertex_attr(\"name\", value = letters[1:10]) V(g2) #> + 10/10 vertices, named, from beb2bea: #> [1] a b c d e f g h i j"},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":null,"dir":"Reference","previous_headings":"","what":"The igraph package — igraph-package","title":"The igraph package — igraph-package","text":"igraph library R package network analysis.","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"introduction","dir":"Reference","previous_headings":"","what":"Introduction","title":"The igraph package — igraph-package","text":"main goals igraph library provide set data types functions 1) pain-free implementation graph algorithms, 2) fast handling large graphs, millions vertices edges, 3) allowing rapid prototyping via high level languages like R.","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"igraph-graphs","dir":"Reference","previous_headings":"","what":"igraph graphs","title":"The igraph package — igraph-package","text":"igraph graphs class ‘igraph’. printed screen special format, example, ring graph created using make_ring(): ‘IGRAPH’ denotes igraph graph. come four bits denote kind graph: first ‘U’ undirected ‘D’ directed graphs. second ‘N’ named graph (.e. graph ‘name’ vertex attribute set). third ‘W’ weighted graphs (.e. ‘weight’ edge attribute set). fourth ‘B’ bipartite graphs (.e. ‘type’ vertex attribute set). come two numbers, number vertices number edges graph, double dash, name graph (‘name’ graph attribute) printed present. second line optional contains attributes graph. graph ‘name’ graph attribute, type character, two graph attributes called ‘mutual’ ‘circular’, complex type. complex type simply anything numeric character. See documentation print.igraph() details. want see edges graph well, use print_all() function:","code":"IGRAPH U--- 10 10 -- Ring graph + attr: name (g/c), mutual (g/x), circular (g/x) > print_all(g) IGRAPH badcafe U--- 10 10 -- Ring graph + attr: name (g/c), mutual (g/x), circular (g/x) + edges: [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10"},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"creating-graphs","dir":"Reference","previous_headings":"","what":"Creating graphs","title":"The igraph package — igraph-package","text":"many functions igraph creating graphs, deterministic stochastic; stochastic graph constructors called ‘games’. create small graphs given structure probably graph_from_literal() function easiest. uses R's formula interface, manual page contains many examples. Another option make_graph(), takes numeric vertex ids directly. graph_from_atlas() creates graph Graph Atlas, make_graph() can create special graphs. create graphs field data, graph_from_edgelist(), graph_from_data_frame() graph_from_adjacency_matrix() probably best choices. igraph package includes classic random graphs like Erdős-Rényi GNP GNM graphs (sample_gnp(), sample_gnm()) recent popular models, like preferential attachment (sample_pa()) small-world model (sample_smallworld()).","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"vertex-and-edge-ids","dir":"Reference","previous_headings":"","what":"Vertex and edge IDs","title":"The igraph package — igraph-package","text":"Vertices edges numerical vertex ids igraph. Vertex ids always consecutive start one. .e. graph \\(n\\) vertices vertex ids \\(1\\) \\(n\\). operation changes number vertices graphs, e.g. subgraph created via induced_subgraph(), vertices renumbered satisfy criteria. true edges well, edge ids always one \\(m\\), total number edges graph. often desirable follow vertices along number graph operations, vertex ids allow renumbering. solution assign attributes vertices. kept operations, possible. See attributes next section.","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"attributes","dir":"Reference","previous_headings":"","what":"Attributes","title":"The igraph package — igraph-package","text":"igraph possible assign attributes vertices edges graph, graph . igraph provides flexible constructs selecting set vertices edges based attribute values, see vertex_attr(), V() E() details. vertex/edge/graph attributes treated specially. One ‘name’ attribute. used printing graph instead numerical ids, exists. Vertex names can also used specify vector set vertices, igraph functions. E.g. degree() v argument gives vertices degree calculated. argument can given character vector vertex names. Edges can also ‘name’ attribute, treated specially well. Just like vertices, edges can also selected based names, e.g. delete_edges() functions. note , vertex names can also used select edges. form ‘|’, ‘’ ‘’ vertex names, select single, possibly directed, edge going ‘’ ‘’. two forms can also mixed edge selector. attributes define visualization parameters, see igraph.plotting details. Attribute values can set R object, note storing graph file formats might result loss complex attribute values. attribute values preserved use base::save() base::load() store/retrieve graphs.","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"visualization","dir":"Reference","previous_headings":"","what":"Visualization","title":"The igraph package — igraph-package","text":"igraph provides three different ways visualization. first plot.igraph() function. (Actually need write plot.igraph(), plot() enough. function uses regular R graphics can used R device. second function tkplot(), uses Tk GUI basic interactive graph manipulation. (Tk quite resource hungry, try large graphs.) third way requires rgl package uses OpenGL. See rglplot() function details. Make sure read igraph.plotting start plotting graphs.","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"file-formats","dir":"Reference","previous_headings":"","what":"File formats","title":"The igraph package — igraph-package","text":"igraph can handle various graph file formats, usually reading writing. suggest use GraphML file format graphs, except graphs big. big graphs simpler format recommended. See read_graph() write_graph() details.","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"further-information","dir":"Reference","previous_headings":"","what":"Further information","title":"The igraph package — igraph-package","text":"igraph homepage https://igraph.org. See especially documentation section. Join discussion forum https://igraph.discourse.group questions comments.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The igraph package — igraph-package","text":"Maintainer: Kirill Müller kirill@cynkra.com (ORCID) Authors: Gábor Csárdi csardi.gabor@gmail.com (ORCID) Tamás Nepusz ntamas@gmail.com (ORCID) Vincent Traag (ORCID) Szabolcs Horvát szhorvat@gmail.com (ORCID) Fabio Zanini fabio.zanini@unsw.edu.au (ORCID) Daniel Noom contributors: Maëlle Salmon [contributor] Michael Antonov [contributor] Chan Zuckerberg Initiative [funder]","code":""},{"path":"https://r.igraph.org/reference/add.edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Add edges to a graph — add.edges","title":"Add edges to a graph — add.edges","text":"add.edges() renamed add_edges() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/add.edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add edges to a graph — add.edges","text":"","code":"add.edges(graph, edges, ..., attr = list())"},{"path":"https://r.igraph.org/reference/add.edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add edges to a graph — add.edges","text":"graph input graph edges edges add, vertex sequence even number vertices. ... Additional arguments, must named, added edge attributes, newly added edges. See also details . attr named list, elements added edge attributes, newly added edges. See also details .","code":""},{"path":"https://r.igraph.org/reference/add.vertex.shape.html","id":null,"dir":"Reference","previous_headings":"","what":"Various vertex shapes when plotting igraph graphs — add.vertex.shape","title":"Various vertex shapes when plotting igraph graphs — add.vertex.shape","text":"add.vertex.shape() renamed add_shape() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/add.vertex.shape.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Various vertex shapes when plotting igraph graphs — add.vertex.shape","text":"","code":"add.vertex.shape( shape, clip = shape_noclip, plot = shape_noplot, parameters = list() )"},{"path":"https://r.igraph.org/reference/add.vertex.shape.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Various vertex shapes when plotting igraph graphs — add.vertex.shape","text":"shape Character scalar, name vertex shape. NULL shapes(), names defined vertex shapes returned. clip R function object, clipping function. plot R function object, plotting function. parameters Named list, additional plot/vertex/edge parameters. element named define new parameters, elements define default values. Vertex parameters prefix ‘vertex.’, edge parameters prefix ‘edge.’. general plotting parameters prefix ‘plot.’. See Details .","code":""},{"path":"https://r.igraph.org/reference/add.vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Add vertices to a graph — add.vertices","title":"Add vertices to a graph — add.vertices","text":"add.vertices() renamed add_vertices() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/add.vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add vertices to a graph — add.vertices","text":"","code":"add.vertices(graph, nv, ..., attr = list())"},{"path":"https://r.igraph.org/reference/add.vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add vertices to a graph — add.vertices","text":"graph input graph. nv number vertices add. ... Additional arguments, must named, added vertex attributes, newly added vertices. See also details . attr named list, elements added vertex attributes, newly added vertices. See also details .","code":""},{"path":"https://r.igraph.org/reference/add_edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Add edges to a graph — add_edges","title":"Add edges to a graph — add_edges","text":"new edges given vertex sequence, e.g. internal numeric vertex ids, vertex names. first edge points edges[1] edges[2], second edges[3] edges[4], etc.","code":""},{"path":"https://r.igraph.org/reference/add_edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add edges to a graph — add_edges","text":"","code":"add_edges(graph, edges, ..., attr = list())"},{"path":"https://r.igraph.org/reference/add_edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add edges to a graph — add_edges","text":"graph input graph edges edges add, vertex sequence even number vertices. ... Additional arguments, must named, added edge attributes, newly added edges. See also details . attr named list, elements added edge attributes, newly added edges. See also details .","code":""},{"path":"https://r.igraph.org/reference/add_edges.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add edges to a graph — add_edges","text":"graph, edges (attributes) added.","code":""},{"path":"https://r.igraph.org/reference/add_edges.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add edges to a graph — add_edges","text":"attributes supplied, present graph, values original edges graph set NA.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/add_edges.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add edges to a graph — add_edges","text":"","code":"g <- make_empty_graph(n = 5) %>% add_edges(c( 1, 2, 2, 3, 3, 4, 4, 5 )) %>% set_edge_attr(\"color\", value = \"red\") %>% add_edges(c(5, 1), color = \"green\") E(g)[[]] #> + 5/5 edges from 05aecf9: #> tail head tid hid color #> 1 1 2 1 2 red #> 2 2 3 2 3 red #> 3 3 4 3 4 red #> 4 4 5 4 5 red #> 5 5 1 5 1 green plot(g)"},{"path":"https://r.igraph.org/reference/add_layout_.html","id":null,"dir":"Reference","previous_headings":"","what":"Add layout to graph — add_layout_","title":"Add layout to graph — add_layout_","text":"Add layout graph","code":""},{"path":"https://r.igraph.org/reference/add_layout_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add layout to graph — add_layout_","text":"","code":"add_layout_(graph, ..., overwrite = TRUE)"},{"path":"https://r.igraph.org/reference/add_layout_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add layout to graph — add_layout_","text":"graph input graph. ... Additional arguments passed layout_(). overwrite Whether overwrite layout graph, already one.","code":""},{"path":"https://r.igraph.org/reference/add_layout_.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add layout to graph — add_layout_","text":"input graph, layout added.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/add_layout_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add layout to graph — add_layout_","text":"","code":"(make_star(11) + make_star(11)) %>% add_layout_(as_star(), component_wise()) %>% plot()"},{"path":"https://r.igraph.org/reference/add_vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Add vertices to a graph — add_vertices","title":"Add vertices to a graph — add_vertices","text":"attributes supplied, present graph, values original vertices graph set NA.","code":""},{"path":"https://r.igraph.org/reference/add_vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add vertices to a graph — add_vertices","text":"","code":"add_vertices(graph, nv, ..., attr = list())"},{"path":"https://r.igraph.org/reference/add_vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add vertices to a graph — add_vertices","text":"graph input graph. nv number vertices add. ... Additional arguments, must named, added vertex attributes, newly added vertices. See also details . attr named list, elements added vertex attributes, newly added vertices. See also details .","code":""},{"path":"https://r.igraph.org/reference/add_vertices.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add vertices to a graph — add_vertices","text":"graph, vertices (attributes) added.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/add_vertices.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add vertices to a graph — add_vertices","text":"","code":"g <- make_empty_graph() %>% add_vertices(3, color = \"red\") %>% add_vertices(2, color = \"green\") %>% add_edges(c( 1, 2, 2, 3, 3, 4, 4, 5 )) g #> IGRAPH 1f94710 D--- 5 4 -- #> + attr: color (v/c) #> + edges from 1f94710: #> [1] 1->2 2->3 3->4 4->5 V(g)[[]] #> + 5/5 vertices, from 1f94710: #> color #> 1 red #> 2 red #> 3 red #> 4 green #> 5 green plot(g)"},{"path":"https://r.igraph.org/reference/adjacent.triangles.html","id":null,"dir":"Reference","previous_headings":"","what":"Find triangles in graphs — adjacent.triangles","title":"Find triangles in graphs — adjacent.triangles","text":"adjacent.triangles() renamed count_triangles() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/adjacent.triangles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find triangles in graphs — adjacent.triangles","text":"","code":"adjacent.triangles(graph, vids = V(graph))"},{"path":"https://r.igraph.org/reference/adjacent.triangles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find triangles in graphs — adjacent.triangles","text":"graph input graph. might directed, edge directions ignored. vids vertices query, default. might vector numeric ids, character vector symbolic vertex names named graphs.","code":""},{"path":"https://r.igraph.org/reference/adjacent_vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Adjacent vertices of multiple vertices in a graph — adjacent_vertices","title":"Adjacent vertices of multiple vertices in a graph — adjacent_vertices","text":"function similar neighbors(), queries adjacent vertices multiple vertices .","code":""},{"path":"https://r.igraph.org/reference/adjacent_vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adjacent vertices of multiple vertices in a graph — adjacent_vertices","text":"","code":"adjacent_vertices(graph, v, mode = c(\"out\", \"in\", \"all\", \"total\"))"},{"path":"https://r.igraph.org/reference/adjacent_vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adjacent vertices of multiple vertices in a graph — adjacent_vertices","text":"graph Input graph. v vertices query. mode Whether query outgoing (‘’), incoming (‘’) edges, types (‘’). ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/adjacent_vertices.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adjacent vertices of multiple vertices in a graph — adjacent_vertices","text":"list vertex sequences.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/adjacent_vertices.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Adjacent vertices of multiple vertices in a graph — adjacent_vertices","text":"","code":"g <- make_graph(\"Zachary\") adjacent_vertices(g, c(1, 34)) #> [[1]] #> + 16/34 vertices, from 71d77c3: #> [1] 2 3 4 5 6 7 8 9 11 12 13 14 18 20 22 32 #> #> [[2]] #> + 17/34 vertices, from 71d77c3: #> [1] 9 10 14 15 16 19 20 21 23 24 27 28 29 30 31 32 33 #>"},{"path":"https://r.igraph.org/reference/aging.ba.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate an evolving random graph with preferential attachment and aging — aging.ba.game","title":"Generate an evolving random graph with preferential attachment and aging — aging.ba.game","text":"aging.ba.game() renamed sample_pa_age() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/aging.ba.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate an evolving random graph with preferential attachment and aging — aging.ba.game","text":"","code":"aging.ba.game( n, pa.exp, aging.exp, m = NULL, aging.bin = 300, out.dist = NULL, out.seq = NULL, out.pref = FALSE, directed = TRUE, zero.deg.appeal = 1, zero.age.appeal = 0, deg.coef = 1, age.coef = 1, time.window = NULL )"},{"path":"https://r.igraph.org/reference/aging.ba.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate an evolving random graph with preferential attachment and aging — aging.ba.game","text":"n number vertices graph. pa.exp preferential attachment exponent, see details . aging.exp exponent aging, usually non-positive number, see details . m number edges new vertex creates (except first vertex). argument used .dist .seq arguments NULL. aging.bin number bins use measuring age vertices, see details . .dist discrete distribution generate number edges add time step .seq NULL. See details . .seq number edges add time step, vector containing many elements number vertices. See details . .pref Logical constant, whether include edges initiated vertex basis preferential attachment. See details . directed Logical constant, whether generate directed graph. See details . zero.deg.appeal degree-dependent part ‘attractiveness’ vertices adjacent edges. See also details . zero.age.appeal age-dependent part ‘attrativeness’ vertices age zero. usually zero, see details . deg.coef coefficient degree-dependent ‘attractiveness’. See details . age.coef coefficient age-dependent part ‘attractiveness’. See details . time.window Integer constant, NULL adjacent added last time.windows time steps counted basis preferential attachment. See also details .","code":""},{"path":"https://r.igraph.org/reference/aging.barabasi.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate an evolving random graph with preferential attachment and aging — aging.barabasi.game","title":"Generate an evolving random graph with preferential attachment and aging — aging.barabasi.game","text":"aging.barabasi.game() renamed sample_pa_age() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/aging.barabasi.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate an evolving random graph with preferential attachment and aging — aging.barabasi.game","text":"","code":"aging.barabasi.game( n, pa.exp, aging.exp, m = NULL, aging.bin = 300, out.dist = NULL, out.seq = NULL, out.pref = FALSE, directed = TRUE, zero.deg.appeal = 1, zero.age.appeal = 0, deg.coef = 1, age.coef = 1, time.window = NULL )"},{"path":"https://r.igraph.org/reference/aging.barabasi.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate an evolving random graph with preferential attachment and aging — aging.barabasi.game","text":"n number vertices graph. pa.exp preferential attachment exponent, see details . aging.exp exponent aging, usually non-positive number, see details . m number edges new vertex creates (except first vertex). argument used .dist .seq arguments NULL. aging.bin number bins use measuring age vertices, see details . .dist discrete distribution generate number edges add time step .seq NULL. See details . .seq number edges add time step, vector containing many elements number vertices. See details . .pref Logical constant, whether include edges initiated vertex basis preferential attachment. See details . directed Logical constant, whether generate directed graph. See details . zero.deg.appeal degree-dependent part ‘attractiveness’ vertices adjacent edges. See also details . zero.age.appeal age-dependent part ‘attrativeness’ vertices age zero. usually zero, see details . deg.coef coefficient degree-dependent ‘attractiveness’. See details . age.coef coefficient age-dependent part ‘attractiveness’. See details . time.window Integer constant, NULL adjacent added last time.windows time steps counted basis preferential attachment. See also details .","code":""},{"path":"https://r.igraph.org/reference/aging.prefatt.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate an evolving random graph with preferential attachment and aging — aging.prefatt.game","title":"Generate an evolving random graph with preferential attachment and aging — aging.prefatt.game","text":"aging.prefatt.game() renamed sample_pa_age() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/aging.prefatt.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate an evolving random graph with preferential attachment and aging — aging.prefatt.game","text":"","code":"aging.prefatt.game( n, pa.exp, aging.exp, m = NULL, aging.bin = 300, out.dist = NULL, out.seq = NULL, out.pref = FALSE, directed = TRUE, zero.deg.appeal = 1, zero.age.appeal = 0, deg.coef = 1, age.coef = 1, time.window = NULL )"},{"path":"https://r.igraph.org/reference/aging.prefatt.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate an evolving random graph with preferential attachment and aging — aging.prefatt.game","text":"n number vertices graph. pa.exp preferential attachment exponent, see details . aging.exp exponent aging, usually non-positive number, see details . m number edges new vertex creates (except first vertex). argument used .dist .seq arguments NULL. aging.bin number bins use measuring age vertices, see details . .dist discrete distribution generate number edges add time step .seq NULL. See details . .seq number edges add time step, vector containing many elements number vertices. See details . .pref Logical constant, whether include edges initiated vertex basis preferential attachment. See details . directed Logical constant, whether generate directed graph. See details . zero.deg.appeal degree-dependent part ‘attractiveness’ vertices adjacent edges. See also details . zero.age.appeal age-dependent part ‘attrativeness’ vertices age zero. usually zero, see details . deg.coef coefficient degree-dependent ‘attractiveness’. See details . age.coef coefficient age-dependent part ‘attractiveness’. See details . time.window Integer constant, NULL adjacent added last time.windows time steps counted basis preferential attachment. See also details .","code":""},{"path":"https://r.igraph.org/reference/all_simple_paths.html","id":null,"dir":"Reference","previous_headings":"","what":"List all simple paths from one source — all_simple_paths","title":"List all simple paths from one source — all_simple_paths","text":"function lists simple paths one source vertex another vertex vertices. path simple vertices visits visited .","code":""},{"path":"https://r.igraph.org/reference/all_simple_paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all simple paths from one source — all_simple_paths","text":"","code":"all_simple_paths( graph, from, to = V(graph), mode = c(\"out\", \"in\", \"all\", \"total\"), cutoff = -1 )"},{"path":"https://r.igraph.org/reference/all_simple_paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List all simple paths from one source — all_simple_paths","text":"graph input graph. source vertex. target vertex vertices. Defaults vertices. mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, corresponding undirected graph used, .e. directed paths searched. argument ignored undirected graphs. cutoff Maximum length path considered. negative, paths lengths considered.","code":""},{"path":"https://r.igraph.org/reference/all_simple_paths.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List all simple paths from one source — all_simple_paths","text":"list integer vectors, integer vector path source vertex one target vertices. path given vertex ids.","code":""},{"path":"https://r.igraph.org/reference/all_simple_paths.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List all simple paths from one source — all_simple_paths","text":"Note potentially exponentially many paths two vertices graph, may run memory using function, graph lattice-like. function currently ignored multiple loop edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/all_simple_paths.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List all simple paths from one source — all_simple_paths","text":"","code":"g <- make_ring(10) all_simple_paths(g, 1, 5) #> [[1]] #> + 5/10 vertices, from 7996210: #> [1] 1 2 3 4 5 #> #> [[2]] #> + 7/10 vertices, from 7996210: #> [1] 1 10 9 8 7 6 5 #> all_simple_paths(g, 1, c(3, 5)) #> [[1]] #> + 3/10 vertices, from 7996210: #> [1] 1 2 3 #> #> [[2]] #> + 5/10 vertices, from 7996210: #> [1] 1 2 3 4 5 #> #> [[3]] #> + 7/10 vertices, from 7996210: #> [1] 1 10 9 8 7 6 5 #> #> [[4]] #> + 9/10 vertices, from 7996210: #> [1] 1 10 9 8 7 6 5 4 3 #>"},{"path":"https://r.igraph.org/reference/alpha.centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Bonacich alpha centrality scores of network positions — alpha.centrality","title":"Find Bonacich alpha centrality scores of network positions — alpha.centrality","text":"alpha.centrality() renamed alpha_centrality() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/alpha.centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Bonacich alpha centrality scores of network positions — alpha.centrality","text":"","code":"alpha.centrality( graph, nodes = V(graph), alpha = 1, loops = FALSE, exo = 1, weights = NULL, tol = 1e-07, sparse = TRUE )"},{"path":"https://r.igraph.org/reference/alpha.centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Bonacich alpha centrality scores of network positions — alpha.centrality","text":"graph input graph, can directed undirected. undirected graphs, edges treated reciprocal directed ones. nodes Vertex sequence, vertices alpha centrality values returned. (technical reasons calculated vertices, anyway.) alpha Parameter specifying relative importance endogenous versus exogenous factors determination centrality. See details . loops Whether eliminate loop edges graph calculation. exo exogenous factors, cases either constant – factor every node, vector giving factor every vertex. Note long vectors truncated short vectors replicated match number vertices. weights character scalar gives name edge attribute use adjacency matrix. NULL, ‘weight’ edge attribute graph used, one. Otherwise, NA, calculation uses standard adjacency matrix. tol Tolerance near-singularities matrix inversion, see solve(). sparse Logical scalar, whether use sparse matrices calculation. ‘Matrix’ package required sparse matrix support","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"alpha_centrality() calculates alpha centrality () vertices graph.","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"","code":"alpha_centrality( graph, nodes = V(graph), alpha = 1, loops = FALSE, exo = 1, weights = NULL, tol = 1e-07, sparse = TRUE )"},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"graph input graph, can directed undirected. undirected graphs, edges treated reciprocal directed ones. nodes Vertex sequence, vertices alpha centrality values returned. (technical reasons calculated vertices, anyway.) alpha Parameter specifying relative importance endogenous versus exogenous factors determination centrality. See details . loops Whether eliminate loop edges graph calculation. exo exogenous factors, cases either constant – factor every node, vector giving factor every vertex. Note long vectors truncated short vectors replicated match number vertices. weights character scalar gives name edge attribute use adjacency matrix. NULL, ‘weight’ edge attribute graph used, one. Otherwise, NA, calculation uses standard adjacency matrix. tol Tolerance near-singularities matrix inversion, see solve(). sparse Logical scalar, whether use sparse matrices calculation. ‘Matrix’ package required sparse matrix support","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"numeric vector contaning centrality scores selected vertices.","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"alpha centrality measure can considered generalization eigenvector centrality directed graphs. proposed Bonacich 2001 (see reference ). alpha centrality vertices graph defined solution following matrix equation: $$x=\\alpha ^T x+e,$$ \\(\\) (necessarily symmetric) adjacency matrix graph, \\(e\\) vector exogenous sources status vertices \\(\\alpha\\) relative importance endogenous versus exogenous factors.","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"Singular adjacency matrices cause problems algorithm, routine may fail certain cases.","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"Bonacich, P. Lloyd, P. (2001). “Eigenvector-like measures centrality asymmetric relations” Social Networks, 23, 191-201.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"","code":"# The examples from Bonacich's paper g.1 <- make_graph(c(1, 3, 2, 3, 3, 4, 4, 5)) g.2 <- make_graph(c(2, 1, 3, 1, 4, 1, 5, 1)) g.3 <- make_graph(c(1, 2, 2, 3, 3, 4, 4, 1, 5, 1)) alpha_centrality(g.1) #> [1] 1 1 3 4 5 alpha_centrality(g.2) #> [1] 5 1 1 1 1 alpha_centrality(g.3, alpha = 0.5) #> [1] 2.533333 2.266667 2.133333 2.066667 1.000000"},{"path":"https://r.igraph.org/reference/are.connected.html","id":null,"dir":"Reference","previous_headings":"","what":"Are two vertices adjacent? — are.connected","title":"Are two vertices adjacent? — are.connected","text":".connected() renamed are_adjacent() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/are.connected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are two vertices adjacent? — are.connected","text":"","code":"are.connected(graph, v1, v2)"},{"path":"https://r.igraph.org/reference/are.connected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are two vertices adjacent? — are.connected","text":"graph graph. v1 first vertex, tail directed graphs. v2 second vertex, head directed graphs.","code":""},{"path":"https://r.igraph.org/reference/are_adjacent.html","id":null,"dir":"Reference","previous_headings":"","what":"Are two vertices adjacent? — are_adjacent","title":"Are two vertices adjacent? — are_adjacent","text":"order vertices matters directed graphs, existence directed (v1, v2) edge queried.","code":""},{"path":"https://r.igraph.org/reference/are_adjacent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are two vertices adjacent? — are_adjacent","text":"","code":"are_adjacent(graph, v1, v2)"},{"path":"https://r.igraph.org/reference/are_adjacent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are two vertices adjacent? — are_adjacent","text":"graph graph. v1 first vertex, tail directed graphs. v2 second vertex, head directed graphs.","code":""},{"path":"https://r.igraph.org/reference/are_adjacent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Are two vertices adjacent? — are_adjacent","text":"logical scalar, TRUE edge (v1, v2) exists graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/are_adjacent.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Are two vertices adjacent? — are_adjacent","text":"igraph_are_adjacent().","code":""},{"path":"https://r.igraph.org/reference/are_adjacent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Are two vertices adjacent? — are_adjacent","text":"","code":"ug <- make_ring(10) ug #> IGRAPH 8f69634 U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from 8f69634: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 are_adjacent(ug, 1, 2) #> [1] TRUE are_adjacent(ug, 2, 1) #> [1] TRUE dg <- make_ring(10, directed = TRUE) dg #> IGRAPH 5d978fe D--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from 5d978fe: #> [1] 1-> 2 2-> 3 3-> 4 4-> 5 5-> 6 6-> 7 7-> 8 8-> 9 9->10 10-> 1 are_adjacent(ug, 1, 2) #> [1] TRUE are_adjacent(ug, 2, 1) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/arpack.html","id":null,"dir":"Reference","previous_headings":"","what":"ARPACK eigenvector calculation — arpack_defaults","title":"ARPACK eigenvector calculation — arpack_defaults","text":"Interface ARPACK library calculating eigenvectors sparse matrices","code":""},{"path":"https://r.igraph.org/reference/arpack.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARPACK eigenvector calculation — arpack_defaults","text":"","code":"arpack_defaults() arpack( func, extra = NULL, sym = FALSE, options = arpack_defaults(), env = parent.frame(), complex = !sym )"},{"path":"https://r.igraph.org/reference/arpack.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARPACK eigenvector calculation — arpack_defaults","text":"func function perform matrix-vector multiplication. ARPACK requires perform user. function gets vector \\(x\\) first argument, return \\(Ax\\), \\(\\) “input matrix”. (input matrix never given explicitly.) second argument extra. extra Extra argument supply func. sym Logical scalar, whether input matrix symmetric. Always supply TRUE , since can speed computation. options Options ARPACK, named list overwrite default option values. See details . env environment func evaluated. complex Whether convert eigenvectors returned ARPACK R complex vectors. default done symmetric problems (real eigenvectors/values), non-symmetric ones. non-symmetric problem, sure results real, supply FALSE .","code":""},{"path":"https://r.igraph.org/reference/arpack.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARPACK eigenvector calculation — arpack_defaults","text":"named list following members: values Numeric vector, desired eigenvalues. vectors Numeric matrix, desired eigenvectors columns. complex=TRUE (default non-symmetric problems), matrix complex. options named list supplied options information performed calculation, including ARPACK exit code. See details .","code":""},{"path":"https://r.igraph.org/reference/arpack.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARPACK eigenvector calculation — arpack_defaults","text":"ARPACK library solving large scale eigenvalue problems. package designed compute eigenvalues corresponding eigenvectors general \\(n\\) \\(n\\) matrix \\(\\). appropriate large sparse structured matrices \\(\\) structured means matrix-vector product w <- Av requires order \\(n\\) rather usual order \\(n^2\\) floating point operations. function interface ARPACK. igraph contain ARPACK routines, ones dealing symmetric non-symmetric eigenvalue problems using double precision real numbers. eigenvalue calculation ARPACK (simplest case) involves calculation \\(Av\\) product \\(\\) matrix work \\(v\\) arbitrary vector. function supplied fun argument expected perform product. product can done efficiently, e.g. matrix sparse, arpack() usually able calculate eigenvalues quickly. options argument specifies kind calculation perform. list following members, correspond directly ARPACK parameters. input following fields: bmat Character constant, possible values: ‘’, standard eigenvalue problem, \\(Ax=\\lambda x\\); ‘G’, generalized eigenvalue problem, \\(Ax=\\lambda B x\\). Currently ‘’ supported. n Numeric scalar. dimension eigenproblem. need set call arpack() directly. (.e. needed eigen_centrality(), page_rank(), etc.) Specify eigenvalues/vectors compute, character constant exactly two characters. Possible values symmetric input matrices: \"LA\" Compute nev largest (algebraic) eigenvalues. \"SA\" Compute nev smallest (algebraic) eigenvalues. \"LM\" Compute nev largest (magnitude) eigenvalues. \"SM\" Compute nev smallest (magnitude) eigenvalues. \"\" Compute nev eigenvalues, half end spectrum. nev odd, compute one high end low end. Possible values non-symmetric input matrices: \"LM\" Compute nev eigenvalues largest magnitude. \"SM\" Compute nev eigenvalues smallest magnitude. \"LR\" Compute nev eigenvalues largest real part. \"SR\" Compute nev eigenvalues smallest real part. \"LI\" Compute nev eigenvalues largest imaginary part. \"SI\" Compute nev eigenvalues smallest imaginary part. parameter sometimes overwritten various functions, e.g. page_rank() always sets ‘LM’. nev Numeric scalar. number eigenvalues computed. tol Numeric scalar. Stopping criterion: relative accuracy Ritz value considered acceptable error less tol times estimated value. set zero machine precision used. ncv Number Lanczos vectors generated. ldv Numberic scalar. set zero current implementation. ishift Either zero one. zero shifts provided user via reverse communication. one exact shifts respect reduced tridiagonal matrix \\(T\\). Please always set one. maxiter Maximum number Arnoldi update iterations allowed. nb Blocksize used recurrence. Please always leave default value, one. mode type eigenproblem solved. Possible values input matrix symmetric: 1 \\(Ax=\\lambda x\\), \\(\\) symmetric. 2 \\(Ax=\\lambda Mx\\), \\(\\) symmetric, \\(M\\) symmetric positive definite. 3 \\(Kx=\\lambda Mx\\), \\(K\\) symmetric, \\(M\\) symmetric positive semi-definite. 4 \\(Kx=\\lambda KGx\\), \\(K\\) symmetric positive semi-definite, \\(KG\\) symmetric indefinite. 5 \\(Ax=\\lambda Mx\\), \\(\\) symmetric, \\(M\\) symmetric positive semi-definite. (Cayley transformed mode.) Please note mode==1 tested values might work properly. Possible values input matrix symmetric: 1 \\(Ax=\\lambda x\\). 2 \\(Ax=\\lambda Mx\\), \\(M\\) symmetric positive definite. 3 \\(Ax=\\lambda Mx\\), \\(M\\) symmetric semi-definite. 4 \\(Ax=\\lambda Mx\\), \\(M\\) symmetric semi-definite. Please note mode==1 tested values might work properly. start used currently. Later used set starting vector. sigma used currently. sigmai use currently. Please see ARPACK documentation additional details.","code":""},{"path":"https://r.igraph.org/reference/arpack.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"ARPACK eigenvector calculation — arpack_defaults","text":"D.C. Sorensen, Implicit Application Polynomial Filters k-Step Arnoldi Method. SIAM J. Matr. Anal. Apps., 13 (1992), pp 357-385. R.B. Lehoucq, Analysis Implementation Implicitly Restarted Arnoldi Iteration. Rice University Technical Report TR95-13, Department Computational Applied Mathematics. B.N. Parlett & Y. Saad, Complex Shift Invert Strategies Real Matrices. Linear Algebra Applications, vol 88/89, pp 575-595, (1987).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/arpack.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"ARPACK eigenvector calculation — arpack_defaults","text":"Rich Lehoucq, Kristi Maschhoff, Danny Sorensen, Chao Yang ARPACK, Gabor Csardi csardi.gabor@gmail.com R interface.","code":""},{"path":"https://r.igraph.org/reference/arpack.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARPACK eigenvector calculation — arpack_defaults","text":"","code":"# Identity matrix f <- function(x, extra = NULL) x arpack(f, options = list(n = 10, nev = 2, ncv = 4), sym = TRUE) #> $values #> [1] 1 1 #> #> $vectors #> [,1] [,2] #> [1,] -0.3726998 0.112735486 #> [2,] 0.1195827 0.041517695 #> [3,] 0.4062664 -0.421475667 #> [4,] -0.4452969 -0.709645619 #> [5,] 0.3098338 0.177672414 #> [6,] 0.1653131 -0.125415897 #> [7,] -0.1946057 0.482549613 #> [8,] 0.4619532 0.006154024 #> [9,] -0.2346540 0.121470373 #> [10,] 0.2319333 -0.096874464 #> #> $options #> $options$bmat #> [1] \"I\" #> #> $options$n #> [1] 10 #> #> $options$which #> [1] \"XX\" #> #> $options$nev #> [1] 2 #> #> $options$tol #> [1] 0 #> #> $options$ncv #> [1] 4 #> #> $options$ldv #> [1] 0 #> #> $options$ishift #> [1] 1 #> #> $options$maxiter #> [1] 3000 #> #> $options$nb #> [1] 1 #> #> $options$mode #> [1] 1 #> #> $options$start #> [1] 0 #> #> $options$sigma #> [1] 0 #> #> $options$sigmai #> [1] 0 #> #> $options$info #> [1] 0 #> #> $options$iter #> [1] 1 #> #> $options$nconv #> [1] 2 #> #> $options$numop #> [1] 4 #> #> $options$numopb #> [1] 0 #> #> $options$numreo #> [1] 4 #> #> # Graph laplacian of a star graph (undirected), n>=2 # Note that this is a linear operation f <- function(x, extra = NULL) { y <- x y[1] <- (length(x) - 1) * x[1] - sum(x[-1]) for (i in 2:length(x)) { y[i] <- x[i] - x[1] } y } arpack(f, options = list(n = 10, nev = 1, ncv = 3), sym = TRUE) #> $values #> [1] 10 #> #> $vectors #> [1] -0.9486833 0.1054093 0.1054093 0.1054093 0.1054093 0.1054093 #> [7] 0.1054093 0.1054093 0.1054093 0.1054093 #> #> $options #> $options$bmat #> [1] \"I\" #> #> $options$n #> [1] 10 #> #> $options$which #> [1] \"XX\" #> #> $options$nev #> [1] 1 #> #> $options$tol #> [1] 0 #> #> $options$ncv #> [1] 3 #> #> $options$ldv #> [1] 0 #> #> $options$ishift #> [1] 1 #> #> $options$maxiter #> [1] 3000 #> #> $options$nb #> [1] 1 #> #> $options$mode #> [1] 1 #> #> $options$start #> [1] 0 #> #> $options$sigma #> [1] 0 #> #> $options$sigmai #> [1] 0 #> #> $options$info #> [1] 0 #> #> $options$iter #> [1] 1 #> #> $options$nconv #> [1] 1 #> #> $options$numop #> [1] 3 #> #> $options$numopb #> [1] 0 #> #> $options$numreo #> [1] 3 #> #> # double check eigen(laplacian_matrix(make_star(10, mode = \"undirected\"))) #> eigen() decomposition #> $values #> [1] 1.000000e+01 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 #> [6] 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 3.552714e-15 #> #> $vectors #> [,1] [,2] [,3] [,4] [,5] #> [1,] 0.9486833 0.000000e+00 0.000000000 0.000000e+00 0.000000e+00 #> [2,] -0.1054093 9.251859e-18 0.000000000 -9.251859e-18 1.850372e-17 #> [3,] -0.1054093 -9.316303e-02 0.079217213 -5.526928e-02 -5.860537e-02 #> [4,] -0.1054093 9.295069e-01 0.020878444 -5.681485e-02 2.420873e-02 #> [5,] -0.1054093 -1.772059e-01 -0.072634120 -1.521102e-01 1.990548e-02 #> [6,] -0.1054093 -1.772059e-01 0.014765896 3.109043e-01 1.456789e-01 #> [7,] -0.1054093 -1.246177e-01 0.008447773 6.043444e-02 8.117572e-01 #> [8,] -0.1054093 -6.376015e-02 -0.659513765 4.360577e-01 -3.697494e-01 #> [9,] -0.1054093 -1.772059e-01 -0.124196522 -7.876367e-01 -2.016864e-01 #> [10,] -0.1054093 -1.163484e-01 0.733035080 2.444346e-01 -3.715091e-01 #> [,6] [,7] [,8] [,9] [,10] #> [1,] 0.000000e+00 0.00000000 0.0000000 0.000000e+00 -0.3162278 #> [2,] 9.251859e-18 0.00000000 0.9428090 6.476301e-17 -0.3162278 #> [3,] 3.877514e-02 0.07938499 -0.1178511 9.196470e-01 -0.3162278 #> [4,] 2.633343e-02 0.05841931 -0.1178511 -5.158318e-02 -0.3162278 #> [5,] 8.820081e-01 -0.01683834 -0.1178511 -1.912244e-01 -0.3162278 #> [6,] -1.516578e-01 0.81604496 -0.1178511 -1.912244e-01 -0.3162278 #> [7,] -1.927091e-01 -0.39623153 -0.1178511 -5.158318e-02 -0.3162278 #> [8,] -1.420878e-01 -0.29370999 -0.1178511 -5.158318e-02 -0.3162278 #> [9,] -3.596255e-01 0.03503021 -0.1178511 -1.912244e-01 -0.3162278 #> [10,] -1.010365e-01 -0.28209962 -0.1178511 -1.912244e-01 -0.3162278 #> ## First three eigenvalues of the adjacency matrix of a graph ## We need the 'Matrix' package for this if (require(Matrix)) { set.seed(42) g <- sample_gnp(1000, 5 / 1000) M <- as_adjacency_matrix(g, sparse = TRUE) f2 <- function(x, extra = NULL) { cat(\".\") as.vector(M %*% x) } baev <- arpack(f2, sym = TRUE, options = list( n = vcount(g), nev = 3, ncv = 8, which = \"LM\", maxiter = 2000 )) } #> Loading required package: Matrix #> ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."},{"path":"https://r.igraph.org/reference/articulation.points.html","id":null,"dir":"Reference","previous_headings":"","what":"Articulation points and bridges of a graph — articulation.points","title":"Articulation points and bridges of a graph — articulation.points","text":"articulation.points() renamed articulation_points() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/articulation.points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Articulation points and bridges of a graph — articulation.points","text":"","code":"articulation.points(graph)"},{"path":"https://r.igraph.org/reference/articulation.points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Articulation points and bridges of a graph — articulation.points","text":"graph input graph. treated undirected graph, even directed.","code":""},{"path":"https://r.igraph.org/reference/articulation_points.html","id":null,"dir":"Reference","previous_headings":"","what":"Articulation points and bridges of a graph — articulation_points","title":"Articulation points and bridges of a graph — articulation_points","text":"articulation_points() finds articulation points (cut vertices)","code":""},{"path":"https://r.igraph.org/reference/articulation_points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Articulation points and bridges of a graph — articulation_points","text":"","code":"articulation_points(graph) bridges(graph)"},{"path":"https://r.igraph.org/reference/articulation_points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Articulation points and bridges of a graph — articulation_points","text":"graph input graph. treated undirected graph, even directed.","code":""},{"path":"https://r.igraph.org/reference/articulation_points.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Articulation points and bridges of a graph — articulation_points","text":"articulation_points(), numeric vector giving vertex IDs articulation points input graph. bridges(), numeric vector giving edge IDs bridges input graph.","code":""},{"path":"https://r.igraph.org/reference/articulation_points.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Articulation points and bridges of a graph — articulation_points","text":"Articulation points cut vertices vertices whose removal increases number connected components graph. Similarly, bridges cut-edges edges whose removal increases number connected components graph. original graph connected, removal single articulation point single bridge makes disconnected. graph contains articulation points, vertex connectivity least two.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/articulation_points.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Articulation points and bridges of a graph — articulation_points","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/articulation_points.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Articulation points and bridges of a graph — articulation_points","text":"igraph_articulation_points(), igraph_bridges().","code":""},{"path":"https://r.igraph.org/reference/articulation_points.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Articulation points and bridges of a graph — articulation_points","text":"","code":"g <- disjoint_union(make_full_graph(5), make_full_graph(5)) clu <- components(g)$membership g <- add_edges(g, c(match(1, clu), match(2, clu))) articulation_points(g) #> + 2/10 vertices, from db5ff8f: #> [1] 6 1 g <- make_graph(\"krackhardt_kite\") bridges(g) #> + 2/18 edges from 01d687f: #> [1] 9--10 8-- 9"},{"path":"https://r.igraph.org/reference/as.directed.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert between directed and undirected graphs — as.directed","title":"Convert between directed and undirected graphs — as.directed","text":".directed() renamed as_directed() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/as.directed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert between directed and undirected graphs — as.directed","text":"","code":"as.directed(graph, mode = c(\"mutual\", \"arbitrary\", \"random\", \"acyclic\"))"},{"path":"https://r.igraph.org/reference/as.directed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert between directed and undirected graphs — as.directed","text":"graph graph convert. mode Character constant, defines conversion algorithm. as_directed() can mutual arbitrary. as_undirected() can , collapse mutual. See details .","code":""},{"path":"https://r.igraph.org/reference/as.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Conversion to igraph — as.igraph","title":"Conversion to igraph — as.igraph","text":"functions convert various objects igraph graphs.","code":""},{"path":"https://r.igraph.org/reference/as.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Conversion to igraph — as.igraph","text":"","code":"as.igraph(x, ...)"},{"path":"https://r.igraph.org/reference/as.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Conversion to igraph — as.igraph","text":"x object convert. ... Additional arguments. None currently.","code":""},{"path":"https://r.igraph.org/reference/as.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Conversion to igraph — as.igraph","text":"functions return igraph graph.","code":""},{"path":"https://r.igraph.org/reference/as.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Conversion to igraph — as.igraph","text":"can use .igraph() convert various objects igraph graphs. Right now following objects supported: codeigraphHRG objects created fit_hrg() consensus_tree() functions.","code":""},{"path":"https://r.igraph.org/reference/as.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Conversion to igraph — as.igraph","text":"Gabor Csardi csardi.gabor@gmail.com.","code":""},{"path":"https://r.igraph.org/reference/as.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Conversion to igraph — as.igraph","text":"","code":"g <- make_full_graph(5) + make_full_graph(5) hrg <- fit_hrg(g) as.igraph(hrg) #> IGRAPH 4505da1 DN-- 19 18 -- Fitted HRG #> + attr: name (g/c), name (v/c), prob (v/n) #> + edges from 4505da1 (vertex names): #> [1] g1->g4 g2->1 g3->2 g4->g6 g5->8 g6->g2 g7->g9 g8->6 g9->7 g1->g8 #> [11] g2->g3 g3->4 g4->3 g5->9 g6->5 g7->g5 g8->g7 g9->10"},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"Get adjacency edgelist representation network stored igraph object.","code":""},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"","code":"# S3 method for class 'igraph' as.matrix(x, matrix.type = c(\"adjacency\", \"edgelist\"), ...)"},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"x object class igraph, network matrix.type character, type matrix return, currently \"adjacency\" \"edgelist\" supported ... arguments /methods","code":""},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"Depending value matrix.type either square adjacency matrix two-column numeric matrix representing edgelist.","code":""},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"matrix.type \"edgelist\", two-column numeric edge list matrix returned. value attrname ignored. matrix.type \"adjacency\", square adjacency matrix returned. adjacency matrices, can use attr keyword argument use values edge attribute matrix cells. See documentation as_adjacency_matrix details. arguments passed ... passed either as_adjacency_matrix() as_edgelist() depending value matrix.type.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"Michal Bojanowski, originally intergraph package","code":""},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"","code":"g <- make_graph(\"zachary\") as.matrix(g, \"adjacency\") #> 34 x 34 sparse Matrix of class \"dgCMatrix\" #> #> [1,] . 1 1 1 1 1 1 1 1 . 1 1 1 1 . . . 1 . 1 . 1 . . . . . . . . . 1 . . #> [2,] 1 . 1 1 . . . 1 . . . . . 1 . . . 1 . 1 . 1 . . . . . . . . 1 . . . #> [3,] 1 1 . 1 . . . 1 1 1 . . . 1 . . . . . . . . . . . . . 1 1 . . . 1 . #> [4,] 1 1 1 . . . . 1 . . . . 1 1 . . . . . . . . . . . . . . . . . . . . #> [5,] 1 . . . . . 1 . . . 1 . . . . . . . . . . . . . . . . . . . . . . . #> [6,] 1 . . . . . 1 . . . 1 . . . . . 1 . . . . . . . . . . . . . . . . . #> [7,] 1 . . . 1 1 . . . . . . . . . . 1 . . . . . . . . . . . . . . . . . #> [8,] 1 1 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [9,] 1 . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . 1 1 #> [10,] . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 #> [11,] 1 . . . 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [12,] 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [13,] 1 . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [14,] 1 1 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 #> [15,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 #> [16,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 #> [17,] . . . . . 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [18,] 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [19,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 #> [20,] 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 #> [21,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 #> [22,] 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [23,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 #> [24,] . . . . . . . . . . . . . . . . . . . . . . . . . 1 . 1 . 1 . . 1 1 #> [25,] . . . . . . . . . . . . . . . . . . . . . . . . . 1 . 1 . . . 1 . . #> [26,] . . . . . . . . . . . . . . . . . . . . . . . 1 1 . . . . . . 1 . . #> [27,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . . . 1 #> [28,] . . 1 . . . . . . . . . . . . . . . . . . . . 1 1 . . . . . . . . 1 #> [29,] . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . 1 #> [30,] . . . . . . . . . . . . . . . . . . . . . . . 1 . . 1 . . . . . 1 1 #> [31,] . 1 . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . 1 1 #> [32,] 1 . . . . . . . . . . . . . . . . . . . . . . . 1 1 . . 1 . . . 1 1 #> [33,] . . 1 . . . . . 1 . . . . . 1 1 . . 1 . 1 . 1 1 . . . . . 1 1 1 . 1 #> [34,] . . . . . . . . 1 1 . . . 1 1 1 . . 1 1 1 . 1 1 . . 1 1 1 1 1 1 1 . as.matrix(g, \"edgelist\") #> [,1] [,2] #> [1,] 1 2 #> [2,] 1 3 #> [3,] 1 4 #> [4,] 1 5 #> [5,] 1 6 #> [6,] 1 7 #> [7,] 1 8 #> [8,] 1 9 #> [9,] 1 11 #> [10,] 1 12 #> [11,] 1 13 #> [12,] 1 14 #> [13,] 1 18 #> [14,] 1 20 #> [15,] 1 22 #> [16,] 1 32 #> [17,] 2 3 #> [18,] 2 4 #> [19,] 2 8 #> [20,] 2 14 #> [21,] 2 18 #> [22,] 2 20 #> [23,] 2 22 #> [24,] 2 31 #> [25,] 3 4 #> [26,] 3 8 #> [27,] 3 28 #> [28,] 3 29 #> [29,] 3 33 #> [30,] 3 10 #> [31,] 3 9 #> [32,] 3 14 #> [33,] 4 8 #> [34,] 4 13 #> [35,] 4 14 #> [36,] 5 7 #> [37,] 5 11 #> [38,] 6 7 #> [39,] 6 11 #> [40,] 6 17 #> [41,] 7 17 #> [42,] 9 31 #> [43,] 9 33 #> [44,] 9 34 #> [45,] 10 34 #> [46,] 14 34 #> [47,] 15 33 #> [48,] 15 34 #> [49,] 16 33 #> [50,] 16 34 #> [51,] 19 33 #> [52,] 19 34 #> [53,] 20 34 #> [54,] 21 33 #> [55,] 21 34 #> [56,] 23 33 #> [57,] 23 34 #> [58,] 24 26 #> [59,] 24 28 #> [60,] 24 33 #> [61,] 24 34 #> [62,] 24 30 #> [63,] 25 26 #> [64,] 25 28 #> [65,] 25 32 #> [66,] 26 32 #> [67,] 27 30 #> [68,] 27 34 #> [69,] 28 34 #> [70,] 29 32 #> [71,] 29 34 #> [72,] 30 33 #> [73,] 30 34 #> [74,] 31 33 #> [75,] 31 34 #> [76,] 32 33 #> [77,] 32 34 #> [78,] 33 34 # use edge attribute \"weight\" E(g)$weight <- rep(1:10, length.out = ecount(g)) as.matrix(g, \"adjacency\", sparse = FALSE, attr = \"weight\") #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 0 1 2 3 4 5 6 7 8 0 9 10 1 #> [2,] 1 0 7 8 0 0 0 9 0 0 0 0 0 #> [3,] 2 7 0 5 0 0 0 6 1 10 0 0 0 #> [4,] 3 8 5 0 0 0 0 3 0 0 0 0 4 #> [5,] 4 0 0 0 0 0 6 0 0 0 7 0 0 #> [6,] 5 0 0 0 0 0 8 0 0 0 9 0 0 #> [7,] 6 0 0 0 6 8 0 0 0 0 0 0 0 #> [8,] 7 9 6 3 0 0 0 0 0 0 0 0 0 #> [9,] 8 0 1 0 0 0 0 0 0 0 0 0 0 #> [10,] 0 0 10 0 0 0 0 0 0 0 0 0 0 #> [11,] 9 0 0 0 7 9 0 0 0 0 0 0 0 #> [12,] 10 0 0 0 0 0 0 0 0 0 0 0 0 #> [13,] 1 0 0 4 0 0 0 0 0 0 0 0 0 #> [14,] 2 10 2 5 0 0 0 0 0 0 0 0 0 #> [15,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [16,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [17,] 0 0 0 0 0 10 1 0 0 0 0 0 0 #> [18,] 3 1 0 0 0 0 0 0 0 0 0 0 0 #> [19,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [20,] 4 2 0 0 0 0 0 0 0 0 0 0 0 #> [21,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [22,] 5 3 0 0 0 0 0 0 0 0 0 0 0 #> [23,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [24,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [25,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [26,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [27,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [28,] 0 0 7 0 0 0 0 0 0 0 0 0 0 #> [29,] 0 0 8 0 0 0 0 0 0 0 0 0 0 #> [30,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [31,] 0 4 0 0 0 0 0 0 2 0 0 0 0 #> [32,] 6 0 0 0 0 0 0 0 0 0 0 0 0 #> [33,] 0 0 9 0 0 0 0 0 3 0 0 0 0 #> [34,] 0 0 0 0 0 0 0 0 4 5 0 0 0 #> [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] #> [1,] 2 0 0 0 3 0 4 0 5 0 0 0 #> [2,] 10 0 0 0 1 0 2 0 3 0 0 0 #> [3,] 2 0 0 0 0 0 0 0 0 0 0 0 #> [4,] 5 0 0 0 0 0 0 0 0 0 0 0 #> [5,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [6,] 0 0 0 10 0 0 0 0 0 0 0 0 #> [7,] 0 0 0 1 0 0 0 0 0 0 0 0 #> [8,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [9,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [10,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [11,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [12,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [13,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [14,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [15,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [16,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [17,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [18,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [19,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [20,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [21,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [22,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [23,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [24,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [25,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [26,] 0 0 0 0 0 0 0 0 0 0 8 3 #> [27,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [28,] 0 0 0 0 0 0 0 0 0 0 9 4 #> [29,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [30,] 0 0 0 0 0 0 0 0 0 0 2 0 #> [31,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [32,] 0 0 0 0 0 0 0 0 0 0 0 5 #> [33,] 0 7 9 0 0 1 0 4 0 6 10 0 #> [34,] 6 8 10 0 0 2 3 5 0 7 1 0 #> [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] #> [1,] 0 0 0 0 0 0 6 0 0 #> [2,] 0 0 0 0 0 4 0 0 0 #> [3,] 0 0 7 8 0 0 0 9 0 #> [4,] 0 0 0 0 0 0 0 0 0 #> [5,] 0 0 0 0 0 0 0 0 0 #> [6,] 0 0 0 0 0 0 0 0 0 #> [7,] 0 0 0 0 0 0 0 0 0 #> [8,] 0 0 0 0 0 0 0 0 0 #> [9,] 0 0 0 0 0 2 0 3 4 #> [10,] 0 0 0 0 0 0 0 0 5 #> [11,] 0 0 0 0 0 0 0 0 0 #> [12,] 0 0 0 0 0 0 0 0 0 #> [13,] 0 0 0 0 0 0 0 0 0 #> [14,] 0 0 0 0 0 0 0 0 6 #> [15,] 0 0 0 0 0 0 0 7 8 #> [16,] 0 0 0 0 0 0 0 9 10 #> [17,] 0 0 0 0 0 0 0 0 0 #> [18,] 0 0 0 0 0 0 0 0 0 #> [19,] 0 0 0 0 0 0 0 1 2 #> [20,] 0 0 0 0 0 0 0 0 3 #> [21,] 0 0 0 0 0 0 0 4 5 #> [22,] 0 0 0 0 0 0 0 0 0 #> [23,] 0 0 0 0 0 0 0 6 7 #> [24,] 8 0 9 0 2 0 0 10 1 #> [25,] 3 0 4 0 0 0 5 0 0 #> [26,] 0 0 0 0 0 0 6 0 0 #> [27,] 0 0 0 0 7 0 0 0 8 #> [28,] 0 0 0 0 0 0 0 0 9 #> [29,] 0 0 0 0 0 0 10 0 1 #> [30,] 0 7 0 0 0 0 0 2 3 #> [31,] 0 0 0 0 0 0 0 4 5 #> [32,] 6 0 0 10 0 0 0 6 7 #> [33,] 0 0 0 0 2 4 6 0 8 #> [34,] 0 8 9 1 3 5 7 8 0"},{"path":"https://r.igraph.org/reference/as.undirected.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert between undirected and unundirected graphs — as.undirected","title":"Convert between undirected and unundirected graphs — as.undirected","text":".undirected() renamed as_undirected() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/as.undirected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert between undirected and unundirected graphs — as.undirected","text":"","code":"as.undirected( graph, mode = c(\"collapse\", \"each\", \"mutual\"), edge.attr.comb = igraph_opt(\"edge.attr.comb\") )"},{"path":"https://r.igraph.org/reference/as.undirected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert between undirected and unundirected graphs — as.undirected","text":"graph graph convert. mode Character constant, defines conversion algorithm. as_directed() can mutual arbitrary. as_undirected() can , collapse mutual. See details . edge.attr.comb Specifies edge attributes, mode=\"collapse\" mode=\"mutual\". cases many edges might mapped single one new graph, attributes combined. Please see attribute.combination() details .","code":""},{"path":"https://r.igraph.org/reference/as_adj.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a graph to an adjacency matrix — as_adj","title":"Convert a graph to an adjacency matrix — as_adj","text":"plan remove as_adj() favor explicitly named as_adjacency_matrix() please use as_adjacency_matrix() instead.","code":""},{"path":"https://r.igraph.org/reference/as_adj.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a graph to an adjacency matrix — as_adj","text":"","code":"as_adj( graph, type = c(\"both\", \"upper\", \"lower\"), attr = NULL, edges = deprecated(), names = TRUE, sparse = igraph_opt(\"sparsematrices\") )"},{"path":"https://r.igraph.org/reference/as_adj.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a graph to an adjacency matrix — as_adj","text":"graph graph convert. type Gives create adjacency matrix undirected graphs. ignored directed graphs. Possible values: upper: upper right triangle matrix used, lower: lower left triangle matrix used. : whole matrix used, symmetric matrix returned. attr Either NULL character string giving edge attribute name. NULL traditional adjacency matrix returned. NULL values given edge attribute included adjacency matrix. graph multiple edges, edge attribute arbitrarily chosen edge (multiple edges) included. argument ignored edges TRUE. Note works certain attribute types. sparse argumen TRUE, attribute must either logical numeric. sparse argument FALSE, character also allowed. reason difference Matrix package support character sparse matrices yet. edges Logical scalar, whether return edge ids matrix. non-existant edges zero returned. names Logical constant, whether assign row column names matrix. assigned name vertex attribute present graph. sparse Logical scalar, whether create sparse matrix. ‘Matrix’ package must installed creating sparse matrices.","code":""},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Adjacency lists — as_adj_list","title":"Adjacency lists — as_adj_list","text":"Create adjacency lists graph, either adjacent edges neighboring vertices","code":""},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adjacency lists — as_adj_list","text":"","code":"as_adj_list( graph, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = c(\"twice\", \"once\", \"ignore\"), multiple = TRUE ) as_adj_edge_list( graph, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = c(\"twice\", \"once\", \"ignore\") )"},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adjacency lists — as_adj_list","text":"graph input graph. mode Character scalar, gives kind adjacent edges/vertices include lists. ‘’ outgoing edges/vertices, ‘’ incoming edges/vertices, ‘’ . argument ignored undirected graphs. loops Character scalar, one \"ignore\" (omit loops), \"twice\" (include loop edges twice) \"\" (include ). \"twice\" allowed directed graphs replaced \"\". multiple Logical scalar, set FALSE use one representative set parallel edges.","code":""},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adjacency lists — as_adj_list","text":"list igraph.vs list numeric vectors depending value igraph_opt(\"return.vs.es\"), see details performance characteristics.","code":""},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Adjacency lists — as_adj_list","text":"as_adj_list() returns list numeric vectors, include ids neighbor vertices (according mode argument) vertices. as_adj_edge_list() returns list numeric vectors, include ids adjacent edges (according mode argument) vertices. igraph_opt(\"return.vs.es\") true (default), numeric vectors adjacency lists coerced igraph.vs, can expensive operation large graphs.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Adjacency lists — as_adj_list","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Adjacency lists — as_adj_list","text":"","code":"g <- make_ring(10) as_adj_list(g) #> [[1]] #> + 2/10 vertices, from 790c258: #> [1] 2 10 #> #> [[2]] #> + 2/10 vertices, from 790c258: #> [1] 1 3 #> #> [[3]] #> + 2/10 vertices, from 790c258: #> [1] 2 4 #> #> [[4]] #> + 2/10 vertices, from 790c258: #> [1] 3 5 #> #> [[5]] #> + 2/10 vertices, from 790c258: #> [1] 4 6 #> #> [[6]] #> + 2/10 vertices, from 790c258: #> [1] 5 7 #> #> [[7]] #> + 2/10 vertices, from 790c258: #> [1] 6 8 #> #> [[8]] #> + 2/10 vertices, from 790c258: #> [1] 7 9 #> #> [[9]] #> + 2/10 vertices, from 790c258: #> [1] 8 10 #> #> [[10]] #> + 2/10 vertices, from 790c258: #> [1] 1 9 #> as_adj_edge_list(g) #> [[1]] #> + 2/10 edges from 790c258: #> [1] 1-- 2 1--10 #> #> [[2]] #> + 2/10 edges from 790c258: #> [1] 1--2 2--3 #> #> [[3]] #> + 2/10 edges from 790c258: #> [1] 2--3 3--4 #> #> [[4]] #> + 2/10 edges from 790c258: #> [1] 3--4 4--5 #> #> [[5]] #> + 2/10 edges from 790c258: #> [1] 4--5 5--6 #> #> [[6]] #> + 2/10 edges from 790c258: #> [1] 5--6 6--7 #> #> [[7]] #> + 2/10 edges from 790c258: #> [1] 6--7 7--8 #> #> [[8]] #> + 2/10 edges from 790c258: #> [1] 7--8 8--9 #> #> [[9]] #> + 2/10 edges from 790c258: #> [1] 8-- 9 9--10 #> #> [[10]] #> + 2/10 edges from 790c258: #> [1] 1--10 9--10 #>"},{"path":"https://r.igraph.org/reference/as_adjacency_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a graph to an adjacency matrix — as_adjacency_matrix","title":"Convert a graph to an adjacency matrix — as_adjacency_matrix","text":"Sometimes useful work standard representation graph, like adjacency matrix.","code":""},{"path":"https://r.igraph.org/reference/as_adjacency_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a graph to an adjacency matrix — as_adjacency_matrix","text":"","code":"as_adjacency_matrix( graph, type = c(\"both\", \"upper\", \"lower\"), attr = NULL, edges = deprecated(), names = TRUE, sparse = igraph_opt(\"sparsematrices\") )"},{"path":"https://r.igraph.org/reference/as_adjacency_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a graph to an adjacency matrix — as_adjacency_matrix","text":"graph graph convert. type Gives create adjacency matrix undirected graphs. ignored directed graphs. Possible values: upper: upper right triangle matrix used, lower: lower left triangle matrix used. : whole matrix used, symmetric matrix returned. attr Either NULL character string giving edge attribute name. NULL traditional adjacency matrix returned. NULL values given edge attribute included adjacency matrix. graph multiple edges, edge attribute arbitrarily chosen edge (multiple edges) included. argument ignored edges TRUE. Note works certain attribute types. sparse argumen TRUE, attribute must either logical numeric. sparse argument FALSE, character also allowed. reason difference Matrix package support character sparse matrices yet. edges Logical scalar, whether return edge ids matrix. non-existant edges zero returned. names Logical constant, whether assign row column names matrix. assigned name vertex attribute present graph. sparse Logical scalar, whether create sparse matrix. ‘Matrix’ package must installed creating sparse matrices.","code":""},{"path":"https://r.igraph.org/reference/as_adjacency_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a graph to an adjacency matrix — as_adjacency_matrix","text":"vcount(graph) vcount(graph) (usually) numeric matrix.","code":""},{"path":"https://r.igraph.org/reference/as_adjacency_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert a graph to an adjacency matrix — as_adjacency_matrix","text":"as_adjacency_matrix() returns adjacency matrix graph, regular matrix sparse FALSE, sparse matrix, defined ‘Matrix’ package, sparse TRUE.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_adjacency_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a graph to an adjacency matrix — as_adjacency_matrix","text":"","code":"g <- sample_gnp(10, 2 / 10) as_adjacency_matrix(g) #> 10 x 10 sparse Matrix of class \"dgCMatrix\" #> #> [1,] . . . . . . . 1 1 . #> [2,] . . 1 . . . . . . . #> [3,] . 1 . . . . 1 1 . . #> [4,] . . . . . . . . . . #> [5,] . . . . . 1 . 1 . . #> [6,] . . . . 1 . 1 . . . #> [7,] . . 1 . . 1 . . . 1 #> [8,] 1 . 1 . 1 . . . . 1 #> [9,] 1 . . . . . . . . 1 #> [10,] . . . . . . 1 1 1 . V(g)$name <- letters[1:vcount(g)] as_adjacency_matrix(g) #> 10 x 10 sparse Matrix of class \"dgCMatrix\" #> [[ suppressing 10 column names ‘a’, ‘b’, ‘c’ ... ]] #> #> a . . . . . . . 1 1 . #> b . . 1 . . . . . . . #> c . 1 . . . . 1 1 . . #> d . . . . . . . . . . #> e . . . . . 1 . 1 . . #> f . . . . 1 . 1 . . . #> g . . 1 . . 1 . . . 1 #> h 1 . 1 . 1 . . . . 1 #> i 1 . . . . . . . . 1 #> j . . . . . . 1 1 1 . E(g)$weight <- runif(ecount(g)) as_adjacency_matrix(g, attr = \"weight\") #> 10 x 10 sparse Matrix of class \"dgCMatrix\" #> [[ suppressing 10 column names ‘a’, ‘b’, ‘c’ ... ]] #> #> a . . . . . . . 0.125495772 #> b . . 0.9695255 . . . . . #> c . 0.9695255 . . . . 0.14713281 0.514231354 #> d . . . . . . . . #> e . . . . . 0.00332753 . 0.003141262 #> f . . . . 0.003327530 . 0.60409122 . #> g . . 0.1471328 . . 0.60409122 . . #> h 0.1254958 . 0.5142314 . 0.003141262 . . . #> i 0.1863833 . . . . . . . #> j . . . . . . 0.02471268 0.330121691 #> #> a 0.186383283 . #> b . . #> c . . #> d . . #> e . . #> f . . #> g . 0.024712676 #> h . 0.330121691 #> i . 0.009822477 #> j 0.009822477 ."},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"function can return sparse dense bipartite adjacency matrix bipartite network. bipartite adjacency matrix \\(n\\) times \\(m\\) matrix, \\(n\\) \\(m\\) number vertices two kinds.","code":""},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"","code":"as_biadjacency_matrix( graph, types = NULL, attr = NULL, names = TRUE, sparse = FALSE )"},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"graph input graph. direction edges ignored directed graphs. types optional vertex type vector use instead type vertex attribute. must supply argument graph type vertex attribute. attr Either NULL character string giving edge attribute name. NULL, traditional bipartite adjacency matrix returned. NULL values given edge attribute included bipartite adjacency matrix. graph multiple edges, edge attribute arbitrarily chosen edge (multiple edges) included. names Logical scalar, TRUE vertices graph named (.e. graph vertex attribute called name), vertex names added result row column names. Otherwise ids vertices used row column names. sparse Logical scalar, TRUE sparse matrix created, need Matrix package .","code":""},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"sparse dense matrix.","code":""},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"Bipartite graphs type vertex attribute igraph, boolean FALSE vertices first kind TRUE vertices second kind. authors refer bipartite adjacency matrix \"bipartite incidence matrix\". igraph 1.6.0 later use naming avoid confusion edge-vertex incidence matrix.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"","code":"g <- make_bipartite_graph(c(0, 1, 0, 1, 0, 0), c(1, 2, 2, 3, 3, 4)) as_biadjacency_matrix(g) #> 2 4 #> 1 1 0 #> 3 1 1 #> 5 0 0 #> 6 0 0"},{"path":"https://r.igraph.org/reference/as_directed.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert between directed and undirected graphs — as_directed","title":"Convert between directed and undirected graphs — as_directed","text":"as_directed() converts undirected graph directed, as_undirected() opposite, converts directed graph undirected.","code":""},{"path":"https://r.igraph.org/reference/as_directed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert between directed and undirected graphs — as_directed","text":"","code":"as_directed(graph, mode = c(\"mutual\", \"arbitrary\", \"random\", \"acyclic\")) as_undirected( graph, mode = c(\"collapse\", \"each\", \"mutual\"), edge.attr.comb = igraph_opt(\"edge.attr.comb\") )"},{"path":"https://r.igraph.org/reference/as_directed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert between directed and undirected graphs — as_directed","text":"graph graph convert. mode Character constant, defines conversion algorithm. as_directed() can mutual arbitrary. as_undirected() can , collapse mutual. See details . edge.attr.comb Specifies edge attributes, mode=\"collapse\" mode=\"mutual\". cases many edges might mapped single one new graph, attributes combined. Please see attribute.combination() details .","code":""},{"path":"https://r.igraph.org/reference/as_directed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert between directed and undirected graphs — as_directed","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/as_directed.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert between directed and undirected graphs — as_directed","text":"Conversion algorithms as_directed(): \"arbitrary\" number edges graph stays , arbitrarily directed edge created undirected edge, direction edge deterministic (.e. always points way call function multiple times). \"mutual\" Two directed edges created undirected edge, one direction. \"random\" number edges graph stays , randomly directed edge created undirected edge. get different results call function multiple times graph. \"acyclic\" number edges graph stays , directed edge created undirected edge resulting graph guaranteed acyclic. achieved ensuring edges always point lower index vertex higher index. Note graph may include cycles length 1 original graph contained loop edges. Conversion algorithms as_undirected(): \"\" number edges remains constant, undirected edge created directed one, version might create graphs multiple edges. \"collapse\" One undirected edge created pair vertices connected least one directed edge, multiple edges created. \"mutual\" One undirected edge created pair mutual edges. Non-mutual edges ignored. mode might create multiple edges one mutual edge pairs pair vertices.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_directed.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert between directed and undirected graphs — as_directed","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/as_directed.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Convert between directed and undirected graphs — as_directed","text":"igraph_to_directed().","code":""},{"path":"https://r.igraph.org/reference/as_directed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert between directed and undirected graphs — as_directed","text":"","code":"g <- make_ring(10) as_directed(g, \"mutual\") #> IGRAPH c8de84d D--- 10 20 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from c8de84d: #> [1] 1-> 2 2-> 3 3-> 4 4-> 5 5-> 6 6-> 7 7-> 8 8-> 9 9->10 1->10 #> [11] 2-> 1 3-> 2 4-> 3 5-> 4 6-> 5 7-> 6 8-> 7 9-> 8 10-> 9 10-> 1 g2 <- make_star(10) as_undirected(g) #> IGRAPH d114ae8 U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from d114ae8: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 # Combining edge attributes g3 <- make_ring(10, directed = TRUE, mutual = TRUE) E(g3)$weight <- seq_len(ecount(g3)) ug3 <- as_undirected(g3) print(ug3, e = TRUE) #> IGRAPH 04b43d8 U-W- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), weight (e/n) #> + edges from 04b43d8: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 1--10 9--10 if (FALSE) { # rlang::is_interactive() x11(width = 10, height = 5) layout(rbind(1:2)) plot(g3, layout = layout_in_circle, edge.label = E(g3)$weight) plot(ug3, layout = layout_in_circle, edge.label = E(ug3)$weight) } g4 <- make_graph(c( 1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 4, 6, 7, 7, 6, 7, 8, 7, 8, 8, 7, 8, 9, 8, 9, 9, 8, 9, 8, 9, 9, 10, 10, 10, 10 )) E(g4)$weight <- seq_len(ecount(g4)) ug4 <- as_undirected(g4, mode = \"mutual\", edge.attr.comb = list(weight = length) ) print(ug4, e = TRUE) #> IGRAPH 8fba99a U-W- 10 7 -- #> + attr: weight (e/n) #> + edges from 8fba99a: #> [1] 6-- 7 7-- 8 8-- 9 8-- 9 9-- 9 10--10 10--10"},{"path":"https://r.igraph.org/reference/as_edgelist.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a graph to an edge list — as_edgelist","title":"Convert a graph to an edge list — as_edgelist","text":"Sometimes useful work standard representation graph, like edge list.","code":""},{"path":"https://r.igraph.org/reference/as_edgelist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a graph to an edge list — as_edgelist","text":"","code":"as_edgelist(graph, names = TRUE)"},{"path":"https://r.igraph.org/reference/as_edgelist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a graph to an edge list — as_edgelist","text":"graph graph convert. names Whether return character matrix containing vertex names (.e. name vertex attribute) exist numeric vertex ids.","code":""},{"path":"https://r.igraph.org/reference/as_edgelist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a graph to an edge list — as_edgelist","text":"ecount(graph) 2 numeric matrix.","code":""},{"path":"https://r.igraph.org/reference/as_edgelist.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert a graph to an edge list — as_edgelist","text":"as_edgelist() returns list edges graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_edgelist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a graph to an edge list — as_edgelist","text":"","code":"g <- sample_gnp(10, 2 / 10) as_edgelist(g) #> [,1] [,2] #> [1,] 1 6 #> [2,] 3 7 #> [3,] 3 8 #> [4,] 1 9 #> [5,] 8 9 #> [6,] 3 10 #> [7,] 6 10 #> [8,] 8 10 V(g)$name <- LETTERS[seq_len(gorder(g))] as_edgelist(g) #> [,1] [,2] #> [1,] \"A\" \"F\" #> [2,] \"C\" \"G\" #> [3,] \"C\" \"H\" #> [4,] \"A\" \"I\" #> [5,] \"H\" \"I\" #> [6,] \"C\" \"J\" #> [7,] \"F\" \"J\" #> [8,] \"H\" \"J\""},{"path":"https://r.igraph.org/reference/as_graphnel.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","title":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","text":"graphNEL class defined graph package, another way represent graphs. functions provided convert igraph graphNEL objects.","code":""},{"path":"https://r.igraph.org/reference/as_graphnel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","text":"","code":"as_graphnel(graph)"},{"path":"https://r.igraph.org/reference/as_graphnel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","text":"graph igraph graph object.","code":""},{"path":"https://r.igraph.org/reference/as_graphnel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","text":"as_graphnel() returns graphNEL graph object.","code":""},{"path":"https://r.igraph.org/reference/as_graphnel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","text":"as_graphnel() converts igraph graph graphNEL graph. converts graph/vertex/edge attributes. igraph graph vertex attribute ‘name’, used assign vertex names graphNEL graph. Otherwise numeric igraph vertex ids used purpose.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_graphnel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","text":"","code":"## Undirected g <- make_ring(10) V(g)$name <- letters[1:10] GNEL <- as_graphnel(g) g2 <- graph_from_graphnel(GNEL) g2 #> IGRAPH e4bc6dc UNW- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c), weight #> | (e/n) #> + edges from e4bc6dc (vertex names): #> [1] a--b a--j b--c c--d d--e e--f f--g g--h h--i i--j ## Directed g3 <- make_star(10, mode = \"in\") V(g3)$name <- letters[1:10] GNEL2 <- as_graphnel(g3) g4 <- graph_from_graphnel(GNEL2) g4 #> IGRAPH cc555f6 DNW- 10 9 -- In-star #> + attr: name (g/c), mode (g/c), center (g/n), name (v/c), weight (e/n) #> + edges from cc555f6 (vertex names): #> [1] b->a c->a d->a e->a f->a g->a h->a i->a j->a"},{"path":"https://r.igraph.org/reference/as_ids.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a vertex or edge sequence to an ordinary vector — as_ids","title":"Convert a vertex or edge sequence to an ordinary vector — as_ids","text":"Convert vertex edge sequence ordinary vector","code":""},{"path":"https://r.igraph.org/reference/as_ids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a vertex or edge sequence to an ordinary vector — as_ids","text":"","code":"as_ids(seq) # S3 method for class 'igraph.vs' as_ids(seq) # S3 method for class 'igraph.es' as_ids(seq)"},{"path":"https://r.igraph.org/reference/as_ids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a vertex or edge sequence to an ordinary vector — as_ids","text":"seq vertex edge sequence.","code":""},{"path":"https://r.igraph.org/reference/as_ids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a vertex or edge sequence to an ordinary vector — as_ids","text":"character numeric vector, see details .","code":""},{"path":"https://r.igraph.org/reference/as_ids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert a vertex or edge sequence to an ordinary vector — as_ids","text":"graphs without names, numeric vector returned, containing internal numeric vertex edge ids. graphs names, vertex sequences, vertex names returned character vector. graphs names edge sequences, character vector returned, ‘bar’ notation: |b means edge vertex vertex b.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_ids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a vertex or edge sequence to an ordinary vector — as_ids","text":"","code":"g <- make_ring(10) as_ids(V(g)) #> [1] 1 2 3 4 5 6 7 8 9 10 as_ids(E(g)) #> [1] 1 2 3 4 5 6 7 8 9 10 V(g)$name <- letters[1:10] as_ids(V(g)) #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" as_ids(E(g)) #> [1] \"a|b\" \"b|c\" \"c|d\" \"d|e\" \"e|f\" \"f|g\" \"g|h\" \"h|i\" \"i|j\" \"a|j\""},{"path":"https://r.igraph.org/reference/as_incidence_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"As incidence matrix — as_incidence_matrix","title":"As incidence matrix — as_incidence_matrix","text":"as_incidence_matrix() renamed as_biadjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/as_incidence_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"As incidence matrix — as_incidence_matrix","text":"","code":"as_incidence_matrix(...)"},{"path":"https://r.igraph.org/reference/as_incidence_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"As incidence matrix — as_incidence_matrix","text":"authors refer bipartite adjacency matrix \"bipartite incidence matrix\". igraph 1.6.0 later use naming avoid confusion edge-vertex incidence matrix.","code":""},{"path":"https://r.igraph.org/reference/as_long_data_frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a graph to a long data frame — as_long_data_frame","title":"Convert a graph to a long data frame — as_long_data_frame","text":"long data frame contains metadata vertices edges graph. contains one row edge, metadata edge incident vertices included row. names columns contain metadata incident vertices prefixed from_ to_. first two columns always named contain numeric ids incident vertices. rows listed order numeric vertex ids.","code":""},{"path":"https://r.igraph.org/reference/as_long_data_frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a graph to a long data frame — as_long_data_frame","text":"","code":"as_long_data_frame(graph)"},{"path":"https://r.igraph.org/reference/as_long_data_frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a graph to a long data frame — as_long_data_frame","text":"graph Input graph","code":""},{"path":"https://r.igraph.org/reference/as_long_data_frame.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a graph to a long data frame — as_long_data_frame","text":"long data frame.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_long_data_frame.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a graph to a long data frame — as_long_data_frame","text":"","code":"g <- make_( ring(10), with_vertex_(name = letters[1:10], color = \"red\"), with_edge_(weight = 1:10, color = \"green\") ) as_long_data_frame(g) #> from to weight color from_name from_color to_name to_color #> 1 1 2 1 green a red b red #> 2 2 3 2 green b red c red #> 3 3 4 3 green c red d red #> 4 4 5 4 green d red e red #> 5 5 6 5 green e red f red #> 6 6 7 6 green f red g red #> 7 7 8 7 green g red h red #> 8 8 9 8 green h red i red #> 9 9 10 9 green i red j red #> 10 1 10 10 green a red j red"},{"path":"https://r.igraph.org/reference/as_membership.html","id":null,"dir":"Reference","previous_headings":"","what":"Declare a numeric vector as a membership vector — as_membership","title":"Declare a numeric vector as a membership vector — as_membership","text":"useful want use functions defined membership vectors, membership vector come igraph clustering method.","code":""},{"path":"https://r.igraph.org/reference/as_membership.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Declare a numeric vector as a membership vector — as_membership","text":"","code":"as_membership(x)"},{"path":"https://r.igraph.org/reference/as_membership.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Declare a numeric vector as a membership vector — as_membership","text":"x input vector.","code":""},{"path":"https://r.igraph.org/reference/as_membership.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Declare a numeric vector as a membership vector — as_membership","text":"input vector, membership class added.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_membership.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Declare a numeric vector as a membership vector — as_membership","text":"","code":"## Compare to the correct clustering g <- (make_full_graph(10) + make_full_graph(10)) %>% rewire(each_edge(p = 0.2)) correct <- rep(1:2, each = 10) %>% as_membership() fc <- cluster_fast_greedy(g) compare(correct, fc) #> [1] 0 compare(correct, membership(fc)) #> [1] 0"},{"path":"https://r.igraph.org/reference/as_phylo.html","id":null,"dir":"Reference","previous_headings":"","what":"as_phylo — as_phylo","title":"as_phylo — as_phylo","text":"as_phylo methods renamed .phylo consistency R methods.","code":""},{"path":"https://r.igraph.org/reference/as_phylo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"as_phylo — as_phylo","text":"","code":"as_phylo(x, ...)"},{"path":"https://r.igraph.org/reference/as_phylo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"as_phylo — as_phylo","text":"x object coerced ... arguments passed methods.","code":""},{"path":"https://r.igraph.org/reference/assortativity.degree.html","id":null,"dir":"Reference","previous_headings":"","what":"Assortativity coefficient — assortativity.degree","title":"Assortativity coefficient — assortativity.degree","text":"assortativity.degree() renamed assortativity_degree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/assortativity.degree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assortativity coefficient — assortativity.degree","text":"","code":"assortativity.degree(graph, directed = TRUE)"},{"path":"https://r.igraph.org/reference/assortativity.degree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assortativity coefficient — assortativity.degree","text":"graph input graph, can directed undirected. directed Logical scalar, whether consider edge directions directed graphs. argument ignored undirected graphs. Supply TRUE natural thing, .e. use directed version measure directed graphs undirected version undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":null,"dir":"Reference","previous_headings":"","what":"Assortativity coefficient — assortativity","title":"Assortativity coefficient — assortativity","text":"assortativity coefficient positive similar vertices (based external property) tend connect , negative otherwise.","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assortativity coefficient — assortativity","text":"","code":"assortativity( graph, values, ..., values.in = NULL, directed = TRUE, normalized = TRUE, types1 = NULL, types2 = NULL ) assortativity_nominal(graph, types, directed = TRUE, normalized = TRUE) assortativity_degree(graph, directed = TRUE)"},{"path":"https://r.igraph.org/reference/assortativity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assortativity coefficient — assortativity","text":"graph input graph, can directed undirected. values vertex values, can arbitrary numeric values. ... dots future extensions must empty. values.second value vector use incoming edges calculating assortativity directed graph. Supply NULL want use values outgoing incoming edges. argument ignored (warning) NULL undirected assortativity coefficient calculated. directed Logical scalar, whether consider edge directions directed graphs. argument ignored undirected graphs. Supply TRUE natural thing, .e. use directed version measure directed graphs undirected version undirected graphs. normalized Boolean, whether compute normalized assortativity. non-normalized nominal assortativity identical modularity. non-normalized value-based assortativity simply covariance values two ends edges. types1, types2 Deprecated aliases values values., respectively. types Vector giving vertex types. assumed integer numbers, starting one. Non-integer values converted integers .integer().","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assortativity coefficient — assortativity","text":"single real number.","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Assortativity coefficient — assortativity","text":"assortativity coefficient measures level homophyly graph, based vertex labeling values assigned vertices. coefficient high, means connected vertices tend labels similar assigned values. M.E.J. Newman defined two kinds assortativity coefficients, first one categorical labels vertices. assortativity_nominal() calculates measure. defined $$r=\\frac{\\sum_i e_{ii}-\\sum_i a_i b_i}{1-\\sum_i a_i b_i}$$ \\(e_{ij}\\) fraction edges connecting vertices type \\(\\) \\(j\\), \\(a_i=\\sum_j e_{ij}\\) \\(b_j=\\sum_i e_{ij}\\). second assortativity variant based values assigned vertices. assortativity() calculates measure. defined $$r=\\frac1{\\sigma_q^2}\\sum_{jk} jk(e_{jk}-q_j q_k)$$ undirected graphs (\\(q_i=\\sum_j e_{ij}\\)) $$r=\\frac1{\\sigma_o\\sigma_i}\\sum_{jk}jk(e_{jk}-q_j^o q_k^)$$ directed ones. \\(q_i^o=\\sum_j e_{ij}\\), \\(q_i^=\\sum_j e_{ji}\\), moreover, \\(\\sigma_q\\), \\(\\sigma_o\\) \\(\\sigma_i\\) standard deviations \\(q\\), \\(q^o\\) \\(q^\\), respectively. reason difference directed networks relationship symmetric, possible assign different values outgoing incoming end edges. assortativity_degree() uses vertex degree vertex values calls assortativity(). Undirected graphs effectively treated directed ones -reciprocal edges. Thus, self-loops taken account twice undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Assortativity coefficient — assortativity","text":"M. E. J. Newman: Mixing patterns networks, Phys. Rev. E 67, 026126 (2003) https://arxiv.org/abs/cond-mat/0209450 M. E. J. Newman: Assortative mixing networks, Phys. Rev. Lett. 89, 208701 (2002) https://arxiv.org/abs/cond-mat/0205405","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Assortativity coefficient — assortativity","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Assortativity coefficient — assortativity","text":"igraph_assortativity(), igraph_assortativity_nominal(), igraph_assortativity_degree().","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Assortativity coefficient — assortativity","text":"","code":"# random network, close to zero assortativity_degree(sample_gnp(10000, 3 / 10000)) #> [1] -0.003901217 # BA model, tends to be dissortative assortativity_degree(sample_pa(10000, m = 4)) #> [1] -0.02572967"},{"path":"https://r.igraph.org/reference/assortativity.nominal.html","id":null,"dir":"Reference","previous_headings":"","what":"Assortativity coefficient — assortativity.nominal","title":"Assortativity coefficient — assortativity.nominal","text":"assortativity.nominal() renamed assortativity_nominal() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/assortativity.nominal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assortativity coefficient — assortativity.nominal","text":"","code":"assortativity.nominal(graph, types, directed = TRUE, normalized = TRUE)"},{"path":"https://r.igraph.org/reference/assortativity.nominal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assortativity coefficient — assortativity.nominal","text":"graph input graph, can directed undirected. types Vector giving vertex types. assumed integer numbers, starting one. Non-integer values converted integers .integer(). directed Logical scalar, whether consider edge directions directed graphs. argument ignored undirected graphs. Supply TRUE natural thing, .e. use directed version measure directed graphs undirected version undirected graphs. normalized Boolean, whether compute normalized assortativity. non-normalized nominal assortativity identical modularity. non-normalized value-based assortativity simply covariance values two ends edges.","code":""},{"path":"https://r.igraph.org/reference/asymmetric.preference.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Trait-based random generation — asymmetric.preference.game","title":"Trait-based random generation — asymmetric.preference.game","text":"asymmetric.preference.game() renamed sample_asym_pref() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/asymmetric.preference.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trait-based random generation — asymmetric.preference.game","text":"","code":"asymmetric.preference.game( nodes, types, type.dist.matrix = matrix(1, types, types), pref.matrix = matrix(1, types, types), loops = FALSE )"},{"path":"https://r.igraph.org/reference/asymmetric.preference.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trait-based random generation — asymmetric.preference.game","text":"nodes number vertices graphs. types number different vertex types. type.dist.matrix joint distribution - -vertex types. pref.matrix square matrix giving preferences vertex types. matrix ‘types’ rows columns. generating undirected graph, must symmetric. loops Logical constant, whether self-loops allowed graph.","code":""},{"path":"https://r.igraph.org/reference/authority.score.html","id":null,"dir":"Reference","previous_headings":"","what":"Kleinberg's hub and authority centrality scores. — authority.score","title":"Kleinberg's hub and authority centrality scores. — authority.score","text":"authority.score() renamed authority_score() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/authority.score.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kleinberg's hub and authority centrality scores. — authority.score","text":"","code":"authority.score( graph, scale = TRUE, weights = NULL, options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/authority.score.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kleinberg's hub and authority centrality scores. — authority.score","text":"graph input graph. scale Logical scalar, whether scale result maximum score one. scaling used result vector unit length Euclidean norm. weights Optional positive weight vector calculating weighted scores. graph weight edge attribute, used default. function interprets edge weights connection strengths. random surfer model, edge larger weight likely selected surfer. options named list, override ARPACK options. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/autocurve.edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Optimal edge curvature when plotting graphs — autocurve.edges","title":"Optimal edge curvature when plotting graphs — autocurve.edges","text":"autocurve.edges() renamed curve_multiple() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/autocurve.edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Optimal edge curvature when plotting graphs — autocurve.edges","text":"","code":"autocurve.edges(graph, start = 0.5)"},{"path":"https://r.igraph.org/reference/autocurve.edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Optimal edge curvature when plotting graphs — autocurve.edges","text":"graph input graph. start curvature two extreme edges. edges curvature -start start, spaced equally.","code":""},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":null,"dir":"Reference","previous_headings":"","what":"Generating set of the automorphism group of a graph — automorphism_group","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"Compute generating set automorphism group graph.","code":""},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"","code":"automorphism_group( graph, colors = NULL, sh = c(\"fm\", \"f\", \"fs\", \"fl\", \"flm\", \"fsm\"), details = FALSE )"},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"graph input graph, treated undirected. colors colors individual vertices graph; vertices color allowed match automorphism. omitted, igraph uses color attribute vertices, , vertex attribute, simply assumes vertices color. Pass NULL explicitly graph color vertex attribute want use . sh splitting heuristics BLISS algorithm. Possible values : ‘f’: first non-singleton cell, ‘fl’: first largest non-singleton cell, ‘fs’: first smallest non-singleton cell, ‘fm’: first maximally non-trivially connected non-singleton cell, ‘flm’: first largest maximally non-trivially connected non-singleton cell, ‘fsm’: first smallest maximally non-trivially connected non-singleton cell. details Specifies whether provide additional details BLISS internals result.","code":""},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"details FALSE, list vertex permutations form generating set automorphism group input graph. details TRUE, named list two members: generators Returns generators info Additional information BLISS internals. See count_automorphisms() details.","code":""},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"automorphism graph permutation vertices brings graph . automorphisms graph form group exists subset group (.e. set permutations) every permutation can expressed combination permutations. permutations called generating set automorphism group. function calculates possible generating set automorphism graph using BLISS algorithm. See also BLISS homepage http://www.tcs.hut.fi/Software/bliss/index.html. calculated generating set necessarily minimal, may depend splitting heuristics used BLISS.","code":""},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"Tommi Junttila Petteri Kaski: Engineering Efficient Canonical Labeling Tool Large Sparse Graphs, Proceedings Ninth Workshop Algorithm Engineering Experiments Fourth Workshop Analytic Algorithms Combinatorics. 2007.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"Tommi Junttila (http://users.ics.aalto.fi/tjunttil/) BLISS, Gabor Csardi csardi.gabor@gmail.com igraph glue code Tamas Nepusz ntamas@gmail.com manual page.","code":""},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"igraph_automorphism_group().","code":""},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"","code":"## A ring has n*2 automorphisms, and a possible generating set is one that ## \"turns\" the ring by one vertex to the left or right g <- make_ring(10) automorphism_group(g) #> [[1]] #> + 10/10 vertices, from e3b2efa: #> [1] 1 10 9 8 7 6 5 4 3 2 #> #> [[2]] #> + 10/10 vertices, from e3b2efa: #> [1] 2 3 4 5 6 7 8 9 10 1 #>"},{"path":"https://r.igraph.org/reference/automorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of automorphisms — automorphisms","title":"Number of automorphisms — automorphisms","text":"automorphisms() renamed count_automorphisms() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/automorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of automorphisms — automorphisms","text":"","code":"automorphisms( graph, colors = NULL, sh = c(\"fm\", \"f\", \"fs\", \"fl\", \"flm\", \"fsm\") )"},{"path":"https://r.igraph.org/reference/automorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of automorphisms — automorphisms","text":"graph input graph, treated undirected. colors colors individual vertices graph; vertices color allowed match automorphism. omitted, igraph uses color attribute vertices, , vertex attribute, simply assumes vertices color. Pass NULL explicitly graph color vertex attribute want use . sh splitting heuristics BLISS algorithm. Possible values : ‘f’: first non-singleton cell, ‘fl’: first largest non-singleton cell, ‘fs’: first smallest non-singleton cell, ‘fm’: first maximally non-trivially connected non-singleton cell, ‘flm’: first largest maximally non-trivially connected non-singleton cell, ‘fsm’: first smallest maximally non-trivially connected non-singleton cell.","code":""},{"path":"https://r.igraph.org/reference/average.path.length.html","id":null,"dir":"Reference","previous_headings":"","what":"Shortest (directed or undirected) paths between vertices — average.path.length","title":"Shortest (directed or undirected) paths between vertices — average.path.length","text":"average.path.length() renamed mean_distance() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/average.path.length.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shortest (directed or undirected) paths between vertices — average.path.length","text":"","code":"average.path.length( graph, weights = NULL, directed = TRUE, unconnected = TRUE, details = FALSE )"},{"path":"https://r.igraph.org/reference/average.path.length.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shortest (directed or undirected) paths between vertices — average.path.length","text":"graph graph work . weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). weighted graph, length path sum weights constituent edges. directed Whether consider directed paths directed graphs, argument ignored undirected graphs. unconnected graph unconnected (strongly connected directed paths considered). TRUE, lengths existing paths considered averaged; FALSE, length missing paths considered infinite length, making mean distance infinite well. details Whether provide additional details result. Functions accepting argument (like mean_distance()) return additional information like number disconnected vertex pairs result parameter set TRUE.","code":""},{"path":"https://r.igraph.org/reference/ba.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs using preferential attachment — ba.game","title":"Generate random graphs using preferential attachment — ba.game","text":"ba.game() renamed sample_pa() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/ba.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs using preferential attachment — ba.game","text":"","code":"ba.game( n, power = 1, m = NULL, out.dist = NULL, out.seq = NULL, out.pref = FALSE, zero.appeal = 1, directed = TRUE, algorithm = c(\"psumtree\", \"psumtree-multiple\", \"bag\"), start.graph = NULL )"},{"path":"https://r.igraph.org/reference/ba.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs using preferential attachment — ba.game","text":"n Number vertices. power power preferential attachment, default one, .e. linear preferential attachment. m Numeric constant, number edges add time step argument used .dist .seq omitted NULL. .dist Numeric vector, distribution number edges add time step. argument used .seq argument omitted NULL. .seq Numeric vector giving number edges add time step. first element ignored edges added first time step. .pref Logical, true total degree used calculating citation probability, otherwise -degree used. zero.appeal ‘attractiveness’ vertices adjacent edges. See details . directed Whether create directed graph. algorithm algorithm use graph generation. psumtree uses partial prefix-sum tree generate graph, algorithm can handle power zero.appeal values never generates multiple edges. psumtree-multiple also uses partial prefix-sum tree, generation multiple edges allowed. 0.6 version igraph used algorithm power one, zero.appeal one. bag algorithm previously (version 0.6) used power one zero.appeal one well. works putting ids vertices bag (multiset, really), exactly many times (-)degree, plus . required number cited vertices drawn bag, replacement. method might generate multiple edges. works power zero.appeal equal one. start.graph NULL igraph graph. graph, supplied graph used starting graph preferential attachment algorithm. graph least one vertex. graph supplied .seq argument NULL, contain degrees new vertices , ones start.graph.","code":""},{"path":"https://r.igraph.org/reference/barabasi.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs using preferential attachment — barabasi.game","title":"Generate random graphs using preferential attachment — barabasi.game","text":"barabasi.game() renamed sample_pa() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/barabasi.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs using preferential attachment — barabasi.game","text":"","code":"barabasi.game( n, power = 1, m = NULL, out.dist = NULL, out.seq = NULL, out.pref = FALSE, zero.appeal = 1, directed = TRUE, algorithm = c(\"psumtree\", \"psumtree-multiple\", \"bag\"), start.graph = NULL )"},{"path":"https://r.igraph.org/reference/barabasi.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs using preferential attachment — barabasi.game","text":"n Number vertices. power power preferential attachment, default one, .e. linear preferential attachment. m Numeric constant, number edges add time step argument used .dist .seq omitted NULL. .dist Numeric vector, distribution number edges add time step. argument used .seq argument omitted NULL. .seq Numeric vector giving number edges add time step. first element ignored edges added first time step. .pref Logical, true total degree used calculating citation probability, otherwise -degree used. zero.appeal ‘attractiveness’ vertices adjacent edges. See details . directed Whether create directed graph. algorithm algorithm use graph generation. psumtree uses partial prefix-sum tree generate graph, algorithm can handle power zero.appeal values never generates multiple edges. psumtree-multiple also uses partial prefix-sum tree, generation multiple edges allowed. 0.6 version igraph used algorithm power one, zero.appeal one. bag algorithm previously (version 0.6) used power one zero.appeal one well. works putting ids vertices bag (multiset, really), exactly many times (-)degree, plus . required number cited vertices drawn bag, replacement. method might generate multiple edges. works power zero.appeal equal one. start.graph NULL igraph graph. graph, supplied graph used starting graph preferential attachment algorithm. graph least one vertex. graph supplied .seq argument NULL, contain degrees new vertices , ones start.graph.","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex and edge betweenness centrality — betweenness","title":"Vertex and edge betweenness centrality — betweenness","text":"vertex edge betweenness (roughly) defined number geodesics (shortest paths) going vertex edge.","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex and edge betweenness centrality — betweenness","text":"","code":"betweenness( graph, v = V(graph), directed = TRUE, weights = NULL, normalized = FALSE, cutoff = -1 ) edge_betweenness( graph, e = E(graph), directed = TRUE, weights = NULL, cutoff = -1 )"},{"path":"https://r.igraph.org/reference/betweenness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex and edge betweenness centrality — betweenness","text":"graph graph analyze. v vertices vertex betweenness calculated. directed Logical, whether directed paths considered determining shortest paths. weights Optional positive weight vector calculating weighted betweenness. graph weight edge attribute, used default. Weights used calculate weighted shortest paths, interpreted distances. normalized Logical scalar, whether normalize betweenness scores. TRUE, results normalized number ordered unordered vertex pairs directed undirected graphs, respectively. undirected graph, $$B^n=\\frac{2B}{(n-1)(n-2)},$$ \\(B^n\\) normalized, \\(B\\) raw betweenness, \\(n\\) number vertices graph. Note normalization factor used even setting cutoff considered shortest path lengths, even though number vertex pairs reachable may less \\((n-1)(n-2)/2\\). cutoff maximum shortest path length consider calculating betweenness. negative, limit. e edges edge betweenness calculated.","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Vertex and edge betweenness centrality — betweenness","text":"numeric vector betweenness score vertex v betweenness(). numeric vector edge betweenness score edge e edge_betweenness().","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Vertex and edge betweenness centrality — betweenness","text":"vertex betweenness vertex v defined $$\\sum_{\\ne j, \\ne v, j\\ne v} g_{ivj}/g_{ij}$$ edge betweenness edge e defined $$\\sum_{\\ne j} g_{iej}/g_{ij}.$$ betweenness() calculates vertex betweenness, edge_betweenness() calculates edge betweenness. \\(g_{ij}\\) total number shortest paths vertices \\(\\) \\(j\\) \\(g_{ivj}\\) number shortest paths pass though vertex \\(v\\). functions allow consider paths length cutoff smaller; can run larger graphs, running time quadratic (cutoff small). cutoff negative (default), function calculates exact betweenness scores. Since igraph 1.6.0, cutoff value zero treated literally, .e. paths length larger zero ignored. calculating betweenness similar algorithm one proposed Brandes (see References) used.","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Vertex and edge betweenness centrality — betweenness","text":"edge_betweenness() might give false values graphs multiple edges.","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Vertex and edge betweenness centrality — betweenness","text":"Freeman, L.C. (1979). Centrality Social Networks : Conceptual Clarification. Social Networks, 1, 215-239. doi:10.1016/0378-8733(78)90021-7 Ulrik Brandes, Faster Algorithm Betweenness Centrality. Journal Mathematical Sociology 25(2):163-177, 2001. doi:10.1080/0022250X.2001.9990249","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/betweenness.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Vertex and edge betweenness centrality — betweenness","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Vertex and edge betweenness centrality — betweenness","text":"","code":"g <- sample_gnp(10, 3 / 10) betweenness(g) #> [1] 0 0 0 14 0 6 6 0 0 0 edge_betweenness(g) #> [1] 4 2 7 8 12 1 4 2 7 7"},{"path":"https://r.igraph.org/reference/bfs.html","id":null,"dir":"Reference","previous_headings":"","what":"Breadth-first search — bfs","title":"Breadth-first search — bfs","text":"Breadth-first search algorithm traverse graph. start root vertex spread along every edge “simultaneously”.","code":""},{"path":"https://r.igraph.org/reference/bfs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Breadth-first search — bfs","text":"","code":"bfs( graph, root, mode = c(\"out\", \"in\", \"all\", \"total\"), unreachable = TRUE, restricted = NULL, order = TRUE, rank = FALSE, father = FALSE, pred = FALSE, succ = FALSE, dist = FALSE, callback = NULL, extra = NULL, rho = parent.frame(), neimode = deprecated() )"},{"path":"https://r.igraph.org/reference/bfs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Breadth-first search — bfs","text":"graph input graph. root Numeric vector, usually length one. root vertex, root vertices start search . mode directed graphs specifies type edges follow. ‘’ follows outgoing, ‘’ incoming edges. ‘’ ignores edge directions completely. ‘total’ synonym ‘’. argument ignored undirected graphs. unreachable Logical scalar, whether search visit vertices unreachable given root vertex (vertices). TRUE, additional searches performed vertices visited. restricted NULL (=restriction), vector vertices (ids symbolic names). latter case, search restricted given vertices. order Logical scalar, whether return ordering vertices. rank Logical scalar, whether return rank vertices. father Logical scalar, whether return father vertices. pred Logical scalar, whether return predecessors vertices. succ Logical scalar, whether return successors vertices. dist Logical scalar, whether return distance root search tree. callback NULL, must callback function. called whenever vertex visited. See details . extra Additional argument supply callback function. rho environment callback function evaluated. neimode argument deprecated igraph 1.3.0; use mode instead.","code":""},{"path":"https://r.igraph.org/reference/bfs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Breadth-first search — bfs","text":"named list following entries: root Numeric scalar. root vertex used starting point search. neimode Character scalar. mode argument function call. Note undirected graphs always ‘’, irrespectively supplied value. order Numeric vector. vertex ids, order visited search. rank Numeric vector. rank vertex, zero unreachable vertices. father Numeric vector. father vertex, .e. vertex discovered . pred Numeric vector. previously visited vertex vertex, 0 vertex. succ Numeric vector. next vertex visited current one, 0 vertex. dist Numeric vector, vertex distance root search tree. Unreachable vertices negative distance igraph 1.6.0, used NaN. Note order, rank, father, pred, succ dist might NULL corresponding argument FALSE, .e. calculation requested.","code":""},{"path":"https://r.igraph.org/reference/bfs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Breadth-first search — bfs","text":"callback function must following arguments: graph input graph passed callback function . data named numeric vector, following entries: ‘vid’, vertex just visited, ‘pred’, predecessor (zero first vertex), ‘succ’, successor (zero last vertex), ‘rank’, rank current vertex, ‘dist’, distance root search tree. extra extra argument. callback must return FALSE continue search TRUE terminate . See examples use callback function.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/bfs.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Breadth-first search — bfs","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/bfs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Breadth-first search — bfs","text":"","code":"## Two rings bfs(make_ring(10) %du% make_ring(10), root = 1, \"out\", order = TRUE, rank = TRUE, father = TRUE, pred = TRUE, succ = TRUE, dist = TRUE ) #> $root #> [1] 1 #> #> $mode #> [1] \"out\" #> #> $order #> + 20/20 vertices, from b3900f6: #> [1] 1 2 10 3 9 4 8 5 7 6 11 12 20 13 19 14 18 15 17 16 #> #> $rank #> [1] 1 2 4 6 8 10 9 7 5 3 11 12 14 16 18 20 19 17 15 13 #> #> $father #> + 20/20 vertices, from b3900f6: #> [1] NA 1 2 3 4 5 8 9 10 1 NA 11 12 13 14 15 18 19 20 11 #> #> $pred #> + 20/20 vertices, from b3900f6: #> [1] NA 1 10 9 8 7 5 4 3 2 NA 11 20 19 18 17 15 14 13 12 #> #> $succ #> + 20/20 vertices, from b3900f6: #> [1] 2 10 9 8 7 NA 6 5 4 3 12 20 19 18 17 NA 16 15 14 13 #> #> $dist #> [1] 0 1 2 3 4 5 4 3 2 1 0 1 2 3 4 5 4 3 2 1 #> #> $neimode #> [1] \"out\" #> ## How to use a callback f <- function(graph, data, extra) { print(data) FALSE } tmp <- bfs(make_ring(10) %du% make_ring(10), root = 1, \"out\", callback = f ) #> vid pred succ rank dist #> 1 0 2 1 0 #> vid pred succ rank dist #> 2 1 10 2 1 #> vid pred succ rank dist #> 10 2 3 3 1 #> vid pred succ rank dist #> 3 10 9 4 2 #> vid pred succ rank dist #> 9 3 4 5 2 #> vid pred succ rank dist #> 4 9 8 6 3 #> vid pred succ rank dist #> 8 4 5 7 3 #> vid pred succ rank dist #> 5 8 7 8 4 #> vid pred succ rank dist #> 7 5 6 9 4 #> vid pred succ rank dist #> 6 7 0 10 5 #> vid pred succ rank dist #> 11 0 12 11 0 #> vid pred succ rank dist #> 12 11 20 12 1 #> vid pred succ rank dist #> 20 12 13 13 1 #> vid pred succ rank dist #> 13 20 19 14 2 #> vid pred succ rank dist #> 19 13 14 15 2 #> vid pred succ rank dist #> 14 19 18 16 3 #> vid pred succ rank dist #> 18 14 15 17 3 #> vid pred succ rank dist #> 15 18 17 18 4 #> vid pred succ rank dist #> 17 15 16 19 4 #> vid pred succ rank dist #> 16 17 0 20 5 ## How to use a callback to stop the search ## We stop after visiting all vertices in the initial component f <- function(graph, data, extra) { data[\"succ\"] == -1 } bfs(make_ring(10) %du% make_ring(10), root = 1, callback = f) #> $root #> [1] 1 #> #> $mode #> [1] \"out\" #> #> $order #> + 20/20 vertices, from 90ed5d3: #> [1] 1 2 10 3 9 4 8 5 7 6 11 12 20 13 19 14 18 15 17 16 #> #> $rank #> NULL #> #> $father #> NULL #> #> $pred #> NULL #> #> $succ #> NULL #> #> $dist #> NULL #> #> $neimode #> [1] \"out\" #>"},{"path":"https://r.igraph.org/reference/biconnected.components.html","id":null,"dir":"Reference","previous_headings":"","what":"Biconnected components — biconnected.components","title":"Biconnected components — biconnected.components","text":"biconnected.components() renamed biconnected_components() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/biconnected.components.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Biconnected components — biconnected.components","text":"","code":"biconnected.components(graph)"},{"path":"https://r.igraph.org/reference/biconnected.components.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Biconnected components — biconnected.components","text":"graph input graph. treated undirected graph, even directed.","code":""},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":null,"dir":"Reference","previous_headings":"","what":"Biconnected components — biconnected_components","title":"Biconnected components — biconnected_components","text":"Finding biconnected components graph","code":""},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Biconnected components — biconnected_components","text":"","code":"biconnected_components(graph)"},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Biconnected components — biconnected_components","text":"graph input graph. treated undirected graph, even directed.","code":""},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Biconnected components — biconnected_components","text":"named list three components: Numeric scalar, integer giving number biconnected components graph. tree_edges components , list numeric vectors. vector set edge ids giving edges biconnected component. edges define spanning tree component. component_edges list numeric vectors. gives edges components. components list numeric vectors, vertices components. articulation_points articulation points graph. See articulation_points().","code":""},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Biconnected components — biconnected_components","text":"graph biconnected removal single vertex (adjacent edges) disconnect . biconnected component graph maximal biconnected subgraph . biconnected components graph can given partition edges: every edge member exactly one biconnected component. Note true vertices: vertex can part many biconnected components.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Biconnected components — biconnected_components","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Biconnected components — biconnected_components","text":"igraph_biconnected_components().","code":""},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Biconnected components — biconnected_components","text":"","code":"g <- disjoint_union(make_full_graph(5), make_full_graph(5)) clu <- components(g)$membership g <- add_edges(g, c(which(clu == 1), which(clu == 2))) bc <- biconnected_components(g)"},{"path":"https://r.igraph.org/reference/bipartite.mapping.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide whether a graph is bipartite — bipartite.mapping","title":"Decide whether a graph is bipartite — bipartite.mapping","text":"bipartite.mapping() renamed bipartite_mapping() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/bipartite.mapping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide whether a graph is bipartite — bipartite.mapping","text":"","code":"bipartite.mapping(graph)"},{"path":"https://r.igraph.org/reference/bipartite.mapping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide whether a graph is bipartite — bipartite.mapping","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/bipartite.projection.html","id":null,"dir":"Reference","previous_headings":"","what":"Project a bipartite graph — bipartite.projection","title":"Project a bipartite graph — bipartite.projection","text":"bipartite.projection() renamed bipartite_projection() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/bipartite.projection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Project a bipartite graph — bipartite.projection","text":"","code":"bipartite.projection( graph, types = NULL, multiplicity = TRUE, probe1 = NULL, which = c(\"both\", \"true\", \"false\"), remove.type = TRUE )"},{"path":"https://r.igraph.org/reference/bipartite.projection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Project a bipartite graph — bipartite.projection","text":"graph input graph. can directed, edge directions ignored computation. types optional vertex type vector use instead ‘type’ vertex attribute. must supply argument graph ‘type’ vertex attribute. multiplicity TRUE, igraph keeps multiplicity edges edge attribute called ‘weight’. E.g. -C-B also -D-B triple bipartite graph (X, -X-B also graph), multiplicity -B edge projection 2. probe1 argument can used specify order projections resulting list. given, considered vertex id (symbolic vertex name); projection containing vertex first one result list. argument ignored one projection requested argument . character scalar specify projection(s) calculate. default calculate . remove.type Logical scalar, whether remove type vertex attribute projections. makes sense graphs bipartite . However want combine (bipartite graphs), worth keeping attribute. default removed.","code":""},{"path":"https://r.igraph.org/reference/bipartite.projection.size.html","id":null,"dir":"Reference","previous_headings":"","what":"Project a bipartite graph — bipartite.projection.size","title":"Project a bipartite graph — bipartite.projection.size","text":"bipartite.projection.size() renamed bipartite_projection_size() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/bipartite.projection.size.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Project a bipartite graph — bipartite.projection.size","text":"","code":"bipartite.projection.size(graph, types = NULL)"},{"path":"https://r.igraph.org/reference/bipartite.projection.size.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Project a bipartite graph — bipartite.projection.size","text":"graph input graph. can directed, edge directions ignored computation. types optional vertex type vector use instead ‘type’ vertex attribute. must supply argument graph ‘type’ vertex attribute.","code":""},{"path":"https://r.igraph.org/reference/bipartite.random.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Bipartite random graphs — bipartite.random.game","title":"Bipartite random graphs — bipartite.random.game","text":"bipartite.random.game() renamed sample_bipartite() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/bipartite.random.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bipartite random graphs — bipartite.random.game","text":"","code":"bipartite.random.game( n1, n2, type = c(\"gnp\", \"gnm\"), p, m, directed = FALSE, mode = c(\"out\", \"in\", \"all\") )"},{"path":"https://r.igraph.org/reference/bipartite.random.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bipartite random graphs — bipartite.random.game","text":"n1 Integer scalar, number bottom vertices. n2 Integer scalar, number top vertices. type Character scalar, type graph, ‘gnp’ creates \\(G(n,p)\\) graph, ‘gnm’ creates \\(G(n,m)\\) graph. See details . p Real scalar, connection probability \\(G(n,p)\\) graphs. given \\(G(n,m)\\) graphs. m Integer scalar, number edges \\(G(n,m)\\) graphs. given \\(G(n,p)\\) graphs. directed Logical scalar, whether create directed graph. See also mode argument. mode Character scalar, specifies direct edges directed graphs. ‘’, directed edges point bottom vertices top vertices. ‘’, edges point top vertices bottom vertices. ‘’ ‘’ generate mutual edges. argument ‘’, edge direction considered independently mutual edges might generated. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide whether a graph is bipartite — bipartite_mapping","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"function decides whether vertices network can mapped two vertex types way vertices type connected.","code":""},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"","code":"bipartite_mapping(graph)"},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"named list two elements: res logical scalar, TRUE can bipartite, FALSE otherwise. type possible vertex type mapping, logical vector. mapping exists, empty vector.","code":""},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"bipartite graph igraph ‘type’ vertex attribute giving two vertex types. function simply checks whether graph bipartite. tries find mapping gives possible division vertices two classes, two vertices class connected edge. existence mapping equivalent circuits odd length graph. graph loop edges bipartite. Note mapping necessarily unique, e.g. graph least two components, vertices separate components can mapped independently.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"igraph_is_bipartite().","code":""},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"","code":"## Rings with an even number of vertices are bipartite g <- make_ring(10) bipartite_mapping(g) #> $res #> [1] TRUE #> #> $type #> [1] FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE #> ## All star graphs are bipartite g2 <- make_star(10) bipartite_mapping(g2) #> $res #> [1] TRUE #> #> $type #> [1] FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> ## A graph containing a triangle is not bipartite g3 <- make_ring(10) g3 <- add_edges(g3, c(1, 3)) bipartite_mapping(g3) #> $res #> [1] FALSE #> #> $type #> logical(0) #>"},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":null,"dir":"Reference","previous_headings":"","what":"Project a bipartite graph — bipartite_projection","title":"Project a bipartite graph — bipartite_projection","text":"bipartite graph projected two one-mode networks","code":""},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Project a bipartite graph — bipartite_projection","text":"","code":"bipartite_projection( graph, types = NULL, multiplicity = TRUE, probe1 = NULL, which = c(\"both\", \"true\", \"false\"), remove.type = TRUE ) bipartite_projection_size(graph, types = NULL)"},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Project a bipartite graph — bipartite_projection","text":"graph input graph. can directed, edge directions ignored computation. types optional vertex type vector use instead ‘type’ vertex attribute. must supply argument graph ‘type’ vertex attribute. multiplicity TRUE, igraph keeps multiplicity edges edge attribute called ‘weight’. E.g. -C-B also -D-B triple bipartite graph (X, -X-B also graph), multiplicity -B edge projection 2. probe1 argument can used specify order projections resulting list. given, considered vertex id (symbolic vertex name); projection containing vertex first one result list. argument ignored one projection requested argument . character scalar specify projection(s) calculate. default calculate . remove.type Logical scalar, whether remove type vertex attribute projections. makes sense graphs bipartite . However want combine (bipartite graphs), worth keeping attribute. default removed.","code":""},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Project a bipartite graph — bipartite_projection","text":"list two undirected graphs. See details .","code":""},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Project a bipartite graph — bipartite_projection","text":"Bipartite graphs type vertex attribute igraph, boolean FALSE vertices first kind TRUE vertices second kind. bipartite_projection_size() calculates number vertices edges two projections bipartite graphs, without calculating projections . useful check much memory projections need large bipartite graph. bipartite_projection() calculates actual projections. can use probe1 argument specify order projections result. default vertex type FALSE first TRUE second. bipartite_projection() keeps vertex attributes.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Project a bipartite graph — bipartite_projection","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Project a bipartite graph — bipartite_projection","text":"igraph_bipartite_projection_size().","code":""},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Project a bipartite graph — bipartite_projection","text":"","code":"## Projection of a full bipartite graph is a full graph g <- make_full_bipartite_graph(10, 5) proj <- bipartite_projection(g) graph.isomorphic(proj[[1]], make_full_graph(10)) #> [1] TRUE graph.isomorphic(proj[[2]], make_full_graph(5)) #> [1] TRUE ## The projection keeps the vertex attributes M <- matrix(0, nrow = 5, ncol = 3) rownames(M) <- c(\"Alice\", \"Bob\", \"Cecil\", \"Dan\", \"Ethel\") colnames(M) <- c(\"Party\", \"Skiing\", \"Badminton\") M[] <- sample(0:1, length(M), replace = TRUE) M #> Party Skiing Badminton #> Alice 1 1 0 #> Bob 0 1 0 #> Cecil 0 1 0 #> Dan 0 1 1 #> Ethel 0 0 0 g2 <- graph_from_biadjacency_matrix(M) g2$name <- \"Event network\" proj2 <- bipartite_projection(g2) print(proj2[[1]], g = TRUE, e = TRUE) #> IGRAPH 0dd9c66 UNW- 5 6 -- Event network #> + attr: name (g/c), name (v/c), weight (e/n) #> + edges from 0dd9c66 (vertex names): #> [1] Alice--Bob Alice--Cecil Alice--Dan Bob --Cecil Bob --Dan #> [6] Cecil--Dan print(proj2[[2]], g = TRUE, e = TRUE) #> IGRAPH e7de78b UNW- 3 2 -- Event network #> + attr: name (g/c), name (v/c), weight (e/n) #> + edges from e7de78b (vertex names): #> [1] Party --Skiing Skiing--Badminton"},{"path":"https://r.igraph.org/reference/blockGraphs.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Cohesive Blocks — blockGraphs","title":"Calculate Cohesive Blocks — blockGraphs","text":"blockGraphs() renamed graphs_from_cohesive_blocks() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/blockGraphs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Cohesive Blocks — blockGraphs","text":"","code":"blockGraphs(blocks, graph)"},{"path":"https://r.igraph.org/reference/blockGraphs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Cohesive Blocks — blockGraphs","text":"graph cohesive_blocks() graph object class igraph. must undirected simple. (See is_simple().) graphs_from_cohesive_blocks() export_pajek() graph must supplied whose cohesive block structure given blocks() argument.","code":""},{"path":"https://r.igraph.org/reference/bonpow.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Bonacich Power Centrality Scores of Network Positions — bonpow","title":"Find Bonacich Power Centrality Scores of Network Positions — bonpow","text":"bonpow() renamed power_centrality() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/bonpow.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Bonacich Power Centrality Scores of Network Positions — bonpow","text":"","code":"bonpow( graph, nodes = V(graph), loops = FALSE, exponent = 1, rescale = FALSE, tol = 1e-07, sparse = TRUE )"},{"path":"https://r.igraph.org/reference/bonpow.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Bonacich Power Centrality Scores of Network Positions — bonpow","text":"graph input graph. nodes vertex sequence indicating vertices included calculation. default, vertices included. loops boolean indicating whether diagonal treated valid data. Set true data can contain loops. loops FALSE default. exponent exponent (decay rate) Bonacich power centrality score; can negative rescale true, centrality scores rescaled sum 1. tol tolerance near-singularities matrix inversion (see solve()) sparse Logical scalar, whether use sparse matrices calculation. ‘Matrix’ package required sparse matrix support","code":""},{"path":"https://r.igraph.org/reference/c.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate edge sequences — c.igraph.es","title":"Concatenate edge sequences — c.igraph.es","text":"Concatenate edge sequences","code":""},{"path":"https://r.igraph.org/reference/c.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate edge sequences — c.igraph.es","text":"","code":"# S3 method for class 'igraph.es' c(..., recursive = FALSE)"},{"path":"https://r.igraph.org/reference/c.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate edge sequences — c.igraph.es","text":"... edge sequences concatenate. must refer graph. recursive Ignored, included S3 compatibility base c function.","code":""},{"path":"https://r.igraph.org/reference/c.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate edge sequences — c.igraph.es","text":"edge sequence, input sequences concatenated.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/c.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Concatenate edge sequences — c.igraph.es","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) c(E(g)[1], E(g)[\"A|B\"], E(g)[1:4]) #> + 6/10 edges from 0aec377 (vertex names): #> [1] A--B A--B A--B B--C C--D D--E"},{"path":"https://r.igraph.org/reference/c.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate vertex sequences — c.igraph.vs","title":"Concatenate vertex sequences — c.igraph.vs","text":"Concatenate vertex sequences","code":""},{"path":"https://r.igraph.org/reference/c.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate vertex sequences — c.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' c(..., recursive = FALSE)"},{"path":"https://r.igraph.org/reference/c.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate vertex sequences — c.igraph.vs","text":"... vertex sequences concatenate. must refer graph. recursive Ignored, included S3 compatibility base c function.","code":""},{"path":"https://r.igraph.org/reference/c.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate vertex sequences — c.igraph.vs","text":"vertex sequence, input sequences concatenated.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/c.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Concatenate vertex sequences — c.igraph.vs","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) c(V(g)[1], V(g)[\"A\"], V(g)[1:4]) #> + 6/10 vertices, named, from 17741ec: #> [1] A A A B C D"},{"path":"https://r.igraph.org/reference/callaway.traits.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph generation based on different vertex types — callaway.traits.game","title":"Graph generation based on different vertex types — callaway.traits.game","text":"callaway.traits.game() renamed sample_traits_callaway() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/callaway.traits.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph generation based on different vertex types — callaway.traits.game","text":"","code":"callaway.traits.game( nodes, types, edge.per.step = 1, type.dist = rep(1, types), pref.matrix = matrix(1, types, types), directed = FALSE )"},{"path":"https://r.igraph.org/reference/callaway.traits.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph generation based on different vertex types — callaway.traits.game","text":"nodes number vertices graph. types number different vertex types. edge.per.step number edges add graph per time step. type.dist distribution vertex types. assumed stationary time. pref.matrix matrix giving preferences given vertex types. probabilities, .e. numbers zero one. directed Logical constant, whether generate directed graphs.","code":""},{"path":"https://r.igraph.org/reference/canonical.permutation.html","id":null,"dir":"Reference","previous_headings":"","what":"Canonical permutation of a graph — canonical.permutation","title":"Canonical permutation of a graph — canonical.permutation","text":"canonical.permutation() renamed canonical_permutation() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/canonical.permutation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Canonical permutation of a graph — canonical.permutation","text":"","code":"canonical.permutation( graph, colors = NULL, sh = c(\"fm\", \"f\", \"fs\", \"fl\", \"flm\", \"fsm\") )"},{"path":"https://r.igraph.org/reference/canonical.permutation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Canonical permutation of a graph — canonical.permutation","text":"graph input graph, treated undirected. colors colors individual vertices graph; vertices color allowed match automorphism. omitted, igraph uses color attribute vertices, , vertex attribute, simply assumes vertices color. Pass NULL explicitly graph color vertex attribute want use . sh Type heuristics use BLISS algorithm. See details possible values.","code":""},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":null,"dir":"Reference","previous_headings":"","what":"Canonical permutation of a graph — canonical_permutation","title":"Canonical permutation of a graph — canonical_permutation","text":"canonical permutation brings every isomorphic graphs (labeled) graph.","code":""},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Canonical permutation of a graph — canonical_permutation","text":"","code":"canonical_permutation( graph, colors = NULL, sh = c(\"fm\", \"f\", \"fs\", \"fl\", \"flm\", \"fsm\") )"},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Canonical permutation of a graph — canonical_permutation","text":"graph input graph, treated undirected. colors colors individual vertices graph; vertices color allowed match automorphism. omitted, igraph uses color attribute vertices, , vertex attribute, simply assumes vertices color. Pass NULL explicitly graph color vertex attribute want use . sh Type heuristics use BLISS algorithm. See details possible values.","code":""},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Canonical permutation of a graph — canonical_permutation","text":"list following members: labeling canonical permutation takes input graph canonical form. numeric vector, first element new label vertex 0, second element vertex 1, etc. info information BLISS computation. named list following members: \"nof_nodes\" number nodes search tree. \"nof_leaf_nodes\" number leaf nodes search tree. \"nof_bad_nodes\" Number bad nodes. \"nof_canupdates\" Number canrep updates. \"max_level\" Maximum level. \"group_size\" size automorphism group input graph, string. string representation necessary group size can easily exceed values exactly representable floating point.","code":""},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Canonical permutation of a graph — canonical_permutation","text":"canonical_permutation() computes permutation brings graph canonical form, defined BLISS algorithm. isomorphic graphs canonical form. See paper details BLISS. information available http://www.tcs.hut.fi/Software/bliss/index.html. possible values sh argument : \"f\" First non-singleton cell. \"fl\" First largest non-singleton cell. \"fs\" First smallest non-singleton cell. \"fm\" First maximally non-trivially connectec non-singleton cell. \"flm\" Largest maximally non-trivially connected non-singleton cell. \"fsm\" Smallest maximally non-trivially connected non-singleton cell. See paper references details .","code":""},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Canonical permutation of a graph — canonical_permutation","text":"Tommi Junttila Petteri Kaski: Engineering Efficient Canonical Labeling Tool Large Sparse Graphs, Proceedings Ninth Workshop Algorithm Engineering Experiments Fourth Workshop Analytic Algorithms Combinatorics. 2007.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Canonical permutation of a graph — canonical_permutation","text":"Tommi Junttila BLISS, Gabor Csardi csardi.gabor@gmail.com igraph R interfaces.","code":""},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Canonical permutation of a graph — canonical_permutation","text":"igraph_canonical_permutation().","code":""},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Canonical permutation of a graph — canonical_permutation","text":"","code":"## Calculate the canonical form of a random graph g1 <- sample_gnm(10, 20) cp1 <- canonical_permutation(g1) cf1 <- permute(g1, cp1$labeling) ## Do the same with a random permutation of it g2 <- permute(g1, sample(vcount(g1))) cp2 <- canonical_permutation(g2) cf2 <- permute(g2, cp2$labeling) ## Check that they are the same el1 <- as_edgelist(cf1) el2 <- as_edgelist(cf2) el1 <- el1[order(el1[, 1], el1[, 2]), ] el2 <- el2[order(el2[, 1], el2[, 2]), ] all(el1 == el2) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/categorical_pal.html","id":null,"dir":"Reference","previous_headings":"","what":"Palette for categories — categorical_pal","title":"Palette for categories — categorical_pal","text":"color blind friendly palette https://jfly.uni-koeln.de/color/. 8 colors.","code":""},{"path":"https://r.igraph.org/reference/categorical_pal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Palette for categories — categorical_pal","text":"","code":"categorical_pal(n)"},{"path":"https://r.igraph.org/reference/categorical_pal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Palette for categories — categorical_pal","text":"n number colors palette. simply take first n colors total 8.","code":""},{"path":"https://r.igraph.org/reference/categorical_pal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Palette for categories — categorical_pal","text":"character vector RGB color codes.","code":""},{"path":"https://r.igraph.org/reference/categorical_pal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Palette for categories — categorical_pal","text":"suggested palette visualizations vertex colors mark categories, e.g. community membership.","code":""},{"path":"https://r.igraph.org/reference/categorical_pal.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Palette for categories — categorical_pal","text":"","code":"library(igraphdata) data(karate) karate <- karate add_layout_(with_fr()) set_vertex_attr(\"size\", value = 10) cl_k <- cluster_optimal(karate) V(karate)$color <- membership(cl_k) karate$palette <- categorical_pal(length(cl_k)) plot(karate)"},{"path":[]},{"path":"https://r.igraph.org/reference/centr_betw.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the betweenness of vertices — centr_betw","title":"Centralize a graph according to the betweenness of vertices — centr_betw","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_betw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the betweenness of vertices — centr_betw","text":"","code":"centr_betw(graph, directed = TRUE, normalized = TRUE)"},{"path":"https://r.igraph.org/reference/centr_betw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the betweenness of vertices — centr_betw","text":"graph input graph. directed logical scalar, whether use directed shortest paths calculating betweenness. normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centr_betw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Centralize a graph according to the betweenness of vertices — centr_betw","text":"named list following components: res node-level centrality scores. centralization graph level centrality index. theoretical_max maximum theoretical graph level centralization score graph given number vertices, using parameters. normalized argument TRUE, result divided number.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_betw.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Centralize a graph according to the betweenness of vertices — centr_betw","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_degree(g)$centralization #> [1] 0.1618335 centr_clo(g, mode = \"all\")$centralization #> [1] 0.437051 centr_betw(g, directed = FALSE)$centralization #> [1] 0.2764392 centr_eigen(g, directed = FALSE)$centralization #> [1] 0.9486925"},{"path":"https://r.igraph.org/reference/centr_betw_tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for betweenness centralization — centr_betw_tmax","title":"Theoretical maximum for betweenness centralization — centr_betw_tmax","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_betw_tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for betweenness centralization — centr_betw_tmax","text":"","code":"centr_betw_tmax(graph = NULL, nodes = 0, directed = TRUE)"},{"path":"https://r.igraph.org/reference/centr_betw_tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for betweenness centralization — centr_betw_tmax","text":"graph input graph. can also NULL nodes directed given. nodes number vertices. ignored graph given. directed Logical scalar, whether use directed shortest paths calculating betweenness. Ignored undirected graph given.","code":""},{"path":"https://r.igraph.org/reference/centr_betw_tmax.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Theoretical maximum for betweenness centralization — centr_betw_tmax","text":"Real scalar, theoretical maximum (unnormalized) graph betweenness centrality score graphs given order parameters.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_betw_tmax.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Theoretical maximum for betweenness centralization — centr_betw_tmax","text":"igraph_centralization_betweenness_tmax().","code":""},{"path":"https://r.igraph.org/reference/centr_betw_tmax.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Theoretical maximum for betweenness centralization — centr_betw_tmax","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_betw(g, normalized = FALSE)$centralization %>% `/`(centr_betw_tmax(g)) #> [1] 0.0005692495 centr_betw(g, normalized = TRUE)$centralization #> [1] 0.0005692495"},{"path":"https://r.igraph.org/reference/centr_clo.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the closeness of vertices — centr_clo","title":"Centralize a graph according to the closeness of vertices — centr_clo","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_clo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the closeness of vertices — centr_clo","text":"","code":"centr_clo(graph, mode = c(\"out\", \"in\", \"all\", \"total\"), normalized = TRUE)"},{"path":"https://r.igraph.org/reference/centr_clo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the closeness of vertices — centr_clo","text":"graph input graph. mode mode argument closeness(). normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centr_clo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Centralize a graph according to the closeness of vertices — centr_clo","text":"named list following components: res node-level centrality scores. centralization graph level centrality index. theoretical_max maximum theoretical graph level centralization score graph given number vertices, using parameters. normalized argument TRUE, result divided number.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_clo.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Centralize a graph according to the closeness of vertices — centr_clo","text":"igraph_centralization_closeness().","code":""},{"path":"https://r.igraph.org/reference/centr_clo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Centralize a graph according to the closeness of vertices — centr_clo","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_degree(g)$centralization #> [1] 0.1518135 centr_clo(g, mode = \"all\")$centralization #> [1] 0.413991 centr_betw(g, directed = FALSE)$centralization #> [1] 0.2305906 centr_eigen(g, directed = FALSE)$centralization #> [1] 0.943837"},{"path":"https://r.igraph.org/reference/centr_clo_tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for closeness centralization — centr_clo_tmax","title":"Theoretical maximum for closeness centralization — centr_clo_tmax","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_clo_tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for closeness centralization — centr_clo_tmax","text":"","code":"centr_clo_tmax(graph = NULL, nodes = 0, mode = c(\"out\", \"in\", \"all\", \"total\"))"},{"path":"https://r.igraph.org/reference/centr_clo_tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for closeness centralization — centr_clo_tmax","text":"graph input graph. can also NULL nodes given. nodes number vertices. ignored graph given. mode mode argument closeness(). Ignored undirected graph given.","code":""},{"path":"https://r.igraph.org/reference/centr_clo_tmax.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Theoretical maximum for closeness centralization — centr_clo_tmax","text":"Real scalar, theoretical maximum (unnormalized) graph closeness centrality score graphs given order parameters.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_clo_tmax.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Theoretical maximum for closeness centralization — centr_clo_tmax","text":"igraph_centralization_closeness_tmax().","code":""},{"path":"https://r.igraph.org/reference/centr_clo_tmax.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Theoretical maximum for closeness centralization — centr_clo_tmax","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_clo(g, normalized = FALSE)$centralization %>% `/`(centr_clo_tmax(g)) #> [1] NaN centr_clo(g, normalized = TRUE)$centralization #> [1] NaN"},{"path":"https://r.igraph.org/reference/centr_degree.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the degrees of vertices — centr_degree","title":"Centralize a graph according to the degrees of vertices — centr_degree","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_degree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the degrees of vertices — centr_degree","text":"","code":"centr_degree( graph, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = TRUE, normalized = TRUE )"},{"path":"https://r.igraph.org/reference/centr_degree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the degrees of vertices — centr_degree","text":"graph input graph. mode mode argument degree(). loops Logical scalar, whether consider loops edges calculating degree. normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centr_degree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Centralize a graph according to the degrees of vertices — centr_degree","text":"named list following components: res node-level centrality scores. centralization graph level centrality index. theoretical_max maximum theoretical graph level centralization score graph given number vertices, using parameters. normalized argument TRUE, result divided number.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_degree.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Centralize a graph according to the degrees of vertices — centr_degree","text":"igraph_centralization_degree().","code":""},{"path":"https://r.igraph.org/reference/centr_degree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Centralize a graph according to the degrees of vertices — centr_degree","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_degree(g)$centralization #> [1] 0.1638375 centr_clo(g, mode = \"all\")$centralization #> [1] 0.4236249 centr_betw(g, directed = FALSE)$centralization #> [1] 0.2452183 centr_eigen(g, directed = FALSE)$centralization #> [1] 0.941744"},{"path":"https://r.igraph.org/reference/centr_degree_tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for degree centralization — centr_degree_tmax","title":"Theoretical maximum for degree centralization — centr_degree_tmax","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_degree_tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for degree centralization — centr_degree_tmax","text":"","code":"centr_degree_tmax( graph = NULL, nodes = 0, mode = c(\"all\", \"out\", \"in\", \"total\"), loops )"},{"path":"https://r.igraph.org/reference/centr_degree_tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for degree centralization — centr_degree_tmax","text":"graph input graph. can also NULL nodes given. nodes number vertices. ignored graph given. mode mode argument degree(). Ignored graph given graph undirected. loops Logical scalar, whether consider loops edges calculating degree.","code":""},{"path":"https://r.igraph.org/reference/centr_degree_tmax.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Theoretical maximum for degree centralization — centr_degree_tmax","text":"Real scalar, theoretical maximum (unnormalized) graph degree centrality score graphs given order parameters.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_degree_tmax.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Theoretical maximum for degree centralization — centr_degree_tmax","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_degree(g, normalized = FALSE)$centralization %>% `/`(centr_degree_tmax(g, loops = FALSE)) #> [1] 0.1599896 centr_degree(g, normalized = TRUE)$centralization #> [1] 0.1598295"},{"path":"https://r.igraph.org/reference/centr_eigen.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the eigenvector centrality of vertices — centr_eigen","title":"Centralize a graph according to the eigenvector centrality of vertices — centr_eigen","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_eigen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the eigenvector centrality of vertices — centr_eigen","text":"","code":"centr_eigen( graph, directed = FALSE, scale = TRUE, options = arpack_defaults(), normalized = TRUE )"},{"path":"https://r.igraph.org/reference/centr_eigen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the eigenvector centrality of vertices — centr_eigen","text":"graph input graph. directed logical scalar, whether use directed shortest paths calculating eigenvector centrality. scale Whether rescale eigenvector centrality scores, maximum score one. options passed eigen_centrality(), options ARPACK eigensolver. normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centr_eigen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Centralize a graph according to the eigenvector centrality of vertices — centr_eigen","text":"named list following components: vector node-level centrality scores. value corresponding eigenvalue. options ARPACK options, see return value eigen_centrality() details. centralization graph level centrality index. theoretical_max , theoretical maximum centralization score graph number vertices.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_eigen.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Centralize a graph according to the eigenvector centrality of vertices — centr_eigen","text":"igraph_centralization_eigenvector_centrality().","code":""},{"path":"https://r.igraph.org/reference/centr_eigen.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Centralize a graph according to the eigenvector centrality of vertices — centr_eigen","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_degree(g)$centralization #> [1] 0.1523145 centr_clo(g, mode = \"all\")$centralization #> [1] 0.4128655 centr_betw(g, directed = FALSE)$centralization #> [1] 0.2245963 centr_eigen(g, directed = FALSE)$centralization #> [1] 0.9418167 # The most centralized graph according to eigenvector centrality g0 <- make_graph(c(2, 1), n = 10, dir = FALSE) g1 <- make_star(10, mode = \"undirected\") centr_eigen(g0)$centralization #> [1] 1 centr_eigen(g1)$centralization #> [1] 0.75"},{"path":"https://r.igraph.org/reference/centr_eigen_tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for eigenvector centralization — centr_eigen_tmax","title":"Theoretical maximum for eigenvector centralization — centr_eigen_tmax","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_eigen_tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for eigenvector centralization — centr_eigen_tmax","text":"","code":"centr_eigen_tmax(graph = NULL, nodes = 0, directed = FALSE, scale = TRUE)"},{"path":"https://r.igraph.org/reference/centr_eigen_tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for eigenvector centralization — centr_eigen_tmax","text":"graph input graph. can also NULL, nodes given. nodes number vertices. ignored graph given. directed logical scalar, whether consider edge directions calculation. Ignored undirected graphs. scale Whether rescale eigenvector centrality scores, maximum score one.","code":""},{"path":"https://r.igraph.org/reference/centr_eigen_tmax.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Theoretical maximum for eigenvector centralization — centr_eigen_tmax","text":"Real scalar, theoretical maximum (unnormalized) graph eigenvector centrality score graphs given vertex count parameters.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_eigen_tmax.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Theoretical maximum for eigenvector centralization — centr_eigen_tmax","text":"igraph_centralization_eigenvector_centrality_tmax().","code":""},{"path":"https://r.igraph.org/reference/centr_eigen_tmax.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Theoretical maximum for eigenvector centralization — centr_eigen_tmax","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_eigen(g, normalized = FALSE)$centralization %>% `/`(centr_eigen_tmax(g)) #> [1] 0.9386488 centr_eigen(g, normalized = TRUE)$centralization #> [1] 0.9386488"},{"path":"https://r.igraph.org/reference/centralization.betweenness.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the betweenness of vertices — centralization.betweenness","title":"Centralize a graph according to the betweenness of vertices — centralization.betweenness","text":"centralization.betweenness() renamed centr_betw() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.betweenness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the betweenness of vertices — centralization.betweenness","text":"","code":"centralization.betweenness(graph, directed = TRUE, normalized = TRUE)"},{"path":"https://r.igraph.org/reference/centralization.betweenness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the betweenness of vertices — centralization.betweenness","text":"graph input graph. directed logical scalar, whether use directed shortest paths calculating betweenness. normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centralization.betweenness.tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for betweenness centralization — centralization.betweenness.tmax","title":"Theoretical maximum for betweenness centralization — centralization.betweenness.tmax","text":"centralization.betweenness.tmax() renamed centr_betw_tmax() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.betweenness.tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for betweenness centralization — centralization.betweenness.tmax","text":"","code":"centralization.betweenness.tmax(graph = NULL, nodes = 0, directed = TRUE)"},{"path":"https://r.igraph.org/reference/centralization.betweenness.tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for betweenness centralization — centralization.betweenness.tmax","text":"graph input graph. can also NULL nodes directed given. nodes number vertices. ignored graph given. directed Logical scalar, whether use directed shortest paths calculating betweenness. Ignored undirected graph given.","code":""},{"path":"https://r.igraph.org/reference/centralization.closeness.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the closeness of vertices — centralization.closeness","title":"Centralize a graph according to the closeness of vertices — centralization.closeness","text":"centralization.closeness() renamed centr_clo() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.closeness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the closeness of vertices — centralization.closeness","text":"","code":"centralization.closeness( graph, mode = c(\"out\", \"in\", \"all\", \"total\"), normalized = TRUE )"},{"path":"https://r.igraph.org/reference/centralization.closeness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the closeness of vertices — centralization.closeness","text":"graph input graph. mode mode argument closeness(). normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centralization.closeness.tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for closeness centralization — centralization.closeness.tmax","title":"Theoretical maximum for closeness centralization — centralization.closeness.tmax","text":"centralization.closeness.tmax() renamed centr_clo_tmax() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.closeness.tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for closeness centralization — centralization.closeness.tmax","text":"","code":"centralization.closeness.tmax( graph = NULL, nodes = 0, mode = c(\"out\", \"in\", \"all\", \"total\") )"},{"path":"https://r.igraph.org/reference/centralization.closeness.tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for closeness centralization — centralization.closeness.tmax","text":"graph input graph. can also NULL nodes given. nodes number vertices. ignored graph given. mode mode argument closeness(). Ignored undirected graph given.","code":""},{"path":"https://r.igraph.org/reference/centralization.degree.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the degrees of vertices — centralization.degree","title":"Centralize a graph according to the degrees of vertices — centralization.degree","text":"centralization.degree() renamed centr_degree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.degree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the degrees of vertices — centralization.degree","text":"","code":"centralization.degree( graph, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = TRUE, normalized = TRUE )"},{"path":"https://r.igraph.org/reference/centralization.degree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the degrees of vertices — centralization.degree","text":"graph input graph. mode mode argument degree(). loops Logical scalar, whether consider loops edges calculating degree. normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centralization.degree.tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for degree centralization — centralization.degree.tmax","title":"Theoretical maximum for degree centralization — centralization.degree.tmax","text":"centralization.degree.tmax() renamed centr_degree_tmax() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.degree.tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for degree centralization — centralization.degree.tmax","text":"","code":"centralization.degree.tmax( graph = NULL, nodes = 0, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = FALSE )"},{"path":"https://r.igraph.org/reference/centralization.degree.tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for degree centralization — centralization.degree.tmax","text":"graph input graph. can also NULL nodes given. nodes number vertices. ignored graph given. mode mode argument degree(). Ignored graph given graph undirected. loops Logical scalar, whether consider loops edges calculating degree.","code":""},{"path":"https://r.igraph.org/reference/centralization.evcent.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the eigenvector centrality of vertices — centralization.evcent","title":"Centralize a graph according to the eigenvector centrality of vertices — centralization.evcent","text":"centralization.evcent() renamed centr_eigen() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.evcent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the eigenvector centrality of vertices — centralization.evcent","text":"","code":"centralization.evcent( graph, directed = FALSE, scale = TRUE, options = arpack_defaults(), normalized = TRUE )"},{"path":"https://r.igraph.org/reference/centralization.evcent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the eigenvector centrality of vertices — centralization.evcent","text":"graph input graph. directed logical scalar, whether use directed shortest paths calculating eigenvector centrality. scale Whether rescale eigenvector centrality scores, maximum score one. options passed eigen_centrality(), options ARPACK eigensolver. normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centralization.evcent.tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for betweenness centralization — centralization.evcent.tmax","title":"Theoretical maximum for betweenness centralization — centralization.evcent.tmax","text":"centralization.evcent.tmax() renamed centr_eigen_tmax() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.evcent.tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for betweenness centralization — centralization.evcent.tmax","text":"","code":"centralization.evcent.tmax( graph = NULL, nodes = 0, directed = FALSE, scale = TRUE )"},{"path":"https://r.igraph.org/reference/centralization.evcent.tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for betweenness centralization — centralization.evcent.tmax","text":"graph input graph. can also NULL, nodes given. nodes number vertices. ignored graph given. directed logical scalar, whether consider edge directions calculation. Ignored undirected graphs. scale Whether rescale eigenvector centrality scores, maximum score one.","code":""},{"path":"https://r.igraph.org/reference/centralize.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralization of a graph — centralize","title":"Centralization of a graph — centralize","text":"Centralization method creating graph level centralization measure centrality scores vertices.","code":""},{"path":"https://r.igraph.org/reference/centralize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralization of a graph — centralize","text":"","code":"centralize(scores, theoretical.max = 0, normalized = TRUE)"},{"path":"https://r.igraph.org/reference/centralize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralization of a graph — centralize","text":"scores vertex level centrality scores. theoretical.max Real scalar. graph-level centralization measure centralized graph number vertices graph study. used normalized argument set TRUE. normalized Logical scalar. Whether normalize graph level centrality score dividing supplied theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centralize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Centralization of a graph — centralize","text":"real scalar, centralization graph scores derived.","code":""},{"path":"https://r.igraph.org/reference/centralize.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Centralization of a graph — centralize","text":"Centralization general method calculating graph-level centrality score based node-level centrality measure. formula $$C(G)=\\sum_v (\\max_w c_w - c_v),$$ \\(c_v\\) centrality vertex \\(v\\). graph-level centralization measure can normalized dividing maximum theoretical score graph number vertices, using parameters, e.g. directedness, whether consider loop edges, etc. degree, closeness betweenness centralized structure version star graph, -star, -star undirected star. eigenvector centrality centralized structure graph single edge (potentially many isolates). centralize() implements general centralization formula calculate graph-level score vertex-level scores.","code":""},{"path":"https://r.igraph.org/reference/centralize.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Centralization of a graph — centralize","text":"Freeman, L.C. (1979). Centrality Social Networks : Conceptual Clarification. Social Networks 1, 215–239. Wasserman, S., Faust, K. (1994). Social Network Analysis: Methods Applications. Cambridge University Press.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centralize.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Centralization of a graph — centralize","text":"igraph_centralization().","code":""},{"path":"https://r.igraph.org/reference/centralize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Centralization of a graph — centralize","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_degree(g)$centralization #> [1] 0.1643385 centr_clo(g, mode = \"all\")$centralization #> [1] 0.4334008 centr_eigen(g, directed = FALSE)$centralization #> [1] 0.9440868 # Calculate centralization from pre-computed scores deg <- degree(g) tmax <- centr_degree_tmax(g, loops = FALSE) centralize(deg, tmax) #> [1] 0.1645032 # The most centralized graph according to eigenvector centrality g0 <- make_graph(c(2, 1), n = 10, dir = FALSE) g1 <- make_star(10, mode = \"undirected\") centr_eigen(g0)$centralization #> [1] 1 centr_eigen(g1)$centralization #> [1] 0.75"},{"path":"https://r.igraph.org/reference/centralize.scores.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralization of a graph — centralize.scores","title":"Centralization of a graph — centralize.scores","text":"centralize.scores() renamed centralize() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralize.scores.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralization of a graph — centralize.scores","text":"","code":"centralize.scores(scores, theoretical.max = 0, normalized = TRUE)"},{"path":"https://r.igraph.org/reference/centralize.scores.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralization of a graph — centralize.scores","text":"scores vertex level centrality scores. theoretical.max Real scalar. graph-level centralization measure centralized graph number vertices graph study. used normalized argument set TRUE. normalized Logical scalar. Whether normalize graph level centrality score dividing supplied theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/cited.type.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Random citation graphs — cited.type.game","title":"Random citation graphs — cited.type.game","text":"cited.type.game() renamed sample_cit_types() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/cited.type.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random citation graphs — cited.type.game","text":"","code":"cited.type.game( n, edges = 1, types = rep(0, n), pref = rep(1, length(types)), directed = TRUE, attr = TRUE )"},{"path":"https://r.igraph.org/reference/cited.type.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random citation graphs — cited.type.game","text":"n Number vertices. edges Number edges per step. types Vector length ‘n’, types vertices. Types numbered zero. pref Vector (sample_last_cit() sample_cit_types() matrix (sample_cit_cit_types()) giving (unnormalized) citation probabilities different vertex types. directed Logical scalar, whether generate directed networks. attr Logical scalar, whether add vertex types generated graph vertex attribute called ‘type’.","code":""},{"path":"https://r.igraph.org/reference/citing.cited.type.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Random citation graphs — citing.cited.type.game","title":"Random citation graphs — citing.cited.type.game","text":"citing.cited.type.game() renamed sample_cit_cit_types() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/citing.cited.type.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random citation graphs — citing.cited.type.game","text":"","code":"citing.cited.type.game( n, edges = 1, types = rep(0, n), pref = matrix(1, nrow = length(types), ncol = length(types)), directed = TRUE, attr = TRUE )"},{"path":"https://r.igraph.org/reference/citing.cited.type.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random citation graphs — citing.cited.type.game","text":"n Number vertices. edges Number edges per step. types Vector length ‘n’, types vertices. Types numbered zero. pref Vector (sample_last_cit() sample_cit_types() matrix (sample_cit_cit_types()) giving (unnormalized) citation probabilities different vertex types. directed Logical scalar, whether generate directed networks. attr Logical scalar, whether add vertex types generated graph vertex attribute called ‘type’.","code":""},{"path":"https://r.igraph.org/reference/clique.number.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to find cliques, i.e. complete subgraphs in a graph — clique.number","title":"Functions to find cliques, i.e. complete subgraphs in a graph — clique.number","text":"clique.number() renamed clique_num() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/clique.number.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to find cliques, i.e. complete subgraphs in a graph — clique.number","text":"","code":"clique.number(graph)"},{"path":"https://r.igraph.org/reference/clique.number.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to find cliques, i.e. complete subgraphs in a graph — clique.number","text":"graph input graph, directed graphs considered undirected ones, multiple edges loops ignored.","code":""},{"path":"https://r.igraph.org/reference/cliques.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"functions find , largest maximal cliques undirected graph. size largest clique can also calculated.","code":""},{"path":"https://r.igraph.org/reference/cliques.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"","code":"cliques(graph, min = 0, max = 0) largest_cliques(graph) max_cliques(graph, min = NULL, max = NULL, subset = NULL, file = NULL) count_max_cliques(graph, min = NULL, max = NULL, subset = NULL) clique_num(graph) largest_weighted_cliques(graph, vertex.weights = NULL) weighted_clique_num(graph, vertex.weights = NULL) clique_size_counts(graph, min = 0, max = 0, maximal = FALSE)"},{"path":"https://r.igraph.org/reference/cliques.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"graph input graph, directed graphs considered undirected ones, multiple edges loops ignored. min Numeric constant, lower limit size cliques find. NULL means limit, .e. 0. max Numeric constant, upper limit size cliques find. NULL means limit. subset NULL, must vector vertex ids, numeric symbolic graph named. algorithm run vertices , subset maximal cliques returned. See Eppstein paper details. argument makes possible easily parallelize finding maximal cliques. file NULL, must file name, .e. character scalar. output algorithm written file. (exists, overwritten.) clique separate line file, given numeric ids vertices, separated whitespace. vertex.weights Vertex weight vector. graph weight vertex attribute, used default. graph weight vertex attribute argument NULL, every vertex assumed weight 1. Note current implementation weighted clique finder supports positive integer weights . maximal Specifies whether look weighted cliques (FALSE) maximal ones (TRUE).","code":""},{"path":"https://r.igraph.org/reference/cliques.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"cliques(), largest_cliques() clique_num() return list containing numeric vectors vertex ids. list element clique, .e. vertex sequence class igraph.vs(). max_cliques() returns NULL, invisibly, file argument NULL. output written specified file case. clique_num() count_max_cliques() return integer scalar. clique_size_counts() returns numeric vector clique sizes -th item belongs cliques size . Trailing zeros currently truncated, might change future versions.","code":""},{"path":"https://r.igraph.org/reference/cliques.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"cliques() find complete subgraphs input graph, obeying size limitations given min max arguments. largest_cliques() finds largest cliques input graph. clique largest clique including vertices. max_cliques() finds maximal cliques input graph. clique maximal extended larger clique. largest cliques always maximal, maximal clique necessarily largest. count_max_cliques() counts maximal cliques. clique_num() calculates size largest clique(s). clique_size_counts() returns numeric vector representing histogram clique sizes, given minimum maximum clique size.","code":""},{"path":"https://r.igraph.org/reference/cliques.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"maximal cliques following algorithm implemented: David Eppstein, Maarten Loffler, Darren Strash: Listing Maximal Cliques Sparse Graphs Near-optimal Time. https://arxiv.org/abs/1006.5440","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cliques.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/cliques.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"igraph_cliques(), igraph_largest_cliques(), igraph_clique_number(), igraph_largest_weighted_cliques(), igraph_weighted_clique_number(), igraph_maximal_cliques_hist(), igraph_clique_size_hist().","code":""},{"path":"https://r.igraph.org/reference/cliques.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"","code":"# this usually contains cliques of size six g <- sample_gnp(100, 0.3) clique_num(g) #> [1] 6 cliques(g, min = 6) #> [[1]] #> + 6/100 vertices, from f153faf: #> [1] 6 7 20 76 87 94 #> #> [[2]] #> + 6/100 vertices, from f153faf: #> [1] 7 20 28 53 76 94 #> #> [[3]] #> + 6/100 vertices, from f153faf: #> [1] 17 24 50 57 87 93 #> #> [[4]] #> + 6/100 vertices, from f153faf: #> [1] 8 15 31 40 56 63 #> #> [[5]] #> + 6/100 vertices, from f153faf: #> [1] 8 31 40 56 63 97 #> #> [[6]] #> + 6/100 vertices, from f153faf: #> [1] 8 13 68 69 75 97 #> #> [[7]] #> + 6/100 vertices, from f153faf: #> [1] 8 13 56 68 75 97 #> #> [[8]] #> + 6/100 vertices, from f153faf: #> [1] 56 63 68 81 82 97 #> #> [[9]] #> + 6/100 vertices, from f153faf: #> [1] 15 28 31 66 85 93 #> #> [[10]] #> + 6/100 vertices, from f153faf: #> [1] 3 38 50 68 96 99 #> #> [[11]] #> + 6/100 vertices, from f153faf: #> [1] 5 14 28 72 79 94 #> #> [[12]] #> + 6/100 vertices, from f153faf: #> [1] 5 14 54 72 79 94 #> #> [[13]] #> + 6/100 vertices, from f153faf: #> [1] 5 14 63 79 94 97 #> #> [[14]] #> + 6/100 vertices, from f153faf: #> [1] 5 14 63 77 94 97 #> #> [[15]] #> + 6/100 vertices, from f153faf: #> [1] 5 13 14 33 79 97 #> #> [[16]] #> + 6/100 vertices, from f153faf: #> [1] 5 14 17 63 77 97 #> #> [[17]] #> + 6/100 vertices, from f153faf: #> [1] 8 14 18 60 63 97 #> #> [[18]] #> + 6/100 vertices, from f153faf: #> [1] 17 24 46 57 84 91 #> #> [[19]] #> + 6/100 vertices, from f153faf: #> [1] 17 24 46 47 57 91 #> largest_cliques(g) #> [[1]] #> + 6/100 vertices, from f153faf: #> [1] 3 99 50 96 68 38 #> #> [[2]] #> + 6/100 vertices, from f153faf: #> [1] 5 14 28 72 79 94 #> #> [[3]] #> + 6/100 vertices, from f153faf: #> [1] 5 14 54 79 72 94 #> #> [[4]] #> + 6/100 vertices, from f153faf: #> [1] 5 14 97 17 63 77 #> #> [[5]] #> + 6/100 vertices, from f153faf: #> [1] 5 14 97 79 13 33 #> #> [[6]] #> + 6/100 vertices, from f153faf: #> [1] 5 14 97 79 63 94 #> #> [[7]] #> + 6/100 vertices, from f153faf: #> [1] 5 14 97 77 94 63 #> #> [[8]] #> + 6/100 vertices, from f153faf: #> [1] 6 7 94 87 20 76 #> #> [[9]] #> + 6/100 vertices, from f153faf: #> [1] 7 53 94 28 76 20 #> #> [[10]] #> + 6/100 vertices, from f153faf: #> [1] 8 97 13 68 75 56 #> #> [[11]] #> + 6/100 vertices, from f153faf: #> [1] 8 97 13 68 75 69 #> #> [[12]] #> + 6/100 vertices, from f153faf: #> [1] 8 97 63 14 60 18 #> #> [[13]] #> + 6/100 vertices, from f153faf: #> [1] 8 97 63 40 56 31 #> #> [[14]] #> + 6/100 vertices, from f153faf: #> [1] 8 15 63 56 40 31 #> #> [[15]] #> + 6/100 vertices, from f153faf: #> [1] 15 93 31 85 28 66 #> #> [[16]] #> + 6/100 vertices, from f153faf: #> [1] 17 93 50 87 57 24 #> #> [[17]] #> + 6/100 vertices, from f153faf: #> [1] 17 46 91 57 24 84 #> #> [[18]] #> + 6/100 vertices, from f153faf: #> [1] 17 46 91 57 24 47 #> #> [[19]] #> + 6/100 vertices, from f153faf: #> [1] 56 97 82 68 81 63 #> # To have a bit less maximal cliques, about 100-200 usually g <- sample_gnp(100, 0.03) max_cliques(g) #> [[1]] #> + 1/100 vertex, from aa601ed: #> [1] 49 #> #> [[2]] #> + 1/100 vertex, from aa601ed: #> [1] 64 #> #> [[3]] #> + 1/100 vertex, from aa601ed: #> [1] 28 #> #> [[4]] #> + 1/100 vertex, from aa601ed: #> [1] 27 #> #> [[5]] #> + 1/100 vertex, from aa601ed: #> [1] 56 #> #> [[6]] #> + 1/100 vertex, from aa601ed: #> [1] 35 #> #> [[7]] #> + 1/100 vertex, from aa601ed: #> [1] 4 #> #> [[8]] #> + 2/100 vertices, from aa601ed: #> [1] 89 80 #> #> [[9]] #> + 2/100 vertices, from aa601ed: #> [1] 38 57 #> #> [[10]] #> + 2/100 vertices, from aa601ed: #> [1] 70 1 #> #> [[11]] #> + 2/100 vertices, from aa601ed: #> [1] 12 31 #> #> [[12]] #> + 2/100 vertices, from aa601ed: #> [1] 93 22 #> #> [[13]] #> + 2/100 vertices, from aa601ed: #> [1] 21 63 #> #> [[14]] #> + 2/100 vertices, from aa601ed: #> [1] 73 50 #> #> [[15]] #> + 2/100 vertices, from aa601ed: #> [1] 96 31 #> #> [[16]] #> + 2/100 vertices, from aa601ed: #> [1] 25 23 #> #> [[17]] #> + 2/100 vertices, from aa601ed: #> [1] 99 94 #> #> [[18]] #> + 2/100 vertices, from aa601ed: #> [1] 32 75 #> #> [[19]] #> + 2/100 vertices, from aa601ed: #> [1] 100 39 #> #> [[20]] #> + 2/100 vertices, from aa601ed: #> [1] 44 16 #> #> [[21]] #> + 2/100 vertices, from aa601ed: #> [1] 62 61 #> #> [[22]] #> + 2/100 vertices, from aa601ed: #> [1] 36 2 #> #> [[23]] #> + 2/100 vertices, from aa601ed: #> [1] 50 87 #> #> [[24]] #> + 2/100 vertices, from aa601ed: #> [1] 51 3 #> #> [[25]] #> + 2/100 vertices, from aa601ed: #> [1] 33 85 #> #> [[26]] #> + 2/100 vertices, from aa601ed: #> [1] 33 65 #> #> [[27]] #> + 2/100 vertices, from aa601ed: #> [1] 34 98 #> #> [[28]] #> + 2/100 vertices, from aa601ed: #> [1] 34 58 #> #> [[29]] #> + 2/100 vertices, from aa601ed: #> [1] 37 88 #> #> [[30]] #> + 2/100 vertices, from aa601ed: #> [1] 37 85 #> #> [[31]] #> + 2/100 vertices, from aa601ed: #> [1] 37 65 #> #> [[32]] #> + 2/100 vertices, from aa601ed: #> [1] 39 72 #> #> [[33]] #> + 2/100 vertices, from aa601ed: #> [1] 39 57 #> #> [[34]] #> + 2/100 vertices, from aa601ed: #> [1] 39 46 #> #> [[35]] #> + 2/100 vertices, from aa601ed: #> [1] 40 66 #> #> [[36]] #> + 2/100 vertices, from aa601ed: #> [1] 40 61 #> #> [[37]] #> + 2/100 vertices, from aa601ed: #> [1] 40 60 #> #> [[38]] #> + 2/100 vertices, from aa601ed: #> [1] 40 31 #> #> [[39]] #> + 2/100 vertices, from aa601ed: #> [1] 41 82 #> #> [[40]] #> + 2/100 vertices, from aa601ed: #> [1] 41 18 #> #> [[41]] #> + 2/100 vertices, from aa601ed: #> [1] 41 8 #> #> [[42]] #> + 2/100 vertices, from aa601ed: #> [1] 42 79 #> #> [[43]] #> + 2/100 vertices, from aa601ed: #> [1] 42 76 #> #> [[44]] #> + 2/100 vertices, from aa601ed: #> [1] 43 97 #> #> [[45]] #> + 2/100 vertices, from aa601ed: #> [1] 43 74 #> #> [[46]] #> + 2/100 vertices, from aa601ed: #> [1] 43 58 #> #> [[47]] #> + 2/100 vertices, from aa601ed: #> [1] 43 46 #> #> [[48]] #> + 2/100 vertices, from aa601ed: #> [1] 45 30 #> #> [[49]] #> + 2/100 vertices, from aa601ed: #> [1] 45 10 #> #> [[50]] #> + 2/100 vertices, from aa601ed: #> [1] 47 19 #> #> [[51]] #> + 2/100 vertices, from aa601ed: #> [1] 47 9 #> #> [[52]] #> + 2/100 vertices, from aa601ed: #> [1] 47 6 #> #> [[53]] #> + 2/100 vertices, from aa601ed: #> [1] 48 29 #> #> [[54]] #> + 2/100 vertices, from aa601ed: #> [1] 48 5 #> #> [[55]] #> + 2/100 vertices, from aa601ed: #> [1] 52 95 #> #> [[56]] #> + 2/100 vertices, from aa601ed: #> [1] 52 6 #> #> [[57]] #> + 2/100 vertices, from aa601ed: #> [1] 53 87 #> #> [[58]] #> + 2/100 vertices, from aa601ed: #> [1] 53 9 #> #> [[59]] #> + 2/100 vertices, from aa601ed: #> [1] 54 69 #> #> [[60]] #> + 2/100 vertices, from aa601ed: #> [1] 54 24 #> #> [[61]] #> + 2/100 vertices, from aa601ed: #> [1] 54 8 #> #> [[62]] #> + 2/100 vertices, from aa601ed: #> [1] 55 78 #> #> [[63]] #> + 2/100 vertices, from aa601ed: #> [1] 55 67 #> #> [[64]] #> + 2/100 vertices, from aa601ed: #> [1] 55 26 #> #> [[65]] #> + 2/100 vertices, from aa601ed: #> [1] 57 80 #> #> [[66]] #> + 2/100 vertices, from aa601ed: #> [1] 57 69 #> #> [[67]] #> + 2/100 vertices, from aa601ed: #> [1] 57 3 #> #> [[68]] #> + 2/100 vertices, from aa601ed: #> [1] 58 90 #> #> [[69]] #> + 2/100 vertices, from aa601ed: #> [1] 58 79 #> #> [[70]] #> + 2/100 vertices, from aa601ed: #> [1] 58 59 #> #> [[71]] #> + 2/100 vertices, from aa601ed: #> [1] 59 85 #> #> [[72]] #> + 2/100 vertices, from aa601ed: #> [1] 60 86 #> #> [[73]] #> + 2/100 vertices, from aa601ed: #> [1] 61 80 #> #> [[74]] #> + 2/100 vertices, from aa601ed: #> [1] 61 75 #> #> [[75]] #> + 2/100 vertices, from aa601ed: #> [1] 61 23 #> #> [[76]] #> + 2/100 vertices, from aa601ed: #> [1] 63 78 #> #> [[77]] #> + 2/100 vertices, from aa601ed: #> [1] 63 77 #> #> [[78]] #> + 2/100 vertices, from aa601ed: #> [1] 63 19 #> #> [[79]] #> + 2/100 vertices, from aa601ed: #> [1] 65 20 #> #> [[80]] #> + 2/100 vertices, from aa601ed: #> [1] 65 16 #> #> [[81]] #> + 2/100 vertices, from aa601ed: #> [1] 66 15 #> #> [[82]] #> + 2/100 vertices, from aa601ed: #> [1] 66 13 #> #> [[83]] #> + 2/100 vertices, from aa601ed: #> [1] 67 30 #> #> [[84]] #> + 2/100 vertices, from aa601ed: #> [1] 67 16 #> #> [[85]] #> + 2/100 vertices, from aa601ed: #> [1] 68 92 #> #> [[86]] #> + 2/100 vertices, from aa601ed: #> [1] 68 85 #> #> [[87]] #> + 2/100 vertices, from aa601ed: #> [1] 68 24 #> #> [[88]] #> + 2/100 vertices, from aa601ed: #> [1] 68 2 #> #> [[89]] #> + 2/100 vertices, from aa601ed: #> [1] 69 7 #> #> [[90]] #> + 2/100 vertices, from aa601ed: #> [1] 71 87 #> #> [[91]] #> + 2/100 vertices, from aa601ed: #> [1] 71 13 #> #> [[92]] #> + 2/100 vertices, from aa601ed: #> [1] 71 11 #> #> [[93]] #> + 2/100 vertices, from aa601ed: #> [1] 72 88 #> #> [[94]] #> + 2/100 vertices, from aa601ed: #> [1] 72 78 #> #> [[95]] #> + 2/100 vertices, from aa601ed: #> [1] 72 9 #> #> [[96]] #> + 2/100 vertices, from aa601ed: #> [1] 74 84 #> #> [[97]] #> + 2/100 vertices, from aa601ed: #> [1] 74 26 #> #> [[98]] #> + 2/100 vertices, from aa601ed: #> [1] 75 90 #> #> [[99]] #> + 2/100 vertices, from aa601ed: #> [1] 75 26 #> #> [[100]] #> + 2/100 vertices, from aa601ed: #> [1] 76 87 #> #> [[101]] #> + 2/100 vertices, from aa601ed: #> [1] 77 90 #> #> [[102]] #> + 2/100 vertices, from aa601ed: #> [1] 77 87 #> #> [[103]] #> + 2/100 vertices, from aa601ed: #> [1] 77 29 #> #> [[104]] #> + 2/100 vertices, from aa601ed: #> [1] 77 9 #> #> [[105]] #> + 2/100 vertices, from aa601ed: #> [1] 78 92 #> #> [[106]] #> + 2/100 vertices, from aa601ed: #> [1] 78 13 #> #> [[107]] #> + 2/100 vertices, from aa601ed: #> [1] 78 7 #> #> [[108]] #> + 3/100 vertices, from aa601ed: #> [1] 81 17 84 #> #> [[109]] #> + 2/100 vertices, from aa601ed: #> [1] 81 5 #> #> [[110]] #> + 2/100 vertices, from aa601ed: #> [1] 82 86 #> #> [[111]] #> + 2/100 vertices, from aa601ed: #> [1] 82 19 #> #> [[112]] #> + 2/100 vertices, from aa601ed: #> [1] 83 22 #> #> [[113]] #> + 2/100 vertices, from aa601ed: #> [1] 83 13 #> #> [[114]] #> + 2/100 vertices, from aa601ed: #> [1] 84 97 #> #> [[115]] #> + 2/100 vertices, from aa601ed: #> [1] 84 24 #> #> [[116]] #> + 2/100 vertices, from aa601ed: #> [1] 84 22 #> #> [[117]] #> + 2/100 vertices, from aa601ed: #> [1] 84 14 #> #> [[118]] #> + 2/100 vertices, from aa601ed: #> [1] 85 26 #> #> [[119]] #> + 2/100 vertices, from aa601ed: #> [1] 86 92 #> #> [[120]] #> + 2/100 vertices, from aa601ed: #> [1] 86 90 #> #> [[121]] #> + 2/100 vertices, from aa601ed: #> [1] 87 15 #> #> [[122]] #> + 2/100 vertices, from aa601ed: #> [1] 90 94 #> #> [[123]] #> + 2/100 vertices, from aa601ed: #> [1] 90 22 #> #> [[124]] #> + 2/100 vertices, from aa601ed: #> [1] 91 14 #> #> [[125]] #> + 2/100 vertices, from aa601ed: #> [1] 91 13 #> #> [[126]] #> + 2/100 vertices, from aa601ed: #> [1] 94 98 #> #> [[127]] #> + 2/100 vertices, from aa601ed: #> [1] 94 17 #> #> [[128]] #> + 2/100 vertices, from aa601ed: #> [1] 95 26 #> #> [[129]] #> + 2/100 vertices, from aa601ed: #> [1] 97 23 #> #> [[130]] #> + 2/100 vertices, from aa601ed: #> [1] 98 23 #> #> [[131]] #> + 2/100 vertices, from aa601ed: #> [1] 98 5 #> #> [[132]] #> + 3/100 vertices, from aa601ed: #> [1] 2 13 26 #> #> [[133]] #> + 2/100 vertices, from aa601ed: #> [1] 3 26 #> #> [[134]] #> + 2/100 vertices, from aa601ed: #> [1] 6 26 #> #> [[135]] #> + 2/100 vertices, from aa601ed: #> [1] 6 14 #> #> [[136]] #> + 2/100 vertices, from aa601ed: #> [1] 10 31 #> #> [[137]] #> + 2/100 vertices, from aa601ed: #> [1] 10 11 #> #> [[138]] #> + 2/100 vertices, from aa601ed: #> [1] 15 30 #> #> [[139]] #> + 2/100 vertices, from aa601ed: #> [1] 16 26 #> #> [[140]] #> + 2/100 vertices, from aa601ed: #> [1] 18 20 #> #> [[141]] #> + 2/100 vertices, from aa601ed: #> [1] 19 23 #>"},{"path":"https://r.igraph.org/reference/closeness.html","id":null,"dir":"Reference","previous_headings":"","what":"Closeness centrality of vertices — closeness","title":"Closeness centrality of vertices — closeness","text":"Closeness centrality measures many steps required access every vertex given vertex.","code":""},{"path":"https://r.igraph.org/reference/closeness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Closeness centrality of vertices — closeness","text":"","code":"closeness( graph, vids = V(graph), mode = c(\"out\", \"in\", \"all\", \"total\"), weights = NULL, normalized = FALSE, cutoff = -1 )"},{"path":"https://r.igraph.org/reference/closeness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Closeness centrality of vertices — closeness","text":"graph graph analyze. vids vertices closeness calculated. mode Character string, defined types paths used measuring distance directed graphs. “” measures paths vertex, “” measures paths vertex, uses undirected paths. argument ignored undirected graphs. weights Optional positive weight vector calculating weighted closeness. graph weight edge attribute, used default. Weights used calculating weighted shortest paths, interpreted distances. normalized Logical scalar, whether calculate normalized closeness, .e. inverse average distance reachable vertices. non-normalized closeness inverse sum distances reachable vertices. cutoff maximum path length consider calculating closeness. zero negative limit.","code":""},{"path":"https://r.igraph.org/reference/closeness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Closeness centrality of vertices — closeness","text":"Numeric vector closeness values vertices v.","code":""},{"path":"https://r.igraph.org/reference/closeness.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Closeness centrality of vertices — closeness","text":"closeness centrality vertex defined inverse sum distances vertices graph: $$\\frac{1}{\\sum_{\\ne v} d_{vi}}$$ (directed) path vertex v , omitted calculation. vertices reachable v, closeness returned NaN. cutoff smaller. can run larger graphs, running time quadratic (cutoff small). cutoff negative (default), function calculates exact closeness scores. Since igraph 1.6.0, cutoff value zero treated literally, .e. path length greater zero ignored. Closeness centrality meaningful connected graphs. disconnected graphs, consider using harmonic centrality harmonic_centrality()","code":""},{"path":"https://r.igraph.org/reference/closeness.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Closeness centrality of vertices — closeness","text":"Freeman, L.C. (1979). Centrality Social Networks : Conceptual Clarification. Social Networks, 1, 215-239.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/closeness.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Closeness centrality of vertices — closeness","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/closeness.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Closeness centrality of vertices — closeness","text":"","code":"g <- make_ring(10) g2 <- make_star(10) closeness(g) #> [1] 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 closeness(g2, mode = \"in\") #> [1] 0.1111111 NaN NaN NaN NaN NaN NaN #> [8] NaN NaN NaN closeness(g2, mode = \"out\") #> [1] NaN 1 1 1 1 1 1 1 1 1 closeness(g2, mode = \"all\") #> [1] 0.11111111 0.05882353 0.05882353 0.05882353 0.05882353 0.05882353 #> [7] 0.05882353 0.05882353 0.05882353 0.05882353"},{"path":"https://r.igraph.org/reference/cluster.distribution.html","id":null,"dir":"Reference","previous_headings":"","what":"Connected components of a graph — cluster.distribution","title":"Connected components of a graph — cluster.distribution","text":"cluster.distribution() renamed component_distribution() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/cluster.distribution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connected components of a graph — cluster.distribution","text":"","code":"cluster.distribution(graph, cumulative = FALSE, mul.size = FALSE, ...)"},{"path":"https://r.igraph.org/reference/cluster.distribution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connected components of a graph — cluster.distribution","text":"graph graph analyze. cumulative Logical, TRUE cumulative distirubution (relative frequency) calculated. mul.size Logical. TRUE relative frequencies multiplied cluster sizes. ... Additional attributes pass cluster, right now mode makes sense.","code":""},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure detection based on edge betweenness — cluster_edge_betweenness","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"Community structure detection based betweenness edges network. method also known Girvan-Newman algorithm.","code":""},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"","code":"cluster_edge_betweenness( graph, weights = NULL, directed = TRUE, edge.betweenness = TRUE, merges = TRUE, bridges = TRUE, modularity = TRUE, membership = TRUE )"},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"graph graph analyze. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. Edge weights used calculate weighted edge betweenness. means edges interpreted distances, connection strengths. directed Logical constant, whether calculate directed edge betweenness directed graphs. ignored undirected graphs. edge.betweenness Logical constant, whether return edge betweenness edges time removal. merges Logical constant, whether return merge matrix representing hierarchical community structure network. argument called merges, even community structure algorithm divisive agglomerative: builds tree top bottom. one line merge (.e. split) matrix, first line first merge (last split). communities identified integer number starting one. Community ids smaller equal \\(N\\), number vertices graph, belong singleton communities, .e. individual vertices. first merge \\(N\\) communities numbered one \\(N\\). first merge, first line matrix creates community \\(N+1\\), second merge creates community \\(N+2\\), etc. bridges Logical constant, whether return list edge removals actually splitted component graph. modularity Logical constant, whether calculate maximum modularity score, considering possibly community structures along edge-betweenness based edge removals. membership Logical constant, whether calculate membership vector corresponding highest possible modularity score.","code":""},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"cluster_edge_betweenness() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"idea behind method betweenness edges connecting two communities typically high, many shortest paths vertices separate communities pass . algorithm successively removes edges highest betweenness, recalculating betweenness values removal. way eventually network splits two components, one components splits , , edges removed. resulting hierarhical partitioning vertices can encoded dendrogram. cluster_edge_betweenness() returns various information collected run algorithm. Specifically, removed.edges contains edge IDs order edges' removal; edge.betweenness contains betweenness time removal; bridges contains IDs edges whose removal caused split.","code":""},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"M Newman M Girvan: Finding evaluating community structure networks, Physical Review E 69, 026113 (2004)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"","code":"g <- sample_pa(100, m = 2, directed = FALSE) eb <- cluster_edge_betweenness(g) g <- make_full_graph(10) %du% make_full_graph(10) g <- add_edges(g, c(1, 11)) eb <- cluster_edge_betweenness(g) eb #> IGRAPH clustering edge betweenness, groups: 2, mod: 0.49 #> + groups: #> $`1` #> [1] 1 2 3 4 5 6 7 8 9 10 #> #> $`2` #> [1] 11 12 13 14 15 16 17 18 19 20 #>"},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure via greedy optimization of modularity — cluster_fast_greedy","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"function tries find dense subgraph, also called communities graphs via directly optimizing modularity score.","code":""},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"","code":"cluster_fast_greedy( graph, merges = TRUE, modularity = TRUE, membership = TRUE, weights = NULL )"},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"graph input graph merges Logical scalar, whether return merge matrix. modularity Logical scalar, whether return vector containing modularity merge. membership Logical scalar, whether calculate membership vector corresponding maximum modularity score, considering possible community structures along merges. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function.","code":""},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"cluster_fast_greedy() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"function implements fast greedy modularity optimization algorithm finding community structure, see Clauset, MEJ Newman, C Moore: Finding community structure large networks, http://www.arxiv.org/abs/cond-mat/0408187 details.","code":""},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"Clauset, MEJ Newman, C Moore: Finding community structure large networks, http://www.arxiv.org/abs/cond-mat/0408187","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com R interface.","code":""},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"","code":"g <- make_full_graph(5) %du% make_full_graph(5) %du% make_full_graph(5) g <- add_edges(g, c(1, 6, 1, 11, 6, 11)) fc <- cluster_fast_greedy(g) membership(fc) #> [1] 3 3 3 3 3 1 1 1 1 1 2 2 2 2 2 sizes(fc) #> Community sizes #> 1 2 3 #> 5 5 5"},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":null,"dir":"Reference","previous_headings":"","what":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"algorithm detects communities based simple idea several fluids interacting non-homogeneous environment (graph topology), expanding contracting based interaction density.","code":""},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"","code":"cluster_fluid_communities(graph, no.of.communities)"},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"graph input graph. graph must simple connected. Empty graphs supported well single vertex graphs. Edge directions ignored. Weights considered. ..communities number communities found. Must greater 0 fewer number vertices graph.","code":""},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"cluster_fluid_communities() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"Parés F, Gasulla DG, et. al. (2018) Fluid Communities: Competitive, Scalable Diverse Community Detection Algorithm. : Complex Networks & Applications VI: Proceedings Complex Networks 2017 (Sixth International Conference Complex Networks Applications), Springer, vol 689, p 229, doi: 10.1007/978-3-319-72150-7_19","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"Ferran Parés","code":""},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"","code":"g <- make_graph(\"Zachary\") comms <- cluster_fluid_communities(g, 2)"},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":null,"dir":"Reference","previous_headings":"","what":"Infomap community finding — cluster_infomap","title":"Infomap community finding — cluster_infomap","text":"Find community structure minimizes expected description length random walker trajectory. graph directed, edge directions taken account.","code":""},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Infomap community finding — cluster_infomap","text":"","code":"cluster_infomap( graph, e.weights = NULL, v.weights = NULL, nb.trials = 10, modularity = TRUE )"},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Infomap community finding — cluster_infomap","text":"graph input graph. Edge directions taken account. e.weights NULL, numeric vector edge weights. length must match number edges graph. default ‘weight’ edge attribute used weights. present, edges considered weight. Larger edge weights correspond stronger connections. v.weights NULL, numeric vector vertex weights. length must match number vertices graph. default ‘weight’ vertex attribute used weights. present, vertices considered weight. larger vertex weight means larger probability random surfer jumps vertex. nb.trials number attempts partition network (can integer value equal larger 1). modularity Logical scalar, whether calculate modularity score detected community structure.","code":""},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Infomap community finding — cluster_infomap","text":"cluster_infomap() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Infomap community finding — cluster_infomap","text":"Please see details method references given .","code":""},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Infomap community finding — cluster_infomap","text":"original paper: M. Rosvall C. T. Bergstrom, Maps information flow reveal community structure complex networks, PNAS 105, 1118 (2008) doi:10.1073/pnas.0706851105 , https://arxiv.org/abs/0707.0609 detailed paper: M. Rosvall, D. Axelsson, C. T. Bergstrom, map equation, Eur. Phys. J. Special Topics 178, 13 (2009). doi:10.1140/epjst/e2010-01179-1 , https://arxiv.org/abs/0906.1405.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Infomap community finding — cluster_infomap","text":"Martin Rosvall wrote original C++ code. ported igraph-like Emmanuel Navarro. R interface cosmetics done Gabor Csardi csardi.gabor@gmail.com.","code":""},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Infomap community finding — cluster_infomap","text":"","code":"## Zachary's karate club g <- make_graph(\"Zachary\") imc <- cluster_infomap(g) membership(imc) #> [1] 1 1 1 1 2 2 2 1 3 1 2 1 1 1 3 3 2 1 3 1 3 1 3 3 3 3 3 3 3 3 3 3 3 3 communities(imc) #> $`1` #> [1] 1 2 3 4 8 10 12 13 14 18 20 22 #> #> $`2` #> [1] 5 6 7 11 17 #> #> $`3` #> [1] 9 15 16 19 21 23 24 25 26 27 28 29 30 31 32 33 34 #>"},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding communities based on propagating labels — cluster_label_prop","title":"Finding communities based on propagating labels — cluster_label_prop","text":"fast, nearly linear time algorithm detecting community structure networks. works labeling vertices unique labels updating labels majority voting neighborhood vertex.","code":""},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding communities based on propagating labels — cluster_label_prop","text":"","code":"cluster_label_prop( graph, weights = NULL, ..., mode = c(\"out\", \"in\", \"all\"), initial = NULL, fixed = NULL )"},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding communities based on propagating labels — cluster_label_prop","text":"graph input graph. Note algorithm wsa originally defined undirected graphs. advised set ‘mode’ pass directed graph treat undirected. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. ... dots future extensions must empty. mode Logical, whether consider edge directions label propagation, , direction labels propagate. Ignored undirected graphs. \"\" means ignore edge directions (even directed graphs). \"\" means propagate labels along natural direction edges. \"\" means propagate labels backwards (.e. head tail). initial initial state. NULL, every vertex different label beginning. Otherwise must vector entry vertex. Non-negative values denote different labels, negative entries denote vertices without labels. fixed Logical vector denoting labels fixed. course makes sense provided initial state, otherwise element ignored. Also note vertices without labels fixed.","code":""},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finding communities based on propagating labels — cluster_label_prop","text":"cluster_label_prop() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Finding communities based on propagating labels — cluster_label_prop","text":"function implements community detection method described : Raghavan, U.N. Albert, R. Kumara, S.: Near linear time algorithm detect community structures large-scale networks. Phys Rev E 76, 036106. (2007). version extends original method ability take edge weights consideration also allowing labels fixed. abstract paper: “algorithm every node initialized unique label every step node adopts label neighbors currently . iterative process densely connected groups nodes form consensus unique label form communities.”","code":""},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Finding communities based on propagating labels — cluster_label_prop","text":"Raghavan, U.N. Albert, R. Kumara, S.: Near linear time algorithm detect community structures large-scale networks. Phys Rev E 76, 036106. (2007)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Finding communities based on propagating labels — cluster_label_prop","text":"Tamas Nepusz ntamas@gmail.com C implementation, Gabor Csardi csardi.gabor@gmail.com manual page.","code":""},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Finding communities based on propagating labels — cluster_label_prop","text":"","code":"g <- sample_gnp(10, 5 / 10) %du% sample_gnp(9, 5 / 9) g <- add_edges(g, c(1, 12)) cluster_label_prop(g) #> IGRAPH clustering label propagation, groups: 2, mod: 0.48 #> + groups: #> $`1` #> [1] 1 2 3 4 5 6 7 8 9 10 #> #> $`2` #> [1] 11 12 13 14 15 16 17 18 19 #>"},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"function tries find densely connected subgraphs graph calculating leading non-negative eigenvector modularity matrix graph.","code":""},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"","code":"cluster_leading_eigen( graph, steps = -1, weights = NULL, start = NULL, options = arpack_defaults(), callback = NULL, extra = NULL, env = parent.frame() )"},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"graph input graph. undirected method needs symmetric matrix. steps number steps take, actually number tries make step. particularly useful parameter. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. start NULL, numeric membership vector, giving start configuration algorithm. options named list override ARPACK options. callback NULL, must callback function. called iteration, calculating leading eigenvector modularity matrix. See details . extra Additional argument supply callback function. env environment callback function evaluated.","code":""},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"cluster_leading_eigen() returns named list following members: membership membership vector end algorithm, splits possible. merges merges matrix starting state described membership member. two-column matrix line describes merge two communities, first line first merge creates community ‘N’, N number initial communities graph, second line creates community N+1, etc. options Information underlying ARPACK computation, see arpack() details.","code":""},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"function documented section implements ‘leading eigenvector’ method developed Mark Newman, see reference . heart method definition modularity matrix, B, B=-P, adjacency matrix (undirected) network, P contains probability certain edges present according ‘configuration model’. words, P[,j] element P probability edge vertices j random network degrees vertices input graph. leading eigenvector method works calculating eigenvector modularity matrix largest positive eigenvalue separating vertices two community based sign corresponding element eigenvector. elements eigenvector sign means network underlying comuunity structure. Check Newman's paper understand good method detecting community structure.","code":""},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"callback-functions","dir":"Reference","previous_headings":"","what":"Callback functions","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"callback argument can used supply function called eigenvector calculation. following arguments supplied function: membership actual membership vector, zero-based indexing. community community algorithm just tried split, community numbering starts zero . value eigenvalue belonging leading eigenvector algorithm just found. vector leading eigenvector algorithm just found. multiplier R function can used multiple actual modularity matrix arbitrary vector. Supply vector argument perform multiplication. function can used ARPACK. extra extra argument passed cluster_leading_eigen().","code":""},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"MEJ Newman: Finding community structure using eigenvectors matrices, Physical Review E 74 036104, 2006.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"","code":"g <- make_full_graph(5) %du% make_full_graph(5) %du% make_full_graph(5) g <- add_edges(g, c(1, 6, 1, 11, 6, 11)) lec <- cluster_leading_eigen(g) lec #> IGRAPH clustering leading eigenvector, groups: 3, mod: 0.58 #> + groups: #> $`1` #> [1] 1 2 3 4 5 #> #> $`2` #> [1] 6 7 8 9 10 #> #> $`3` #> [1] 11 12 13 14 15 #> cluster_leading_eigen(g, start = membership(lec)) #> IGRAPH clustering leading eigenvector, groups: 3, mod: 0.58 #> + groups: #> $`1` #> [1] 1 2 3 4 5 #> #> $`2` #> [1] 6 7 8 9 10 #> #> $`3` #> [1] 11 12 13 14 15 #>"},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"Leiden algorithm similar Louvain algorithm, cluster_louvain(), faster yields higher quality solutions. can optimize modularity Constant Potts Model, suffer resolution-limit (see preprint http://arxiv.org/abs/1104.3083).","code":""},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"","code":"cluster_leiden( graph, objective_function = c(\"CPM\", \"modularity\"), ..., weights = NULL, resolution = 1, resolution_parameter = deprecated(), beta = 0.01, initial_membership = NULL, n_iterations = 2, vertex_weights = NULL )"},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"graph input graph, undirected graphs supported. objective_function Whether use Constant Potts Model (CPM) modularity. Must either \"CPM\" \"modularity\". ... dots future extensions must empty. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. resolution resolution parameter use. Higher resolutions lead smaller communities, lower resolutions lead fewer larger communities. resolution_parameter Use resolution instead. beta Parameter affecting randomness Leiden algorithm. affects refinement step algorithm. initial_membership provided, Leiden algorithm try improve provided membership. argument provided, aglorithm simply starts singleton partition. n_iterations number iterations iterate Leiden algorithm. iteration may improve partition . vertex_weights vertex weights used Leiden algorithm. provided, automatically determined basis objective_function. Please see details function interpret vertex weights.","code":""},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"cluster_leiden() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"Leiden algorithm consists three phases: (1) local moving nodes, (2) refinement partition (3) aggregation network based refined partition, using non-refined partition create initial partition aggregate network. local move procedure Leiden algorithm, nodes whose neighborhood changed visited. refinement done restarting singleton partition within cluster gradually merging subclusters. aggregating, single cluster may represented several nodes (subclusters identified refinement). Leiden algorithm provides several guarantees. Leiden algorithm typically iterated: output one iteration used input next iteration. iteration clusters guaranteed connected well-separated. iteration nothing changed, nodes parts guaranteed locally optimally assigned. Finally, asymptotically, subsets clusters guaranteed locally optimally assigned. details, please see Traag, Waltman & van Eck (2019). objective function optimized $$\\frac{1}{2m} \\sum_{ij} (A_{ij} - \\gamma n_i n_j)\\delta(\\sigma_i, \\sigma_j)$$ \\(m\\) total edge weight, \\(A_{ij}\\) weight edge \\((, j)\\), \\(\\gamma\\) -called resolution parameter, \\(n_i\\) node weight node \\(\\), \\(\\sigma_i\\) cluster node \\(\\) \\(\\delta(x, y) = 1\\) \\(x = y\\) \\(0\\) otherwise. setting \\(n_i = k_i\\), degree node \\(\\), dividing \\(\\gamma\\) \\(2m\\), effectively obtain expression modularity. Hence, standard modularity optimized supply degrees vertex_weights supplying resolution parameter \\(\\frac{1}{2m}\\), \\(m\\) number edges. specify vertex_weights, correct vertex weights scaling \\(\\gamma\\) determined automatically objective_function argument.","code":""},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"Traag, V. ., Waltman, L., & van Eck, N. J. (2019). Louvain Leiden: guaranteeing well-connected communities. Scientific reports, 9(1), 5233. doi: 10.1038/s41598-019-41695-z, arXiv:1810.08473v3 [cs.SI]","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"Vincent Traag","code":""},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"","code":"g <- make_graph(\"Zachary\") # By default CPM is used r <- quantile(strength(g))[2] / (gorder(g) - 1) # Set seed for sake of reproducibility set.seed(1) ldc <- cluster_leiden(g, resolution = r) print(ldc) #> IGRAPH clustering leiden, groups: 2, mod: NA #> + groups: #> $`1` #> [1] 1 2 3 4 5 6 7 8 10 11 12 13 14 17 18 20 22 #> #> $`2` #> [1] 9 15 16 19 21 23 24 25 26 27 28 29 30 31 32 33 34 #> plot(ldc, g)"},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding community structure by multi-level optimization of modularity — cluster_louvain","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"function implements multi-level modularity optimization algorithm finding community structure, see references . based modularity measure hierarchical approach.","code":""},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"","code":"cluster_louvain(graph, weights = NULL, resolution = 1)"},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"graph input graph. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. resolution Optional resolution parameter allows user adjust resolution parameter modularity function algorithm uses internally. Lower values typically yield fewer, larger clusters. original definition modularity recovered resolution parameter set 1.","code":""},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"cluster_louvain() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"function implements multi-level modularity optimization algorithm finding community structure, see VD Blondel, J-L Guillaume, R Lambiotte E Lefebvre: Fast unfolding community hierarchies large networks, https://arxiv.org/abs/0803.0476 details. based modularity measure hierarchical approach. Initially, vertex assigned community . every step, vertices re-assigned communities local, greedy way: vertex moved community achieves highest contribution modularity. vertices can reassigned, community considered vertex , process starts merged communities. process stops single vertex left modularity increased step. Since igraph 1.3, vertices processed random order. function contributed Tom Gregorovic.","code":""},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"Vincent D. Blondel, Jean-Loup Guillaume, Renaud Lambiotte, Etienne Lefebvre: Fast unfolding communities large networks. J. Stat. Mech. (2008) P10008","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"Tom Gregorovic, Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"","code":"# This is so simple that we will have only one level g <- make_full_graph(5) %du% make_full_graph(5) %du% make_full_graph(5) g <- add_edges(g, c(1, 6, 1, 11, 6, 11)) cluster_louvain(g) #> IGRAPH clustering multi level, groups: 3, mod: 0.58 #> + groups: #> $`1` #> [1] 1 2 3 4 5 #> #> $`2` #> [1] 6 7 8 9 10 #> #> $`3` #> [1] 11 12 13 14 15 #>"},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":null,"dir":"Reference","previous_headings":"","what":"Optimal community structure — cluster_optimal","title":"Optimal community structure — cluster_optimal","text":"function calculates optimal community structure graph, maximizing modularity measure possible partitions.","code":""},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Optimal community structure — cluster_optimal","text":"","code":"cluster_optimal(graph, weights = NULL)"},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Optimal community structure — cluster_optimal","text":"graph input graph. Edge directions ignored directed graphs. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function.","code":""},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Optimal community structure — cluster_optimal","text":"cluster_optimal() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Optimal community structure — cluster_optimal","text":"function calculates optimal community structure graph, terms maximal modularity score. calculation done transforming modularity maximization integer programming problem, calling GLPK library solve . Please reference details. Note modularity optimization NP-complete problem, known algorithms exponential time complexity. means probably want run function larger graphs. Graphs fifty vertices fine, graphs couple hundred vertices might possible.","code":""},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Optimal community structure — cluster_optimal","text":"","code":"## Zachary's karate club g <- make_graph(\"Zachary\") ## We put everything into a big 'try' block, in case ## igraph was compiled without GLPK support ## The calculation only takes a couple of seconds oc <- cluster_optimal(g) ## Double check the result print(modularity(oc)) print(modularity(g, membership(oc))) ## Compare to the greedy optimizer fc <- cluster_fast_greedy(g) print(modularity(fc))"},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Optimal community structure — cluster_optimal","text":"Ulrik Brandes, Daniel Delling, Marco Gaertler, Robert Gorke, Martin Hoefer, Zoran Nikoloski, Dorothea Wagner: Modularity Clustering, IEEE Transactions Knowledge Data Engineering 20(2):172-188, 2008.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Optimal community structure — cluster_optimal","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"function tries find communities graphs via spin-glass model simulated annealing.","code":""},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"","code":"cluster_spinglass( graph, weights = NULL, vertex = NULL, spins = 25, parupdate = FALSE, start.temp = 1, stop.temp = 0.01, cool.fact = 0.99, update.rule = c(\"config\", \"random\", \"simple\"), gamma = 1, implementation = c(\"orig\", \"neg\"), gamma.minus = 1 )"},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"graph input graph, can directed direction edges neglected. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. vertex parameter can used calculate community given vertex without calculating communities. Note argument present arguments ignored. spins Integer constant, number spins use. upper limit number communities. problem supply (reasonably) big number , case spin states unpopulated. parupdate Logical constant, whether update spins vertices parallel (synchronously) . argument ignored second form function used (.e. ‘vertex’ argument present). also implemented “neg” implementation. start.temp Real constant, start temperature. argument ignored second form function used (.e. ‘vertex’ argument present). stop.temp Real constant, stop temperature. simulation terminates temperature lowers level. argument ignored second form function used (.e. ‘vertex’ argument present). cool.fact Cooling factor simulated annealing. argument ignored second form function used (.e. ‘vertex’ argument present). update.rule Character constant giving ‘null-model’ simulation. Possible values: “simple” “config”. “simple” uses random graph number edges baseline probability “config” uses random graph vertex degrees input graph. gamma Real constant, gamma argument algorithm. specifies balance importance present non-present edges community. Roughly, comunity set vertices many edges inside community edges outside community. default 1.0 value makes existing non-existing links equally important. Smaller values make existing links, greater values missing links important. implementation Character scalar. Currently igraph contains two implementations Spin-glass community finding algorithm. faster original implementation default. implementation, takes account negative weights, can chosen supplying ‘neg’ . gamma.minus Real constant, gamma.minus parameter algorithm. specifies balance importance present non-present negative weighted edges community. Smaller values gamma.minus, leads communities lesser negative intra-connectivity. argument set zero, algorithm reduces graph coloring algorithm, using number spins number colors. argument ignored ‘orig’ implementation chosen.","code":""},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"vertex argument given, .e. first form used cluster_spinglass() returns communities() object. vertex argument present, .e. second form used named list returned following components: community Numeric vector giving ids vertices community vertex. cohesion cohesion score result, see references. adhesion adhesion score result, see references. inner.links number edges within community vertex. outer.links number edges community vertex rest graph.","code":""},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"function tries find communities graph. community set nodes many edges inside community edges outside (.e. community rest graph.) idea reversed edges negative weight, .e. negative edges inside community many negative edges communities. Note ‘neg’ implementation supports negative edge weights. spinglass.cummunity function can solve two problems related community detection. vertex argument given (NULL), regular community detection problem solved (approximately), .e. partitioning vertices communities, optimizing energy function. vertex argument given NULL, must vertex id, energy function used find community given vertex. See also examples .","code":""},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"J. Reichardt S. Bornholdt: Statistical Mechanics Community Detection, Phys. Rev. E, 74, 016110 (2006), https://arxiv.org/abs/cond-mat/0603718 M. E. J. Newman M. Girvan: Finding evaluating community structure networks, Phys. Rev. E 69, 026113 (2004) V.. Traag Jeroen Bruggeman: Community detection networks positive negative links, https://arxiv.org/abs/0811.2329 (2008).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"Jorg Reichardt original code Gabor Csardi csardi.gabor@gmail.com igraph glue code. Changes original function including possibility negative ties implemented Vincent Traag (https://www.traag.net/).","code":""},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"","code":"g <- sample_gnp(10, 5 / 10) %du% sample_gnp(9, 5 / 9) g <- add_edges(g, c(1, 12)) g <- induced_subgraph(g, subcomponent(g, 1)) cluster_spinglass(g, spins = 2) #> IGRAPH clustering spinglass, groups: 2, mod: 0.47 #> + groups: #> $`1` #> [1] 11 12 13 14 15 16 17 18 19 #> #> $`2` #> [1] 1 2 3 4 5 6 7 8 9 10 #> cluster_spinglass(g, vertex = 1) #> $community #> [1] 1 5 6 7 9 10 4 3 2 8 #> #> $cohesion #> [1] 8.940789 #> #> $adhesion #> [1] -17.88158 #> #> $inner.links #> [1] 20 #> #> $outer.links #> [1] 1 #>"},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure via short random walks — cluster_walktrap","title":"Community structure via short random walks — cluster_walktrap","text":"function tries find densely connected subgraphs, also called communities graph via random walks. idea short random walks tend stay community.","code":""},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure via short random walks — cluster_walktrap","text":"","code":"cluster_walktrap( graph, weights = NULL, steps = 4, merges = TRUE, modularity = TRUE, membership = TRUE )"},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure via short random walks — cluster_walktrap","text":"graph input graph, edge directions ignored directed graphs. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. Larger edge weights increase probability edge selected random walker. words, larger edge weights correspond stronger connections. steps length random walks perform. merges Logical scalar, whether include merge matrix result. modularity Logical scalar, whether include vector modularity scores result. membership argument true, always calculated. membership Logical scalar, whether calculate membership vector split corresponding highest modularity value.","code":""},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Community structure via short random walks — cluster_walktrap","text":"cluster_walktrap() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Community structure via short random walks — cluster_walktrap","text":"function implementation Walktrap community finding algorithm, see Pascal Pons, Matthieu Latapy: Computing communities large networks using random walks, https://arxiv.org/abs/physics/0512106","code":""},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Community structure via short random walks — cluster_walktrap","text":"Pascal Pons, Matthieu Latapy: Computing communities large networks using random walks, https://arxiv.org/abs/physics/0512106","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community structure via short random walks — cluster_walktrap","text":"Pascal Pons (http://psl.pons.free.fr/) Gabor Csardi csardi.gabor@gmail.com R igraph interface","code":""},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community structure via short random walks — cluster_walktrap","text":"","code":"g <- make_full_graph(5) %du% make_full_graph(5) %du% make_full_graph(5) g <- add_edges(g, c(1, 6, 1, 11, 6, 11)) cluster_walktrap(g) #> IGRAPH clustering walktrap, groups: 3, mod: 0.58 #> + groups: #> $`1` #> [1] 11 12 13 14 15 #> #> $`2` #> [1] 6 7 8 9 10 #> #> $`3` #> [1] 1 2 3 4 5 #>"},{"path":"https://r.igraph.org/reference/clusters.html","id":null,"dir":"Reference","previous_headings":"","what":"Connected components of a graph — clusters","title":"Connected components of a graph — clusters","text":"clusters() renamed components() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/clusters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connected components of a graph — clusters","text":"","code":"clusters(graph, mode = c(\"weak\", \"strong\"))"},{"path":"https://r.igraph.org/reference/clusters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connected components of a graph — clusters","text":"graph graph analyze. mode Character string, either “weak” “strong”. directed graphs “weak” implies weakly, “strong” strongly connected components search. ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/cocitation.html","id":null,"dir":"Reference","previous_headings":"","what":"Cocitation coupling — cocitation","title":"Cocitation coupling — cocitation","text":"Two vertices cocited another vertex citing . cocitation() simply counts many types two vertices cocited. bibliographic coupling two vertices number vertices cite, bibcoupling() calculates .","code":""},{"path":"https://r.igraph.org/reference/cocitation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cocitation coupling — cocitation","text":"","code":"cocitation(graph, v = V(graph)) bibcoupling(graph, v = V(graph))"},{"path":"https://r.igraph.org/reference/cocitation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cocitation coupling — cocitation","text":"graph graph object analyze v Vertex sequence numeric vector, vertex ids cocitation bibliographic coupling values want calculate. default vertices.","code":""},{"path":"https://r.igraph.org/reference/cocitation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cocitation coupling — cocitation","text":"numeric matrix length(v) lines vcount(graph) columns. Element (,j) contains cocitation bibliographic coupling vertices v[] j.","code":""},{"path":"https://r.igraph.org/reference/cocitation.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cocitation coupling — cocitation","text":"cocitation() calculates cocitation counts vertices v argument vertices graph. bibcoupling() calculates bibliographic coupling vertices v vertices graph. Calculating cocitation bibliographic coupling one vertex costs amount computation vertices. might change future.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cocitation.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cocitation coupling — cocitation","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/cocitation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cocitation coupling — cocitation","text":"","code":"g <- make_kautz_graph(2, 3) cocitation(g) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 0 2 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 2 0 0 0 0 0 0 0 0 0 0 0 0 #> [3,] 0 0 0 2 0 0 0 0 0 0 0 0 0 #> [4,] 0 0 2 0 0 0 0 0 0 0 0 0 0 #> [5,] 0 0 0 0 0 2 0 0 0 0 0 0 0 #> [6,] 0 0 0 0 2 0 0 0 0 0 0 0 0 #> [7,] 0 0 0 0 0 0 0 2 0 0 0 0 0 #> [8,] 0 0 0 0 0 0 2 0 0 0 0 0 0 #> [9,] 0 0 0 0 0 0 0 0 0 2 0 0 0 #> [10,] 0 0 0 0 0 0 0 0 2 0 0 0 0 #> [11,] 0 0 0 0 0 0 0 0 0 0 0 2 0 #> [12,] 0 0 0 0 0 0 0 0 0 0 2 0 0 #> [13,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [14,] 0 0 0 0 0 0 0 0 0 0 0 0 2 #> [15,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [16,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [17,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [18,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [19,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [20,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [21,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [22,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [23,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [24,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 0 0 0 0 0 0 0 0 0 #> [3,] 0 0 0 0 0 0 0 0 0 0 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 #> [5,] 0 0 0 0 0 0 0 0 0 0 0 #> [6,] 0 0 0 0 0 0 0 0 0 0 0 #> [7,] 0 0 0 0 0 0 0 0 0 0 0 #> [8,] 0 0 0 0 0 0 0 0 0 0 0 #> [9,] 0 0 0 0 0 0 0 0 0 0 0 #> [10,] 0 0 0 0 0 0 0 0 0 0 0 #> [11,] 0 0 0 0 0 0 0 0 0 0 0 #> [12,] 0 0 0 0 0 0 0 0 0 0 0 #> [13,] 2 0 0 0 0 0 0 0 0 0 0 #> [14,] 0 0 0 0 0 0 0 0 0 0 0 #> [15,] 0 0 2 0 0 0 0 0 0 0 0 #> [16,] 0 2 0 0 0 0 0 0 0 0 0 #> [17,] 0 0 0 0 2 0 0 0 0 0 0 #> [18,] 0 0 0 2 0 0 0 0 0 0 0 #> [19,] 0 0 0 0 0 0 2 0 0 0 0 #> [20,] 0 0 0 0 0 2 0 0 0 0 0 #> [21,] 0 0 0 0 0 0 0 0 2 0 0 #> [22,] 0 0 0 0 0 0 0 2 0 0 0 #> [23,] 0 0 0 0 0 0 0 0 0 0 2 #> [24,] 0 0 0 0 0 0 0 0 0 2 0 bibcoupling(g) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [3,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [5,] 0 0 0 0 0 0 0 0 0 0 0 0 2 #> [6,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [7,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [8,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [9,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [10,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [11,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [12,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [13,] 0 0 0 0 2 0 0 0 0 0 0 0 0 #> [14,] 0 0 0 0 0 2 0 0 0 0 0 0 0 #> [15,] 0 0 0 0 0 0 2 0 0 0 0 0 0 #> [16,] 0 0 0 0 0 0 0 2 0 0 0 0 0 #> [17,] 0 0 0 0 0 0 0 0 2 0 0 0 0 #> [18,] 0 0 0 0 0 0 0 0 0 2 0 0 0 #> [19,] 0 0 0 0 0 0 0 0 0 0 2 0 0 #> [20,] 0 0 0 0 0 0 0 0 0 0 0 2 0 #> [21,] 2 0 0 0 0 0 0 0 0 0 0 0 0 #> [22,] 0 2 0 0 0 0 0 0 0 0 0 0 0 #> [23,] 0 0 2 0 0 0 0 0 0 0 0 0 0 #> [24,] 0 0 0 2 0 0 0 0 0 0 0 0 0 #> [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] #> [1,] 0 0 0 0 0 0 0 2 0 0 0 #> [2,] 0 0 0 0 0 0 0 0 2 0 0 #> [3,] 0 0 0 0 0 0 0 0 0 2 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 2 #> [5,] 0 0 0 0 0 0 0 0 0 0 0 #> [6,] 2 0 0 0 0 0 0 0 0 0 0 #> [7,] 0 2 0 0 0 0 0 0 0 0 0 #> [8,] 0 0 2 0 0 0 0 0 0 0 0 #> [9,] 0 0 0 2 0 0 0 0 0 0 0 #> [10,] 0 0 0 0 2 0 0 0 0 0 0 #> [11,] 0 0 0 0 0 2 0 0 0 0 0 #> [12,] 0 0 0 0 0 0 2 0 0 0 0 #> [13,] 0 0 0 0 0 0 0 0 0 0 0 #> [14,] 0 0 0 0 0 0 0 0 0 0 0 #> [15,] 0 0 0 0 0 0 0 0 0 0 0 #> [16,] 0 0 0 0 0 0 0 0 0 0 0 #> [17,] 0 0 0 0 0 0 0 0 0 0 0 #> [18,] 0 0 0 0 0 0 0 0 0 0 0 #> [19,] 0 0 0 0 0 0 0 0 0 0 0 #> [20,] 0 0 0 0 0 0 0 0 0 0 0 #> [21,] 0 0 0 0 0 0 0 0 0 0 0 #> [22,] 0 0 0 0 0 0 0 0 0 0 0 #> [23,] 0 0 0 0 0 0 0 0 0 0 0 #> [24,] 0 0 0 0 0 0 0 0 0 0 0"},{"path":"https://r.igraph.org/reference/code.length.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to deal with the result of network community detection — code.length","title":"Functions to deal with the result of network community detection — code.length","text":"code.length() renamed code_len() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/code.length.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to deal with the result of network community detection — code.length","text":"","code":"code.length(communities)"},{"path":"https://r.igraph.org/reference/cohesive.blocks.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Cohesive Blocks — cohesive.blocks","title":"Calculate Cohesive Blocks — cohesive.blocks","text":"cohesive.blocks() renamed cohesive_blocks() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/cohesive.blocks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Cohesive Blocks — cohesive.blocks","text":"","code":"cohesive.blocks(graph, labels = TRUE)"},{"path":"https://r.igraph.org/reference/cohesive.blocks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Cohesive Blocks — cohesive.blocks","text":"graph cohesive_blocks() graph object class igraph. must undirected simple. (See is_simple().) graphs_from_cohesive_blocks() export_pajek() graph must supplied whose cohesive block structure given blocks() argument. labels Logical scalar, whether add vertex labels result object. labels can used reporting plotting cohesive blocks.","code":""},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Cohesive Blocks — cohesive_blocks","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"Calculates cohesive blocks objects class igraph.","code":""},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"","code":"cohesive_blocks(graph, labels = TRUE) # S3 method for class 'cohesiveBlocks' length(x) blocks(blocks) graphs_from_cohesive_blocks(blocks, graph) # S3 method for class 'cohesiveBlocks' cohesion(x, ...) hierarchy(blocks) parent(blocks) # S3 method for class 'cohesiveBlocks' print(x, ...) # S3 method for class 'cohesiveBlocks' summary(object, ...) # S3 method for class 'cohesiveBlocks' plot( x, y, colbar = rainbow(max(cohesion(x)) + 1), col = colbar[max_cohesion(x) + 1], mark.groups = blocks(x)[-1], ... ) plot_hierarchy( blocks, layout = layout_as_tree(hierarchy(blocks), root = 1), ... ) export_pajek(blocks, graph, file, project.file = TRUE) max_cohesion(blocks)"},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"graph cohesive_blocks() graph object class igraph. must undirected simple. (See is_simple().) graphs_from_cohesive_blocks() export_pajek() graph must supplied whose cohesive block structure given blocks() argument. labels Logical scalar, whether add vertex labels result object. labels can used reporting plotting cohesive blocks. blocks, x, object cohesiveBlocks object, created cohesive_blocks() function. ... Additional arguments. plot_hierarchy() plot() pass plot.igraph(). print() summary() ignore . y graph whose cohesive blocks supplied x argument. colbar Color bar vertex colors. length least \\(m+1\\), \\(m\\) maximum cohesion graph. Alternatively, vertex colors can also directly specified via col argument. col vector vertex colors, usual formats. (Symbolic color names (e.g. ‘red’, ‘blue’, etc.) , RGB colors (e.g. ‘#FF9900FF’), integer numbers referring current palette. default given colbar used vertices maximal cohesion color. mark.groups list vertex sets mark plot circling . default cohesive blocks marked, except one corresponding vertices. layout layout plot, simply passed plot.igraph(), see possible formats . default Reingold-Tilford layout generator used. file Defines file (connection) Pajek file written . project.file argument TRUE, can filename (extension), file object, general king connection object. file/connection opened already. project.file argument FALSE, several files created file must character scalar containing base name files, without extension. (can contain path files.) See also details . project.file Logical scalar, whether create single Pajek project file containing data, create separated files item. See details .","code":""},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"cohesive_blocks() returns cohesiveBlocks object. blocks() returns list numeric vectors, containing vertex ids. graphs_from_cohesive_blocks() returns list igraph graphs, corresponding cohesive blocks. cohesion() returns numeric vector, cohesion block. hierarchy() returns igraph graph, representation cohesive block hierarchy. parent() returns numeric vector giving parent block cohesive block, block hierarchy. block root hierarchy parent 0 returned . plot_hierarchy(), plot() export_pajek() return NULL, invisibly. max_cohesion() returns numeric vector one entry vertex, giving cohesion cohesive block. print() summary() return cohesiveBlocks object , invisibly. length returns numeric scalar, number blocks.","code":""},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"Cohesive blocking method determining hierarchical subsets graph vertices based structural cohesion (vertex connectivity). given graph \\(G\\), subset vertices \\(S\\subset V(G)\\) said maximally \\(k\\)-cohesive superset \\(S\\) vertex connectivity greater equal \\(k\\). Cohesive blocking process , given \\(k\\)-cohesive set vertices, maximally \\(l\\)-cohesive subsets recursively identified \\(l>k\\). Thus hierarchy vertex subsets found, entire graph \\(G\\) root. function cohesive_blocks() implements cohesive blocking. returns cohesiveBlocks object. cohesiveBlocks handled opaque class, .e. internal structure accessed directly, functions listed . function length can used cohesiveBlocks objects gives number blocks. function blocks() returns actual blocks stored cohesiveBlocks object. returned list numeric vectors, containing vertex ids. function graphs_from_cohesive_blocks() similar, returns blocks (induced) subgraphs input graph. various (graph, vertex edge) attributes kept subgraph. function cohesion() returns numeric vector, cohesion different blocks. order blocks blocks() graphs_from_cohesive_blocks() functions. block hierarchy can queried using hierarchy() function. returns igraph graph, vertex ids ordered according order blocks blocks() graphs_from_cohesive_blocks(), cohesion(), etc. functions. parent() gives parent vertex block, block hierarchy, root vertex gives 0. plot_hierarchy() plots hierarchy tree cohesive blocks active graphics device, calling igraph.plot. export_pajek() function can used export graph cohesive blocks Pajek format. can either export single Pajek project file information, set files, depending project.file argument. project.file TRUE, following information written file (connection) given file argument: (1) input graph, together attributes, see write_graph() details; (2) hierarchy graph; (3) one binary partition cohesive block. project.file FALSE, file argument must character scalar used base name generated files. file ‘basename’, following files created: (1) ‘basename.net’ original graph; (2) ‘basename_hierarchy.net’ hierarchy graph; (3) ‘basename_block_x.net’ cohesive block, ‘x’ number block, starting one. max_cohesion() returns maximal cohesion vertex, .e. cohesion cohesive block vertex. generic function summary() works cohesiveBlocks objects prints one line summary terminal. generic function print() also defined cohesiveBlocks objects invoked automatically name cohesiveBlocks object typed . produces output like : left part shows block structure, case five blocks. first block always corresponds whole graph, even cohesion zero. cohesion block number vertices block shown. last part printed display wide enough shows vertices blocks, ordered vertex ids. ‘o’ means vertex included, dot means , vertices shown groups ten. generic function plot() plots graph, showing one cohesive blocks .","code":"Cohesive block structure: B-1 c 1, n 23 '- B-2 c 2, n 14 oooooooo.. .o......oo ooo '- B-4 c 5, n 7 ooooooo... .......... ... '- B-3 c 2, n 10 ......o.oo o.oooooo.. ... '- B-5 c 3, n 4 ......o.oo o......... ..."},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"J. Moody D. R. White. Structural cohesion embeddedness: hierarchical concept social groups. American Sociological Review, 68(1):103–127, Feb 2003, doi:10.2307/3088904 .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"Gabor Csardi csardi.gabor@gmail.com current implementation, Peter McMahan (https://socialsciences.uchicago.edu/news/alumni-profile-peter-mcmahan-phd17-sociology) wrote first version R.","code":""},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"","code":"## The graph from the Moody-White paper mw <- graph_from_literal( 1 - 2:3:4:5:6, 2 - 3:4:5:7, 3 - 4:6:7, 4 - 5:6:7, 5 - 6:7:21, 6 - 7, 7 - 8:11:14:19, 8 - 9:11:14, 9 - 10, 10 - 12:13, 11 - 12:14, 12 - 16, 13 - 16, 14 - 15, 15 - 16, 17 - 18:19:20, 18 - 20:21, 19 - 20:22:23, 20 - 21, 21 - 22:23, 22 - 23 ) mwBlocks <- cohesive_blocks(mw) # Inspect block membership and cohesion mwBlocks #> Cohesive block structure: #> B-1 c 1, n 23 #> '- B-2 c 2, n 14 oooooooo.. .o......oo ooo #> '- B-4 c 5, n 7 ooooooo... .......... ... #> '- B-3 c 2, n 10 ......o.oo o.oooooo.. ... #> '- B-5 c 3, n 4 ......o.oo o......... ... blocks(mwBlocks) #> [[1]] #> + 23/23 vertices, named, from 718b775: #> [1] 1 2 3 4 5 6 7 21 8 11 14 19 9 10 12 13 16 15 17 18 20 22 23 #> #> [[2]] #> + 14/23 vertices, named, from 718b775: #> [1] 1 2 3 4 5 6 7 21 19 17 18 20 22 23 #> #> [[3]] #> + 10/23 vertices, named, from 718b775: #> [1] 7 8 11 14 9 10 12 13 16 15 #> #> [[4]] #> + 7/23 vertices, named, from 718b775: #> [1] 1 2 3 4 5 6 7 #> #> [[5]] #> + 4/23 vertices, named, from 718b775: #> [1] 7 8 11 14 #> cohesion(mwBlocks) #> [1] 1 2 2 5 3 # Save results in a Pajek file file <- tempfile(fileext = \".paj\") export_pajek(mwBlocks, mw, file = file) if (!interactive()) { unlink(file) } # Plot the results plot(mwBlocks, mw) ## The science camp network camp <- graph_from_literal( Harry:Steve:Don:Bert - Harry:Steve:Don:Bert, Pam:Brazey:Carol:Pat - Pam:Brazey:Carol:Pat, Holly - Carol:Pat:Pam:Jennie:Bill, Bill - Pauline:Michael:Lee:Holly, Pauline - Bill:Jennie:Ann, Jennie - Holly:Michael:Lee:Ann:Pauline, Michael - Bill:Jennie:Ann:Lee:John, Ann - Michael:Jennie:Pauline, Lee - Michael:Bill:Jennie, Gery - Pat:Steve:Russ:John, Russ - Steve:Bert:Gery:John, John - Gery:Russ:Michael ) campBlocks <- cohesive_blocks(camp) campBlocks #> Cohesive block structure: #> B-1 c 2, n 18 #> '- B-2 c 3, n 4 oooo...... ........ #> '- B-3 c 3, n 5 ....ooooo. ........ #> '- B-4 c 3, n 6 .........o ooooo... plot(campBlocks, camp, vertex.label = V(camp)$name, margin = -0.2, vertex.shape = \"rectangle\", vertex.size = 24, vertex.size2 = 8, mark.border = 1, colbar = c(NA, NA, \"cyan\", \"orange\") )"},{"path":"https://r.igraph.org/reference/communities.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to deal with the result of network community detection — membership","title":"Functions to deal with the result of network community detection — membership","text":"igraph community detection functions return results object communities class. manual page describes operations class.","code":""},{"path":"https://r.igraph.org/reference/communities.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to deal with the result of network community detection — membership","text":"","code":"membership(communities) # S3 method for class 'communities' print(x, ...) # S3 method for class 'communities' modularity(x, ...) # S3 method for class 'communities' length(x) sizes(communities) algorithm(communities) merges(communities) crossing(communities, graph) code_len(communities) is_hierarchical(communities) # S3 method for class 'communities' as.dendrogram(object, hang = -1, use.modularity = FALSE, ...) # S3 method for class 'communities' as.hclust(x, hang = -1, use.modularity = FALSE, ...) cut_at(communities, no, steps) show_trace(communities) # S3 method for class 'communities' plot( x, y, col = membership(x), mark.groups = communities(x), edge.color = c(\"black\", \"red\")[crossing(x, y) + 1], ... ) communities(x)"},{"path":"https://r.igraph.org/reference/communities.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to deal with the result of network community detection — membership","text":"communities, x, object communities object, result igraph community detection function. ... Additional arguments. plot.communities passes plot.igraph(). functions silently ignore . graph igraph graph object, corresponding communities. hang Numeric scalar indicating height leaves computed heights parents; see plot.hclust(). use.modularity Logical scalar, whether use modularity values define height branches. Integer scalar, desired number communities. low two high, error message given. Exactly one steps must supplied. steps number merge operations perform produce communities. Exactly one steps must supplied. y igraph graph object, corresponding communities x. col vector colors, format accepted regular R plotting methods. vector gives colors vertices explicitly. mark.groups list numeric vectors. communities can highlighted using colored polygons. groups polygons drawn given . default use groups given communities. Supply NULL want highlight groups. edge.color colors edges. default edges within communities colored green edges red. membership Numeric vector, one value vertex, membership vector community structure. Might also NULL community structure given another way, e.g. merge matrix. algorithm NULL (meaning unknown algorithm), character scalar, name algorithm produced community structure. merges NULL, merge matrix hierarchical community structure. See merges() information format. modularity Numeric scalar vector, modularity value community structure. can also NULL, modularity (best) split available.","code":""},{"path":"https://r.igraph.org/reference/communities.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Functions to deal with the result of network community detection — membership","text":"print() returns communities object , invisibly. length returns integer scalar. sizes() returns numeric vector. membership() returns numeric vector, one number vertex graph input community detection. modularity() returns numeric scalar. algorithm() returns character scalar. crossing() returns logical vector. is_hierarchical() returns logical scalar. merges() returns two-column numeric matrix. cut_at() returns numeric vector, membership vector vertices. .dendrogram() returns dendrogram object. show_trace() returns character vector. code_len() returns numeric scalar communities found InfoMAP method NULL methods. plot() communities objects returns NULL, invisibly.","code":""},{"path":"https://r.igraph.org/reference/communities.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Functions to deal with the result of network community detection — membership","text":"Community structure detection algorithms try find dense subgraphs directed undirected graphs, optimizing criteria, usually using heuristics. igraph implements number community detection methods (see ), return object class communities. community structure detection algorithms different, communities objects always structure. Nevertheless, common operations, documented . print() generic function defined communities, prints short summary. length generic function call called communities returns number communities. sizes() function returns community sizes, order ids. membership() gives division vertices, communities. returns numeric vector, one value vertex, id community. Community ids start one. Note algorithms calculate complete (incomplete) hierarchical structure communities, just single partitioning. algorithms typically membership highest modularity value returned, see also manual pages individual algorithms. communities() also name function, returns list communities, identified vertices. vertices symbolic names add.vertex.names igraph option set, graph named. Otherwise numeric vertex ids used. modularity() gives modularity score partitioning. (See modularity.igraph() details. algorithms result single partitioning, highest modularity value returned. algorithm() gives name algorithm used calculate community structure. crossing() returns logical vector, one value edge, ordered according edge ids. value TRUE iff edge connects two different communities, according (best) membership vector, returned membership(). is_hierarchical() checks whether hierarchical algorithm used find community structure. functions make sense hierarchical methods (e.g. merges(), cut_at() .dendrogram()). merges() returns merge matrix hierarchical methods. error message given, non-hierarchical method used find community structure. can check calling is_hierarchical() communities object. cut_at() cuts merge tree hierarchical community finding method, desired place returns membership vector. desired place can expressed desired number communities number merge steps make. function gives error message, called non-hierarchical method. .dendrogram() converts hierarchical community structure dendrogram object. works hierarchical methods, gives error message others. See stats::dendrogram() details. stats::.hclust() similar .dendrogram(), converts hierarchical community structure hclust object. ape::.phylo() converts hierarchical community structure phylo object, need ape package . show_trace() works (currently) communities found leading eigenvector method (cluster_leading_eigen()), returns character vector gives steps performed algorithm finding communities. code_len() defined InfoMAP method (cluster_infomap() returns code length partition. possibly call plot() function communities objects. plot graph (uses plot.igraph() internally), communities shown. default colores vertices according communities, also marks vertex groups corresponding communities. passes additional arguments plot.igraph(), please see also igraph.plotting change plot.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/communities.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Functions to deal with the result of network community detection — membership","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/communities.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functions to deal with the result of network community detection — membership","text":"","code":"karate <- make_graph(\"Zachary\") wc <- cluster_walktrap(karate) modularity(wc) #> [1] 0.3532216 membership(wc) #> [1] 1 1 2 1 5 5 5 1 2 2 5 1 1 2 3 3 5 1 3 1 3 1 3 4 4 4 3 4 2 3 2 2 3 3 plot(wc, karate)"},{"path":"https://r.igraph.org/reference/compare.html","id":null,"dir":"Reference","previous_headings":"","what":"Compares community structures using various metrics — compare","title":"Compares community structures using various metrics — compare","text":"function assesses distance two community structures.","code":""},{"path":"https://r.igraph.org/reference/compare.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compares community structures using various metrics — compare","text":"","code":"compare( comm1, comm2, method = c(\"vi\", \"nmi\", \"split.join\", \"rand\", \"adjusted.rand\") )"},{"path":"https://r.igraph.org/reference/compare.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compares community structures using various metrics — compare","text":"comm1 communities() object containing community structure; numeric vector, membership vector first community structure. membership vector contain community id vertex, numbering communities starts one. comm2 communities() object containing community structure; numeric vector, membership vector second community structure, format previous argument. method Character scalar, comparison method use. Possible values: ‘vi’ variation information (VI) metric Meila (2003), ‘nmi’ normalized mutual information measure proposed Danon et al. (2005), ‘split.join’ split-join distance can Dongen (2000), ‘rand’ Rand index Rand (1971), ‘adjusted.rand’ adjusted Rand index Hubert Arabie (1985).","code":""},{"path":"https://r.igraph.org/reference/compare.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compares community structures using various metrics — compare","text":"real number.","code":""},{"path":"https://r.igraph.org/reference/compare.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compares community structures using various metrics — compare","text":"Meila M: Comparing clusterings variation information. : Scholkopf B, Warmuth MK (eds.). Learning Theory Kernel Machines: 16th Annual Conference Computational Learning Theory 7th Kernel Workshop, COLT/Kernel 2003, Washington, DC, USA. Lecture Notes Computer Science, vol. 2777, Springer, 2003. ISBN: 978-3-540-40720-1. Danon L, Diaz-Guilera , Duch J, Arenas : Comparing community structure identification. J Stat Mech P09008, 2005. van Dongen S: Performance criteria graph clustering Markov cluster experiments. Technical Report INS-R0012, National Research Institute Mathematics Computer Science Netherlands, Amsterdam, May 2000. Rand WM: Objective criteria evaluation clustering methods. J Stat Assoc 66(336):846-850, 1971. Hubert L Arabie P: Comparing partitions. Journal Classification 2:193-218, 1985.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/compare.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compares community structures using various metrics — compare","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/compare.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compares community structures using various metrics — compare","text":"","code":"g <- make_graph(\"Zachary\") sg <- cluster_spinglass(g) le <- cluster_leading_eigen(g) compare(sg, le, method = \"rand\") #> [1] 0.9500891 compare(membership(sg), membership(le)) #> [1] 0.2765712"},{"path":"https://r.igraph.org/reference/complementer.html","id":null,"dir":"Reference","previous_headings":"","what":"Complementer of a graph — complementer","title":"Complementer of a graph — complementer","text":"complementer graph contains edges present input graph.","code":""},{"path":"https://r.igraph.org/reference/complementer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Complementer of a graph — complementer","text":"","code":"complementer(graph, loops = FALSE)"},{"path":"https://r.igraph.org/reference/complementer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Complementer of a graph — complementer","text":"graph input graph, can directed undirected. loops Logical constant, whether generate loop edges.","code":""},{"path":"https://r.igraph.org/reference/complementer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Complementer of a graph — complementer","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/complementer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Complementer of a graph — complementer","text":"complementer() creates complementer graph. edges present original graph included new graph. complementer() keeps graph vertex attriubutes, edge attributes lost.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/complementer.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Complementer of a graph — complementer","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/complementer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Complementer of a graph — complementer","text":"","code":"## Complementer of a ring g <- make_ring(10) complementer(g) #> IGRAPH 2a3a359 U--- 10 35 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from 2a3a359: #> [1] 1-- 9 1-- 8 1-- 7 1-- 6 1-- 5 1-- 4 1-- 3 2--10 2-- 9 2-- 8 2-- 7 2-- 6 #> [13] 2-- 5 2-- 4 3--10 3-- 9 3-- 8 3-- 7 3-- 6 3-- 5 4--10 4-- 9 4-- 8 4-- 7 #> [25] 4-- 6 5--10 5-- 9 5-- 8 5-- 7 6--10 6-- 9 6-- 8 7--10 7-- 9 8--10 ## A graph and its complementer give together the full graph g <- make_ring(10) gc <- complementer(g) gu <- union(g, gc) gu #> IGRAPH 8b7386d U--- 10 45 -- #> + attr: name_1 (g/c), name_2 (g/c), mutual_1 (g/l), mutual_2 (g/l), #> | circular_1 (g/l), circular_2 (g/l) #> + edges from 8b7386d: #> [1] 9--10 8--10 8-- 9 7--10 7-- 9 7-- 8 6--10 6-- 9 6-- 8 6-- 7 5--10 5-- 9 #> [13] 5-- 8 5-- 7 5-- 6 4--10 4-- 9 4-- 8 4-- 7 4-- 6 4-- 5 3--10 3-- 9 3-- 8 #> [25] 3-- 7 3-- 6 3-- 5 3-- 4 2--10 2-- 9 2-- 8 2-- 7 2-- 6 2-- 5 2-- 4 2-- 3 #> [37] 1--10 1-- 9 1-- 8 1-- 7 1-- 6 1-- 5 1-- 4 1-- 3 1-- 2 graph.isomorphic(gu, make_full_graph(vcount(g))) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/component_wise.html","id":null,"dir":"Reference","previous_headings":"","what":"Component-wise layout — component_wise","title":"Component-wise layout — component_wise","text":"layout modifier function, can used calculate layout separately component graph.","code":""},{"path":"https://r.igraph.org/reference/component_wise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Component-wise layout — component_wise","text":"","code":"component_wise(merge_method = \"dla\")"},{"path":"https://r.igraph.org/reference/component_wise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Component-wise layout — component_wise","text":"merge_method Merging algorithm, method argument merge_coords().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/component_wise.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Component-wise layout — component_wise","text":"","code":"g <- make_ring(10) + make_ring(10) g %>% add_layout_(in_circle(), component_wise()) %>% plot()"},{"path":"https://r.igraph.org/reference/components.html","id":null,"dir":"Reference","previous_headings":"","what":"Connected components of a graph — component_distribution","title":"Connected components of a graph — component_distribution","text":"Calculate maximal (weakly strongly) connected components graph","code":""},{"path":"https://r.igraph.org/reference/components.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connected components of a graph — component_distribution","text":"","code":"component_distribution(graph, cumulative = FALSE, mul.size = FALSE, ...) largest_component(graph, mode = c(\"weak\", \"strong\")) components(graph, mode = c(\"weak\", \"strong\")) is_connected(graph, mode = c(\"weak\", \"strong\")) count_components(graph, mode = c(\"weak\", \"strong\"))"},{"path":"https://r.igraph.org/reference/components.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connected components of a graph — component_distribution","text":"graph graph analyze. cumulative Logical, TRUE cumulative distirubution (relative frequency) calculated. mul.size Logical. TRUE relative frequencies multiplied cluster sizes. ... Additional attributes pass cluster, right now mode makes sense. mode Character string, either “weak” “strong”. directed graphs “weak” implies weakly, “strong” strongly connected components search. ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/components.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Connected components of a graph — component_distribution","text":"is_connected() logical constant. components() named list three components: membership numeric vector giving cluster id vertex belongs. csize numeric vector giving sizes clusters. numeric constant, number clusters. count_components() integer constant returned. component_distribution() numeric vector relative frequencies. length vector size largest component plus one. Note (currently unknown reasons) first element vector number clusters size zero, always zero. largest_component() largest connected component graph.","code":""},{"path":"https://r.igraph.org/reference/components.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Connected components of a graph — component_distribution","text":"is_connected() decides whether graph weakly strongly connected. null graph considered disconnected. components() finds maximal (weakly strongly) connected components graph. count_components() almost components() returns number clusters found instead returning actual clusters. component_distribution() creates histogram maximal connected component sizes. largest_component() returns largest connected component graph. directed graphs, optionally largest weakly strongly connected component. case tie, first component vertex ID order returned. Vertex IDs original graph retained returned graph. weakly connected components found simple breadth-first search. strongly connected components implemented two consecutive depth-first searches.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/components.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Connected components of a graph — component_distribution","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/components.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Connected components of a graph — component_distribution","text":"igraph_is_connected().","code":""},{"path":"https://r.igraph.org/reference/components.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Connected components of a graph — component_distribution","text":"","code":"g <- sample_gnp(20, 1 / 20) clu <- components(g) groups(clu) #> $`1` #> [1] 1 #> #> $`2` #> [1] 2 5 6 8 15 #> #> $`3` #> [1] 3 #> #> $`4` #> [1] 4 19 #> #> $`5` #> [1] 7 10 11 12 13 14 18 20 #> #> $`6` #> [1] 9 #> #> $`7` #> [1] 16 #> #> $`8` #> [1] 17 #> largest_component(g) #> IGRAPH 3d3725c U--- 8 7 -- Erdos-Renyi (gnp) graph #> + attr: name (g/c), type (g/c), loops (g/l), p (g/n) #> + edges from 3d3725c: #> [1] 2--3 1--4 4--5 2--6 5--6 6--7 6--8"},{"path":"https://r.igraph.org/reference/compose.html","id":null,"dir":"Reference","previous_headings":"","what":"Compose two graphs as binary relations — compose","title":"Compose two graphs as binary relations — compose","text":"Relational composition two graph.","code":""},{"path":"https://r.igraph.org/reference/compose.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compose two graphs as binary relations — compose","text":"","code":"compose(g1, g2, byname = \"auto\")"},{"path":"https://r.igraph.org/reference/compose.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compose two graphs as binary relations — compose","text":"g1 first input graph. g2 second input graph. byname logical scalar, character scalar auto. Whether perform operation based symbolic vertex names. auto, means TRUE graphs named FALSE otherwise. warning generated auto one graph, graphs named.","code":""},{"path":"https://r.igraph.org/reference/compose.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compose two graphs as binary relations — compose","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/compose.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compose two graphs as binary relations — compose","text":"compose() creates relational composition two graphs. new graph contain (,b) edge vertex c, edge (,c) included first graph (c,b) included second graph. corresponding operator %c%. function gives error one input graphs directed undirected. byname argument TRUE (auto graphs named), operation performed based symbolic vertex names. Otherwise numeric vertex ids used. compose() keeps attributes graphs. graph, vertex edge attributes copied result. attribute present multiple graphs result name clash, attribute renamed adding suffixes: _1, _2, etc. name vertex attribute treated specially operation performed based symbolic vertex names. case name must present graphs, renamed result graph. Note edge result graph corresponds two edges input, one first graph, one second. mapping injective several edges result might correspond edge first (/second) graph. edge attributes result graph updated accordingly. Also note function may generate multigraphs, one way find edges (,b) g1 (b,c) g2 edge (,c) result. See simplify() want get rid multiple edges. function may create loop edges, edges (,b) (b,) present g1 g2, respectively, (,) included result. See simplify() want get rid self-loops.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/compose.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compose two graphs as binary relations — compose","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/compose.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compose two graphs as binary relations — compose","text":"","code":"g1 <- make_ring(10) g2 <- make_star(10, mode = \"undirected\") gc <- compose(g1, g2) print_all(gc) #> IGRAPH 4e90497 U--- 10 36 -- #> + attr: name_1 (g/c), name_2 (g/c), mutual (g/l), circular (g/l), mode #> | (g/c), center (g/n) #> + edges: #> 1 -- 1 1 1 1 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 #> 2 -- 1 2 2 3 4 5 6 7 8 9 10 10 #> 3 -- 1 1 2 10 #> 4 -- 1 1 2 10 #> 5 -- 1 1 2 10 #> 6 -- 1 1 2 10 #> 7 -- 1 1 2 10 #> 8 -- 1 1 2 10 #> 9 -- 1 1 2 10 #> 10 -- 1 2 2 3 4 5 6 7 8 9 10 10 print_all(simplify(gc)) #> IGRAPH 3834dca U--- 10 24 -- #> + attr: name_1 (g/c), name_2 (g/c), mutual (g/l), circular (g/l), mode #> | (g/c), center (g/n) #> + edges: #> 1 -- 2 3 4 5 6 7 8 9 10 2 -- 1 3 4 5 6 7 8 9 10 #> 3 -- 1 2 10 4 -- 1 2 10 #> 5 -- 1 2 10 6 -- 1 2 10 #> 7 -- 1 2 10 8 -- 1 2 10 #> 9 -- 1 2 10 10 -- 1 2 3 4 5 6 7 8 9"},{"path":"https://r.igraph.org/reference/connect.neighborhood.html","id":null,"dir":"Reference","previous_headings":"","what":"Neighborhood of graph vertices — connect.neighborhood","title":"Neighborhood of graph vertices — connect.neighborhood","text":"connect.neighborhood() renamed connect() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/connect.neighborhood.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neighborhood of graph vertices — connect.neighborhood","text":"","code":"connect.neighborhood(graph, order, mode = c(\"all\", \"out\", \"in\", \"total\"))"},{"path":"https://r.igraph.org/reference/connect.neighborhood.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neighborhood of graph vertices — connect.neighborhood","text":"graph input graph. order Integer giving order neighborhood. mode Character constant, specifies use direction edges directed graph analyzed. ‘’ outgoing edges followed, vertices reachable source vertex order steps counted. ‘\"\"’ vertices source vertex reachable order steps counted. ‘\"\"’ ignores direction edges. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/consensus_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a consensus tree from several hierarchical random graph models — consensus_tree","title":"Create a consensus tree from several hierarchical random graph models — consensus_tree","text":"consensus_tree() creates consensus tree several fitted hierarchical random graph models, using phylogeny methods. hrg() argument given start set TRUE, starts sampling given HRG. Otherwise optimizes HRG log-likelihood first, samples starting optimum.","code":""},{"path":"https://r.igraph.org/reference/consensus_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a consensus tree from several hierarchical random graph models — consensus_tree","text":"","code":"consensus_tree(graph, hrg = NULL, start = FALSE, num.samples = 10000)"},{"path":"https://r.igraph.org/reference/consensus_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a consensus tree from several hierarchical random graph models — consensus_tree","text":"graph graph models fitted . hrg hierarchical random graph model, form igraphHRG object. consensus_tree() allows NULL well, HRG fitted graph first, random starting point. start Logical, whether start fitting/sampling supplied igraphHRG object, random starting point. num.samples Number samples use consensus generation missing edge prediction.","code":""},{"path":"https://r.igraph.org/reference/consensus_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a consensus tree from several hierarchical random graph models — consensus_tree","text":"consensus_tree() returns list two objects. first igraphHRGConsensus object, second igraphHRG object. igraphHRGConsensus object following members: parents vertex, id parent vertex stored, zero, vertex root vertex tree. first n vertex ids (0) refer original vertices graph, ids refer vertex groups. weights Numeric vector, counts number times given tree split occurred generated network samples, internal vertices. order parents vector.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/consensus_tree.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Create a consensus tree from several hierarchical random graph models — consensus_tree","text":"igraph_hrg_consensus().","code":""},{"path":"https://r.igraph.org/reference/console.html","id":null,"dir":"Reference","previous_headings":"","what":"The igraph console — console","title":"The igraph console — console","text":"igraph console GUI window shows currently running igraph function .","code":""},{"path":"https://r.igraph.org/reference/console.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The igraph console — console","text":"","code":"console()"},{"path":"https://r.igraph.org/reference/console.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The igraph console — console","text":"NULL, invisibly.","code":""},{"path":"https://r.igraph.org/reference/console.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The igraph console — console","text":"console can started calling console() function. stays open, user closes . Another way start set verbose igraph option “tkconsole” via igraph_options(). console (re)opens time igraph function supporting starts; close , set verbose option another value. console written Tcl/Tk required tcltk package.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/console.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The igraph console — console","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/constraint.html","id":null,"dir":"Reference","previous_headings":"","what":"Burt's constraint — constraint","title":"Burt's constraint — constraint","text":"Given graph, constraint() calculates Burt's constraint vertex.","code":""},{"path":"https://r.igraph.org/reference/constraint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Burt's constraint — constraint","text":"","code":"constraint(graph, nodes = V(graph), weights = NULL)"},{"path":"https://r.igraph.org/reference/constraint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Burt's constraint — constraint","text":"graph graph object, input graph. nodes vertices constraint calculated. Defaults vertices. weights weights edges. NULL weight edge attribute used. edge attribute edges weight.","code":""},{"path":"https://r.igraph.org/reference/constraint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Burt's constraint — constraint","text":"numeric vector constraint scores","code":""},{"path":"https://r.igraph.org/reference/constraint.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Burt's constraint — constraint","text":"Burt's constraint higher ego less, mutually stronger related (.e. redundant) contacts. Burt's measure constraint, \\(C_i\\), vertex \\(\\)'s ego network \\(V_i\\), defined directed valued graphs, $$C_i=\\sum_{j \\V_i \\setminus \\{\\}} (p_{ij}+\\sum_{q \\V_i \\setminus \\{,j\\}} p_{iq} p_{qj})^2$$ graph order (.e. number vertices) \\(N\\), proportional tie strengths defined $$p_{ij} = \\frac{a_{ij}+a_{ji}}{\\sum_{k \\V_i \\setminus \\{\\}}(a_{ik}+a_{ki})},$$ \\(a_{ij}\\) elements \\(\\) latter graph adjacency matrix. isolated vertices, constraint undefined.","code":""},{"path":"https://r.igraph.org/reference/constraint.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Burt's constraint — constraint","text":"Burt, R.S. (2004). Structural holes good ideas. American Journal Sociology 110, 349-399.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/constraint.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Burt's constraint — constraint","text":"Jeroen Bruggeman (https://sites.google.com/site/jebrug/jeroen-bruggeman-social-science) Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/constraint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Burt's constraint — constraint","text":"","code":"g <- sample_gnp(20, 5 / 20) constraint(g) #> [1] 0.2000000 0.3644141 0.2176519 0.4253472 0.3258333 0.3333333 0.3203125 #> [8] 1.0000000 0.2331250 0.3676476 0.2266705 0.2351119 0.2500000 0.3333333 #> [15] 0.3009722 0.3703819 0.4223457 0.2794232 0.3000694 0.3333333"},{"path":"https://r.igraph.org/reference/contract.html","id":null,"dir":"Reference","previous_headings":"","what":"Contract several vertices into a single one — contract","title":"Contract several vertices into a single one — contract","text":"function creates new graph, merging several vertices one. vertices new graph correspond sets vertices input graph.","code":""},{"path":"https://r.igraph.org/reference/contract.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Contract several vertices into a single one — contract","text":"","code":"contract(graph, mapping, vertex.attr.comb = igraph_opt(\"vertex.attr.comb\"))"},{"path":"https://r.igraph.org/reference/contract.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Contract several vertices into a single one — contract","text":"graph input graph, can directed undirected. mapping numeric vector specifies mapping. elements correspond vertices, element id new graph given. vertex.attr.comb Specifies combine vertex attributes new graph. Please see attribute.combination() details.","code":""},{"path":"https://r.igraph.org/reference/contract.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Contract several vertices into a single one — contract","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/contract.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Contract several vertices into a single one — contract","text":"attributes graph kept. Graph edge attributes unchanged, vertex attributes combined, according vertex.attr.comb parameter.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/contract.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Contract several vertices into a single one — contract","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/contract.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Contract several vertices into a single one — contract","text":"igraph_contract_vertices().","code":""},{"path":"https://r.igraph.org/reference/contract.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Contract several vertices into a single one — contract","text":"","code":"g <- make_ring(10) g$name <- \"Ring\" V(g)$name <- letters[1:vcount(g)] E(g)$weight <- runif(ecount(g)) g2 <- contract(g, rep(1:5, each = 2), vertex.attr.comb = toString ) ## graph and edge attributes are kept, vertex attributes are ## combined using the 'toString' function. print(g2, g = TRUE, v = TRUE, e = TRUE) #> IGRAPH 2d62e77 UNW- 5 10 -- Ring #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c), weight #> | (e/n) #> + edges from 2d62e77 (vertex names): #> [1] a, b--a, b a, b--c, d c, d--c, d c, d--e, f e, f--e, f e, f--g, h #> [7] g, h--g, h g, h--i, j i, j--i, j a, b--i, j"},{"path":"https://r.igraph.org/reference/contract.vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Contract several vertices into a single one — contract.vertices","title":"Contract several vertices into a single one — contract.vertices","text":"contract.vertices() renamed contract() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/contract.vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Contract several vertices into a single one — contract.vertices","text":"","code":"contract.vertices( graph, mapping, vertex.attr.comb = igraph_opt(\"vertex.attr.comb\") )"},{"path":"https://r.igraph.org/reference/contract.vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Contract several vertices into a single one — contract.vertices","text":"graph input graph, can directed undirected. mapping numeric vector specifies mapping. elements correspond vertices, element id new graph given. vertex.attr.comb Specifies combine vertex attributes new graph. Please see attribute.combination() details.","code":""},{"path":"https://r.igraph.org/reference/convex.hull.html","id":null,"dir":"Reference","previous_headings":"","what":"Convex hull of a set of vertices — convex.hull","title":"Convex hull of a set of vertices — convex.hull","text":"convex.hull() renamed convex_hull() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/convex.hull.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convex hull of a set of vertices — convex.hull","text":"","code":"convex.hull(data)"},{"path":"https://r.igraph.org/reference/convex.hull.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convex hull of a set of vertices — convex.hull","text":"data data points, numeric matrix two columns.","code":""},{"path":"https://r.igraph.org/reference/convex_hull.html","id":null,"dir":"Reference","previous_headings":"","what":"Convex hull of a set of vertices — convex_hull","title":"Convex hull of a set of vertices — convex_hull","text":"Calculate convex hull set points, .e. covering polygon smallest area.","code":""},{"path":"https://r.igraph.org/reference/convex_hull.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convex hull of a set of vertices — convex_hull","text":"","code":"convex_hull(data)"},{"path":"https://r.igraph.org/reference/convex_hull.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convex hull of a set of vertices — convex_hull","text":"data data points, numeric matrix two columns.","code":""},{"path":"https://r.igraph.org/reference/convex_hull.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convex hull of a set of vertices — convex_hull","text":"named list components: resverts indices input vertices constritute convex hull. rescoords coordinates corners convex hull.","code":""},{"path":"https://r.igraph.org/reference/convex_hull.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convex hull of a set of vertices — convex_hull","text":"Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein. Introduction Algorithms, Second Edition. MIT Press McGraw-Hill, 2001. ISBN 0262032937. Pages 949-955 section 33.3: Finding convex hull.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/convex_hull.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convex hull of a set of vertices — convex_hull","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/convex_hull.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Convex hull of a set of vertices — convex_hull","text":"igraph_convex_hull().","code":""},{"path":"https://r.igraph.org/reference/convex_hull.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convex hull of a set of vertices — convex_hull","text":"","code":"M <- cbind(runif(100), runif(100)) convex_hull(M) #> $resverts #> [1] 54 50 10 59 37 23 38 30 13 84 62 68 78 17 #> #> $rescoords #> [,1] [,2] #> [1,] 0.41360641 0.0004089405 #> [2,] 0.17683178 0.0637957274 #> [3,] 0.14906443 0.0863903970 #> [4,] 0.09793522 0.1299316953 #> [5,] 0.00116260 0.2829708355 #> [6,] 0.01487720 0.5181068776 #> [7,] 0.02794066 0.7152773645 #> [8,] 0.04592172 0.8429875011 #> [9,] 0.08588107 0.9472874610 #> [10,] 0.17329233 0.9745946184 #> [11,] 0.93064225 0.9971063628 #> [12,] 0.96088367 0.9796547727 #> [13,] 0.96420736 0.2522159629 #> [14,] 0.94734815 0.0134271339 #>"},{"path":"https://r.igraph.org/reference/coreness.html","id":null,"dir":"Reference","previous_headings":"","what":"K-core decomposition of graphs — coreness","title":"K-core decomposition of graphs — coreness","text":"k-core graph maximal subgraph vertex least degree k. coreness vertex k belongs k-core (k+1)-core.","code":""},{"path":"https://r.igraph.org/reference/coreness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"K-core decomposition of graphs — coreness","text":"","code":"coreness(graph, mode = c(\"all\", \"out\", \"in\"))"},{"path":"https://r.igraph.org/reference/coreness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"K-core decomposition of graphs — coreness","text":"graph input graph, can directed undirected mode type core directed graphs. Character constant, possible values: : -cores computed, : -cores computed, : corresponding undirected graph considered. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/coreness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"K-core decomposition of graphs — coreness","text":"Numeric vector integer numbers giving coreness vertex.","code":""},{"path":"https://r.igraph.org/reference/coreness.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"K-core decomposition of graphs — coreness","text":"k-core graph maximal subgraph every vertex least degree k. cores graph form layers: (k+1)-core always subgraph k-core. function calculates coreness vertex.","code":""},{"path":"https://r.igraph.org/reference/coreness.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"K-core decomposition of graphs — coreness","text":"Vladimir Batagelj, Matjaz Zaversnik: O(m) Algorithm Cores Decomposition Networks, 2002 Seidman S. B. (1983) Network structure minimum degree, Social Networks, 5, 269–287.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/coreness.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"K-core decomposition of graphs — coreness","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/coreness.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"K-core decomposition of graphs — coreness","text":"","code":"g <- make_ring(10) g <- add_edges(g, c(1, 2, 2, 3, 1, 3)) coreness(g) # small core triangle in a ring #> [1] 3 3 3 2 2 2 2 2 2 2"},{"path":"https://r.igraph.org/reference/count.multiple.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the multiple or loop edges in a graph — count.multiple","title":"Find the multiple or loop edges in a graph — count.multiple","text":"count.multiple() renamed count_multiple() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/count.multiple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the multiple or loop edges in a graph — count.multiple","text":"","code":"count.multiple(graph, eids = E(graph))"},{"path":"https://r.igraph.org/reference/count.multiple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the multiple or loop edges in a graph — count.multiple","text":"graph input graph. eids edges query restricted. default edges graph.","code":""},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of automorphisms — count_automorphisms","title":"Number of automorphisms — count_automorphisms","text":"Calculate number automorphisms graph, .e. number isomorphisms .","code":""},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of automorphisms — count_automorphisms","text":"","code":"count_automorphisms( graph, colors = NULL, sh = c(\"fm\", \"f\", \"fs\", \"fl\", \"flm\", \"fsm\") )"},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of automorphisms — count_automorphisms","text":"graph input graph, treated undirected. colors colors individual vertices graph; vertices color allowed match automorphism. omitted, igraph uses color attribute vertices, , vertex attribute, simply assumes vertices color. Pass NULL explicitly graph color vertex attribute want use . sh splitting heuristics BLISS algorithm. Possible values : ‘f’: first non-singleton cell, ‘fl’: first largest non-singleton cell, ‘fs’: first smallest non-singleton cell, ‘fm’: first maximally non-trivially connected non-singleton cell, ‘flm’: first largest maximally non-trivially connected non-singleton cell, ‘fsm’: first smallest maximally non-trivially connected non-singleton cell.","code":""},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Number of automorphisms — count_automorphisms","text":"named list following members: group_size size automorphism group input graph, string. number exact igraph compiled GMP library, approximate otherwise. nof_nodes number nodes search tree. nof_leaf_nodes number leaf nodes search tree. nof_bad_nodes Number bad nodes. nof_canupdates Number canrep updates. max_level Maximum level.","code":""},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Number of automorphisms — count_automorphisms","text":"automorphism graph permutation vertices brings graph . function calculates number automorphism graph using BLISS algorithm. See also BLISS homepage http://www.tcs.hut.fi/Software/bliss/index.html. need automorphisms , use automorphism_group() obtain compact representation automorphism group.","code":""},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Number of automorphisms — count_automorphisms","text":"Tommi Junttila Petteri Kaski: Engineering Efficient Canonical Labeling Tool Large Sparse Graphs, Proceedings Ninth Workshop Algorithm Engineering Experiments Fourth Workshop Analytic Algorithms Combinatorics. 2007.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Number of automorphisms — count_automorphisms","text":"Tommi Junttila (http://users.ics.aalto.fi/tjunttil/) BLISS Gabor Csardi csardi.gabor@gmail.com igraph glue code manual page.","code":""},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Number of automorphisms — count_automorphisms","text":"igraph_count_automorphisms().","code":""},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Number of automorphisms — count_automorphisms","text":"","code":"## A ring has n*2 automorphisms, you can \"turn\" it by 0-9 vertices ## and each of these graphs can be \"flipped\" g <- make_ring(10) count_automorphisms(g) #> $nof_nodes #> [1] 6 #> #> $nof_leaf_nodes #> [1] 4 #> #> $nof_bad_nodes #> [1] 0 #> #> $nof_canupdates #> [1] 1 #> #> $max_level #> [1] 2 #> #> $group_size #> [1] \"20\" #> ## A full graph has n! automorphisms; however, we restrict the vertex ## matching by colors, leading to only 4 automorphisms g <- make_full_graph(4) count_automorphisms(g, colors = c(1, 2, 1, 2)) #> $nof_nodes #> [1] 5 #> #> $nof_leaf_nodes #> [1] 3 #> #> $nof_bad_nodes #> [1] 0 #> #> $nof_canupdates #> [1] 1 #> #> $max_level #> [1] 2 #> #> $group_size #> [1] \"4\" #>"},{"path":"https://r.igraph.org/reference/count_isomorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","title":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","text":"Count number isomorphic mappings two graphs","code":""},{"path":"https://r.igraph.org/reference/count_isomorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","text":"","code":"count_isomorphisms(graph1, graph2, method = \"vf2\", ...)"},{"path":"https://r.igraph.org/reference/count_isomorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","text":"graph1 first graph. graph2 second graph. method Currently ‘vf2’ supported, see isomorphic() details extra arguments. ... Passed individual methods.","code":""},{"path":"https://r.igraph.org/reference/count_isomorphisms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","text":"Number isomorphic mappings two graphs.","code":""},{"path":"https://r.igraph.org/reference/count_isomorphisms.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","text":"LP Cordella, P Foggia, C Sansone, M Vento: improved algorithm matching large graphs, Proc. 3rd IAPR TC-15 Workshop Graphbased Representations Pattern Recognition, 149–159, 2001.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/count_isomorphisms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","text":"","code":"# colored graph isomorphism g1 <- make_ring(10) g2 <- make_ring(10) isomorphic(g1, g2) #> [1] TRUE V(g1)$color <- rep(1:2, length = vcount(g1)) V(g2)$color <- rep(2:1, length = vcount(g2)) # consider colors by default count_isomorphisms(g1, g2) #> [1] 10 # ignore colors count_isomorphisms(g1, g2, vertex.color1 = NULL, vertex.color2 = NULL ) #> [1] 20"},{"path":"https://r.igraph.org/reference/count_motifs.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph motifs — count_motifs","title":"Graph motifs — count_motifs","text":"Graph motifs small connected induced subgraphs well-defined structure. functions search graph various motifs.","code":""},{"path":"https://r.igraph.org/reference/count_motifs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph motifs — count_motifs","text":"","code":"count_motifs(graph, size = 3, cut.prob = rep(0, size))"},{"path":"https://r.igraph.org/reference/count_motifs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph motifs — count_motifs","text":"graph Graph object, input graph. size size motif. cut.prob Numeric vector giving probabilities search graph cut certain level. length size motif (size argument). default cuts made.","code":""},{"path":"https://r.igraph.org/reference/count_motifs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph motifs — count_motifs","text":"count_motifs() returns numeric scalar.","code":""},{"path":"https://r.igraph.org/reference/count_motifs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph motifs — count_motifs","text":"count_motifs() calculates total number motifs given size graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/count_motifs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph motifs — count_motifs","text":"","code":"g <- sample_pa(100) motifs(g, 3) #> [1] NA NA 366 NA 78 0 0 0 0 0 0 0 0 0 0 0 count_motifs(g, 3) #> [1] 444 sample_motifs(g, 3) #> [1] -9.223372e+18"},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"Count isomorphic mappings graph subgraphs another graph","code":""},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"","code":"count_subgraph_isomorphisms(pattern, target, method = c(\"lad\", \"vf2\"), ...)"},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"pattern smaller graph, might directed undirected. Undirected graphs treated directed graphs mutual edges. target bigger graph, might directed undirected. Undirected graphs treated directed graphs mutual edges. method method use. Possible values: ‘lad’, ‘vf2’. See details . ... Additional arguments, passed various methods.","code":""},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"Logical scalar, TRUE pattern isomorphic (possibly induced) subgraph target.","code":""},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":"-lad-method","dir":"Reference","previous_headings":"","what":"‘lad’ method","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"LAD algorithm Solnon, see reference . following extra arguments: domains NULL, specifies matching restrictions. must list target vertex sets, given numeric vertex ids symbolic vertex names. length list must vcount(pattern) vertex pattern gives allowed matching vertices target. Defaults NULL. induced Logical scalar, whether search induced subgraph. FALSE default. time.limit processor time limit computation, seconds. defaults Inf, means limit.","code":""},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":"-vf-method","dir":"Reference","previous_headings":"","what":"‘vf2’ method","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"method uses VF2 algorithm Cordella, Foggia et al., see references . supports vertex edge colors following extra arguments: vertex.color1, vertex.color2 Optional integer vectors giving colors vertices colored graph isomorphism. given, graph “color” vertex attribute, used. want ignore attributes, supply NULL arguments. See also examples . edge.color1, edge.color2 Optional integer vectors giving colors edges edge-colored (sub)graph isomorphism. given, graph “color” edge attribute, used. want ignore attributes, supply NULL arguments.","code":""},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"LP Cordella, P Foggia, C Sansone, M Vento: improved algorithm matching large graphs, Proc. 3rd IAPR TC-15 Workshop Graphbased Representations Pattern Recognition, 149–159, 2001. C. Solnon: AllDifferent-based Filtering Subgraph Isomorphism, Artificial Intelligence 174(12-13):850–864, 2010.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/count_triangles.html","id":null,"dir":"Reference","previous_headings":"","what":"Find triangles in graphs — triangles","title":"Find triangles in graphs — triangles","text":"Count many triangles vertex part , graph, just list triangles graph.","code":""},{"path":"https://r.igraph.org/reference/count_triangles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find triangles in graphs — triangles","text":"","code":"triangles(graph) count_triangles(graph, vids = V(graph))"},{"path":"https://r.igraph.org/reference/count_triangles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find triangles in graphs — triangles","text":"graph input graph. might directed, edge directions ignored. vids vertices query, default. might vector numeric ids, character vector symbolic vertex names named graphs.","code":""},{"path":"https://r.igraph.org/reference/count_triangles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find triangles in graphs — triangles","text":"triangles() numeric vector vertex ids, first three vertices belong first triangle found, etc. count_triangles() numeric vector, number triangles vertices queried.","code":""},{"path":"https://r.igraph.org/reference/count_triangles.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find triangles in graphs — triangles","text":"triangles() lists triangles graph. efficiency, triangles returned single vector. first three vertices belong first triangle, etc. count_triangles() counts many triangles vertex part .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/count_triangles.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find triangles in graphs — triangles","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/count_triangles.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Find triangles in graphs — triangles","text":"igraph_list_triangles(), igraph_adjacent_triangles().","code":""},{"path":"https://r.igraph.org/reference/count_triangles.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find triangles in graphs — triangles","text":"","code":"## A small graph kite <- make_graph(\"Krackhardt_Kite\") plot(kite) matrix(triangles(kite), nrow = 3) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] #> [1,] 4 4 4 4 4 4 4 4 6 6 7 #> [2,] 1 1 2 6 6 6 7 7 1 7 2 #> [3,] 2 3 5 1 3 7 2 5 3 8 5 ## Adjacenct triangles atri <- count_triangles(kite) plot(kite, vertex.label = atri) ## Always true sum(count_triangles(kite)) == length(triangles(kite)) #> [1] TRUE ## Should match, local transitivity is the ## number of adjacent triangles divided by the number ## of adjacency triples transitivity(kite, type = \"local\") #> [1] 0.6666667 0.6666667 1.0000000 0.5333333 1.0000000 0.5000000 0.5000000 #> [8] 0.3333333 0.0000000 NaN count_triangles(kite) / (degree(kite) * (degree(kite) - 1) / 2) #> [1] 0.6666667 0.6666667 1.0000000 0.5333333 1.0000000 0.5000000 0.5000000 #> [8] 0.3333333 0.0000000 NaN"},{"path":"https://r.igraph.org/reference/create.communities.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a communities object. — create.communities","title":"Creates a communities object. — create.communities","text":"create.communities() renamed make_clusters() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/create.communities.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a communities object. — create.communities","text":"","code":"create.communities( graph, membership = NULL, algorithm = NULL, merges = NULL, modularity = TRUE )"},{"path":"https://r.igraph.org/reference/create.communities.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a communities object. — create.communities","text":"graph graph community structure. membership membership vector community structure, numeric vector denoting id community vertex. might NULL hierarchical community structures. algorithm Character string, algorithm generated community structure, can arbitrary. merges merge matrix, hierarchical community structures (NULL otherwise. modularity Modularity value community structure. TRUE membership vector available, modularity values calculated automatically.","code":""},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":null,"dir":"Reference","previous_headings":"","what":"Optimal edge curvature when plotting graphs — curve_multiple","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"graphs multiple edges, drawing straight lines show plotting graphs; top . One solution bend edges, diffenent curvature, visible.","code":""},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"","code":"curve_multiple(graph, start = 0.5)"},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"graph input graph. start curvature two extreme edges. edges curvature -start start, spaced equally.","code":""},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"numeric vector, length number edges graph.","code":""},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"curve_multiple() calculates optimal edge.curved vector plotting graph multiple edges, edges visible.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"","code":"g <- make_graph(c( 0, 1, 1, 0, 1, 2, 1, 3, 1, 3, 1, 3, 2, 3, 2, 3, 2, 3, 2, 3, 0, 1 ) + 1) curve_multiple(g) #> [1] -0.5000000 0.0000000 0.0000000 -0.5000000 0.0000000 0.5000000 #> [7] -0.5000000 -0.1666667 0.1666667 0.5000000 0.5000000 set.seed(42) plot(g)"},{"path":"https://r.igraph.org/reference/cutat.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to deal with the result of network community detection — cutat","title":"Functions to deal with the result of network community detection — cutat","text":"cutat() renamed cut_at() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/cutat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to deal with the result of network community detection — cutat","text":"","code":"cutat(communities, no, steps)"},{"path":"https://r.igraph.org/reference/cutat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to deal with the result of network community detection — cutat","text":"Integer scalar, desired number communities. low two high, error message given. Exactly one steps must supplied. steps number merge operations perform produce communities. Exactly one steps must supplied.","code":""},{"path":"https://r.igraph.org/reference/decompose.graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Decompose a graph into components — decompose.graph","title":"Decompose a graph into components — decompose.graph","text":"decompose.graph() renamed decompose() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/decompose.graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decompose a graph into components — decompose.graph","text":"","code":"decompose.graph( graph, mode = c(\"weak\", \"strong\"), max.comps = NA, min.vertices = 0 )"},{"path":"https://r.igraph.org/reference/decompose.graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decompose a graph into components — decompose.graph","text":"graph original graph. mode Character constant giving type components, wither weak weakly connected components strong strongly connected components. max.comps maximum number components return. first max.comps components returned (hold least min.vertices vertices, see next parameter), others ignored. Supply NA want limit number components. min.vertices minimum number vertices component contain order place result list. E.g. supply 2 ignore isolate vertices.","code":""},{"path":"https://r.igraph.org/reference/decompose.html","id":null,"dir":"Reference","previous_headings":"","what":"Decompose a graph into components — decompose","title":"Decompose a graph into components — decompose","text":"Creates separate graph connected component graph.","code":""},{"path":"https://r.igraph.org/reference/decompose.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decompose a graph into components — decompose","text":"","code":"decompose(graph, mode = c(\"weak\", \"strong\"), max.comps = NA, min.vertices = 0)"},{"path":"https://r.igraph.org/reference/decompose.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decompose a graph into components — decompose","text":"graph original graph. mode Character constant giving type components, wither weak weakly connected components strong strongly connected components. max.comps maximum number components return. first max.comps components returned (hold least min.vertices vertices, see next parameter), others ignored. Supply NA want limit number components. min.vertices minimum number vertices component contain order place result list. E.g. supply 2 ignore isolate vertices.","code":""},{"path":"https://r.igraph.org/reference/decompose.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decompose a graph into components — decompose","text":"list graph objects.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/decompose.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Decompose a graph into components — decompose","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/decompose.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decompose a graph into components — decompose","text":"","code":"# the diameter of each component in a random graph g <- sample_gnp(1000, 1 / 1000) components <- decompose(g, min.vertices = 2) sapply(components, diameter) #> [1] 1 2 1 15 11 14 1 4 20 3 1 8 5 5 14 1 2 8 6 2 4 3 2 4 2 #> [26] 6 15 1 4 1 1 2 1 6 4 5 1 1 7 2 1 2 1 1 1 1 1 5 1 2 #> [51] 7 1 2 1 1 5 1 6 3 1 1 7 2 2 1 2 3 3 1 1 1 1 4 3 1 #> [76] 1 3 4 2 1 1 4 1 2 4 1 1 2 2 2 5 1 2 1 1 1 1 2 1 2 #> [101] 1 1 1 1 2 1 3 1 1 1 1 1 1 2 1 1 2 1 1 1 1 3 1 1 1 #> [126] 1 2 1 1 1 2 1 1 1"},{"path":"https://r.igraph.org/reference/degree.distribution.html","id":null,"dir":"Reference","previous_headings":"","what":"Degree and degree distribution of the vertices — degree.distribution","title":"Degree and degree distribution of the vertices — degree.distribution","text":"degree.distribution() renamed degree_distribution() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/degree.distribution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Degree and degree distribution of the vertices — degree.distribution","text":"","code":"degree.distribution(graph, cumulative = FALSE, ...)"},{"path":"https://r.igraph.org/reference/degree.distribution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Degree and degree distribution of the vertices — degree.distribution","text":"graph graph analyze. cumulative Logical; whether cumulative degree distribution calculated. ... dots future extensions must empty.","code":""},{"path":"https://r.igraph.org/reference/degree.html","id":null,"dir":"Reference","previous_headings":"","what":"Degree and degree distribution of the vertices — degree","title":"Degree and degree distribution of the vertices — degree","text":"degree vertex basic structural property, number adjacent edges.","code":""},{"path":"https://r.igraph.org/reference/degree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Degree and degree distribution of the vertices — degree","text":"","code":"degree( graph, v = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), loops = TRUE, normalized = FALSE ) max_degree( graph, ..., v = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), loops = TRUE ) degree_distribution(graph, cumulative = FALSE, ...)"},{"path":"https://r.igraph.org/reference/degree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Degree and degree distribution of the vertices — degree","text":"graph graph analyze. v ids vertices degree calculated. mode Character string, “” -degree, “” -degree “total” sum two. undirected graphs argument ignored. “” synonym “total”. loops Logical; whether loop edges also counted. normalized Logical scalar, whether normalize degree. TRUE result divided \\(n-1\\), \\(n\\) number vertices graph. ... dots future extensions must empty. cumulative Logical; whether cumulative degree distribution calculated.","code":""},{"path":"https://r.igraph.org/reference/degree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Degree and degree distribution of the vertices — degree","text":"degree() numeric vector length argument v. degree_distribution() numeric vector length maximum degree plus one. first element relative frequency zero degree vertices, second vertices degree one, etc. max_degree(), largest degree graph. vertices selected, input null graph, zero returned smallest possible degree.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/degree.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Degree and degree distribution of the vertices — degree","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/degree.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Degree and degree distribution of the vertices — degree","text":"igraph_maxdegree().","code":""},{"path":"https://r.igraph.org/reference/degree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Degree and degree distribution of the vertices — degree","text":"","code":"g <- make_ring(10) degree(g) #> [1] 2 2 2 2 2 2 2 2 2 2 g2 <- sample_gnp(1000, 10 / 1000) max_degree(g2) #> [1] 22 degree_distribution(g2) #> [1] 0.001 0.000 0.002 0.005 0.026 0.038 0.058 0.101 0.118 0.117 0.118 0.113 #> [13] 0.098 0.081 0.057 0.027 0.019 0.010 0.004 0.004 0.000 0.002 0.001"},{"path":"https://r.igraph.org/reference/degree.sequence.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs with a given degree sequence — degree.sequence.game","title":"Generate random graphs with a given degree sequence — degree.sequence.game","text":"degree.sequence.game() renamed sample_degseq() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/degree.sequence.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs with a given degree sequence — degree.sequence.game","text":"","code":"degree.sequence.game( out.deg, in.deg = NULL, method = c(\"simple\", \"vl\", \"simple.no.multiple\", \"simple.no.multiple.uniform\") )"},{"path":"https://r.igraph.org/reference/degree.sequence.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs with a given degree sequence — degree.sequence.game","text":".deg Numeric vector, sequence degrees (undirected graphs) -degrees (directed graphs). undirected graphs sum even. directed graphs sum sum .deg. .deg directed graph, -degree sequence. default NULL undirected graph created. method Character, method generating graph. See Details.","code":""},{"path":"https://r.igraph.org/reference/delete.edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete edges from a graph — delete.edges","title":"Delete edges from a graph — delete.edges","text":"delete.edges() renamed delete_edges() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/delete.edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete edges from a graph — delete.edges","text":"","code":"delete.edges(graph, edges)"},{"path":"https://r.igraph.org/reference/delete.edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete edges from a graph — delete.edges","text":"graph input graph. edges edges remove, specified edge sequence. Typically either numeric vector containing edge IDs, character vector containing IDs names source target vertices, separated |","code":""},{"path":"https://r.igraph.org/reference/delete.vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete vertices from a graph — delete.vertices","title":"Delete vertices from a graph — delete.vertices","text":"delete.vertices() renamed delete_vertices() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/delete.vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete vertices from a graph — delete.vertices","text":"","code":"delete.vertices(graph, v)"},{"path":"https://r.igraph.org/reference/delete.vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete vertices from a graph — delete.vertices","text":"graph input graph. v vertices remove, vertex sequence.","code":""},{"path":"https://r.igraph.org/reference/delete_edge_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete an edge attribute — delete_edge_attr","title":"Delete an edge attribute — delete_edge_attr","text":"Delete edge attribute","code":""},{"path":"https://r.igraph.org/reference/delete_edge_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete an edge attribute — delete_edge_attr","text":"","code":"delete_edge_attr(graph, name)"},{"path":"https://r.igraph.org/reference/delete_edge_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete an edge attribute — delete_edge_attr","text":"graph graph name name edge attribute delete.","code":""},{"path":"https://r.igraph.org/reference/delete_edge_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete an edge attribute — delete_edge_attr","text":"graph, specified edge attribute removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/delete_edge_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delete an edge attribute — delete_edge_attr","text":"","code":"g <- make_ring(10) %>% set_edge_attr(\"name\", value = LETTERS[1:10]) edge_attr_names(g) #> [1] \"name\" g2 <- delete_edge_attr(g, \"name\") edge_attr_names(g2) #> character(0)"},{"path":"https://r.igraph.org/reference/delete_edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete edges from a graph — delete_edges","title":"Delete edges from a graph — delete_edges","text":"Delete edges graph","code":""},{"path":"https://r.igraph.org/reference/delete_edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete edges from a graph — delete_edges","text":"","code":"delete_edges(graph, edges)"},{"path":"https://r.igraph.org/reference/delete_edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete edges from a graph — delete_edges","text":"graph input graph. edges edges remove, specified edge sequence. Typically either numeric vector containing edge IDs, character vector containing IDs names source target vertices, separated |","code":""},{"path":"https://r.igraph.org/reference/delete_edges.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete edges from a graph — delete_edges","text":"graph, edges removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/delete_edges.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delete edges from a graph — delete_edges","text":"","code":"g <- make_ring(10) %>% delete_edges(seq(1, 9, by = 2)) g #> IGRAPH f3e4b19 U--- 10 5 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from f3e4b19: #> [1] 2-- 3 4-- 5 6-- 7 8-- 9 1--10 g <- make_ring(10) %>% delete_edges(\"10|1\") g #> IGRAPH 39e5d70 U--- 10 9 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from 39e5d70: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 g <- make_ring(5) g <- delete_edges(g, get_edge_ids(g, c(1, 5, 4, 5))) g #> IGRAPH c875cf5 U--- 5 3 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from c875cf5: #> [1] 1--2 2--3 3--4"},{"path":"https://r.igraph.org/reference/delete_graph_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete a graph attribute — delete_graph_attr","title":"Delete a graph attribute — delete_graph_attr","text":"Delete graph attribute","code":""},{"path":"https://r.igraph.org/reference/delete_graph_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete a graph attribute — delete_graph_attr","text":"","code":"delete_graph_attr(graph, name)"},{"path":"https://r.igraph.org/reference/delete_graph_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete a graph attribute — delete_graph_attr","text":"graph graph. name Name attribute delete.","code":""},{"path":"https://r.igraph.org/reference/delete_graph_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete a graph attribute — delete_graph_attr","text":"graph, specified attribute removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/delete_graph_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delete a graph attribute — delete_graph_attr","text":"","code":"g <- make_ring(10) graph_attr_names(g) #> [1] \"name\" \"mutual\" \"circular\" g2 <- delete_graph_attr(g, \"name\") graph_attr_names(g2) #> [1] \"mutual\" \"circular\""},{"path":"https://r.igraph.org/reference/delete_vertex_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete a vertex attribute — delete_vertex_attr","title":"Delete a vertex attribute — delete_vertex_attr","text":"Delete vertex attribute","code":""},{"path":"https://r.igraph.org/reference/delete_vertex_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete a vertex attribute — delete_vertex_attr","text":"","code":"delete_vertex_attr(graph, name)"},{"path":"https://r.igraph.org/reference/delete_vertex_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete a vertex attribute — delete_vertex_attr","text":"graph graph name name vertex attribute delete.","code":""},{"path":"https://r.igraph.org/reference/delete_vertex_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete a vertex attribute — delete_vertex_attr","text":"graph, specified vertex attribute removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/delete_vertex_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delete a vertex attribute — delete_vertex_attr","text":"","code":"g <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) vertex_attr_names(g) #> [1] \"name\" g2 <- delete_vertex_attr(g, \"name\") vertex_attr_names(g2) #> character(0)"},{"path":"https://r.igraph.org/reference/delete_vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete vertices from a graph — delete_vertices","title":"Delete vertices from a graph — delete_vertices","text":"Delete vertices graph","code":""},{"path":"https://r.igraph.org/reference/delete_vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete vertices from a graph — delete_vertices","text":"","code":"delete_vertices(graph, v)"},{"path":"https://r.igraph.org/reference/delete_vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete vertices from a graph — delete_vertices","text":"graph input graph. v vertices remove, vertex sequence.","code":""},{"path":"https://r.igraph.org/reference/delete_vertices.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete vertices from a graph — delete_vertices","text":"graph, vertices removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/delete_vertices.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delete vertices from a graph — delete_vertices","text":"","code":"g <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) g #> IGRAPH a0e5d73 UN-- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from a0e5d73 (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J V(g) #> + 10/10 vertices, named, from a0e5d73: #> [1] A B C D E F G H I J g2 <- delete_vertices(g, c(1, 5)) %>% delete_vertices(\"B\") g2 #> IGRAPH 2e3e3eb UN-- 7 5 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from 2e3e3eb (vertex names): #> [1] C--D F--G G--H H--I I--J V(g2) #> + 7/7 vertices, named, from 2e3e3eb: #> [1] C D F G H I J"},{"path":"https://r.igraph.org/reference/dendPlot.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure dendrogram plots — dendPlot","title":"Community structure dendrogram plots — dendPlot","text":"dendPlot() renamed plot_dendrogram() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/dendPlot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure dendrogram plots — dendPlot","text":"","code":"dendPlot(x, mode = igraph_opt(\"dend.plot.type\"), ...)"},{"path":"https://r.igraph.org/reference/dendPlot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure dendrogram plots — dendPlot","text":"x object containing community structure graph. See communities() details. mode dendrogram plotting function use. See details . ... Additional arguments supply dendrogram plotting function.","code":""},{"path":"https://r.igraph.org/reference/dfs.html","id":null,"dir":"Reference","previous_headings":"","what":"Depth-first search — dfs","title":"Depth-first search — dfs","text":"Depth-first search algorithm traverse graph. starts root vertex tries go quickly far possible.","code":""},{"path":"https://r.igraph.org/reference/dfs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Depth-first search — dfs","text":"","code":"dfs( graph, root, mode = c(\"out\", \"in\", \"all\", \"total\"), unreachable = TRUE, order = TRUE, order.out = FALSE, father = FALSE, dist = FALSE, in.callback = NULL, out.callback = NULL, extra = NULL, rho = parent.frame(), neimode = deprecated() )"},{"path":"https://r.igraph.org/reference/dfs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Depth-first search — dfs","text":"graph input graph. root single root vertex start search . mode directed graphs specifies type edges follow. ‘’ follows outgoing, ‘’ incoming edges. ‘’ ignores edge directions completely. ‘total’ synonym ‘’. argument ignored undirected graphs. unreachable Logical scalar, whether search visit vertices unreachable given root vertex (vertices). TRUE, additional searches performed vertices visited. order Logical scalar, whether return DFS ordering vertices. order.Logical scalar, whether return ordering based leaving subtree vertex. father Logical scalar, whether return father vertices. dist Logical scalar, whether return distance root search tree. .callback NULL, must callback function. called whenever vertex visited. See details . .callback NULL, must callback function. called whenever subtree vertex completed algorithm. See details . extra Additional argument supply callback function. rho environment callback function evaluated. neimode argument deprecated igraph 1.3.0; use mode instead.","code":""},{"path":"https://r.igraph.org/reference/dfs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Depth-first search — dfs","text":"named list following entries: root Numeric scalar. root vertex used starting point search. neimode Character scalar. mode argument function call. Note undirected graphs always ‘’, irrespectively supplied value. order Numeric vector. vertex ids, order visited search. order.Numeric vector, vertex ids, order completion subtree. father Numeric vector. father vertex, .e. vertex discovered . dist Numeric vector, vertex distance root search tree. Note order, order., father, dist might NULL corresponding argument FALSE, .e. calculation requested.","code":""},{"path":"https://r.igraph.org/reference/dfs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Depth-first search — dfs","text":"callback functions must following arguments: graph input graph passed callback function . data named numeric vector, following entries: ‘vid’, vertex just visited ‘dist’, distance root search tree. extra extra argument. callback must return FALSE continue search TRUE terminate . See examples use callback functions.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/dfs.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Depth-first search — dfs","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/dfs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Depth-first search — dfs","text":"","code":"## A graph with two separate trees dfs(make_tree(10) %du% make_tree(10), root = 1, \"out\", TRUE, TRUE, TRUE, TRUE ) #> $root #> [1] 1 #> #> $mode #> [1] \"out\" #> #> $order #> + 20/20 vertices, from ddaa049: #> [1] 1 2 4 8 9 5 10 3 6 7 11 12 14 18 19 15 20 13 16 17 #> #> $order.out #> + 20/20 vertices, from ddaa049: #> [1] 8 9 4 10 5 2 6 7 3 1 18 19 14 20 15 12 16 17 13 11 #> #> $father #> + 20/20 vertices, from ddaa049: #> [1] NA 1 1 2 2 3 3 4 4 5 NA 11 11 12 12 13 13 14 14 15 #> #> $dist #> NULL #> #> $neimode #> [1] \"out\" #> ## How to use a callback f.in <- function(graph, data, extra) { cat(\"in:\", paste(collapse = \", \", data), \"\\n\") FALSE } f.out <- function(graph, data, extra) { cat(\"out:\", paste(collapse = \", \", data), \"\\n\") FALSE } tmp <- dfs(make_tree(10), root = 1, \"out\", in.callback = f.in, out.callback = f.out ) #> in: 1, 0 #> in: 2, 1 #> in: 4, 2 #> in: 8, 3 #> out: 8, 2 #> in: 9, 3 #> out: 9, 2 #> out: 4, 1 #> in: 5, 2 #> in: 10, 3 #> out: 10, 2 #> out: 5, 1 #> out: 2, 0 #> in: 3, 1 #> in: 6, 2 #> out: 6, 1 #> in: 7, 2 #> out: 7, 1 #> out: 3, 0 #> out: 1, -1 ## Terminate after the first component, using a callback f.out <- function(graph, data, extra) { data[\"vid\"] == 1 } tmp <- dfs(make_tree(10) %du% make_tree(10), root = 1, out.callback = f.out )"},{"path":"https://r.igraph.org/reference/diameter.html","id":null,"dir":"Reference","previous_headings":"","what":"Diameter of a graph — diameter","title":"Diameter of a graph — diameter","text":"diameter graph length longest geodesic.","code":""},{"path":"https://r.igraph.org/reference/diameter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Diameter of a graph — diameter","text":"","code":"diameter(graph, directed = TRUE, unconnected = TRUE, weights = NULL) get_diameter(graph, directed = TRUE, unconnected = TRUE, weights = NULL) farthest_vertices(graph, directed = TRUE, unconnected = TRUE, weights = NULL)"},{"path":"https://r.igraph.org/reference/diameter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Diameter of a graph — diameter","text":"graph graph analyze. directed Logical, whether directed undirected paths considered. ignored undirected graphs. unconnected Logical, graph unconnected. FALSE, function return number one larger largest possible diameter, always number vertices. TRUE, diameters connected components calculated largest one returned. weights Optional positive weight vector calculating weighted distances. graph weight edge attribute, used default.","code":""},{"path":"https://r.igraph.org/reference/diameter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Diameter of a graph — diameter","text":"numeric constant diameter(), numeric vector get_diameter(). farthest_vertices() returns list two entries: vertices two vertices farthest. distance distance.","code":""},{"path":"https://r.igraph.org/reference/diameter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Diameter of a graph — diameter","text":"diameter calculated using breadth-first search like method. get_diameter() returns path actual diameter. many shortest paths length diameter, returns first one found. farthest_vertices() returns two vertex ids, vertices connected diameter path.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/diameter.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Diameter of a graph — diameter","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/diameter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Diameter of a graph — diameter","text":"","code":"g <- make_ring(10) g2 <- delete_edges(g, c(1, 2, 1, 10)) diameter(g2, unconnected = TRUE) #> [1] 7 diameter(g2, unconnected = FALSE) #> [1] Inf ## Weighted diameter set.seed(1) g <- make_ring(10) E(g)$weight <- sample(seq_len(ecount(g))) diameter(g) #> [1] 27 get_diameter(g) #> + 5/10 vertices, from 1a8c42b: #> [1] 1 10 9 8 7 diameter(g, weights = NA) #> [1] 5 get_diameter(g, weights = NA) #> + 6/10 vertices, from 1a8c42b: #> [1] 1 2 3 4 5 6"},{"path":"https://r.igraph.org/reference/difference.html","id":null,"dir":"Reference","previous_headings":"","what":"Difference of two sets — difference","title":"Difference of two sets — difference","text":"S3 generic function. See methods(\"difference\") actual implementations various S3 classes. Initially implemented igraph graphs (difference edges two graphs), igraph vertex edge sequences. See difference.igraph(), difference.igraph.vs().","code":""},{"path":"https://r.igraph.org/reference/difference.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Difference of two sets — difference","text":"","code":"difference(...)"},{"path":"https://r.igraph.org/reference/difference.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Difference of two sets — difference","text":"... Arguments, number interpretation depends function implements difference().","code":""},{"path":"https://r.igraph.org/reference/difference.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Difference of two sets — difference","text":"Depends function implements method.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/difference.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Difference of edge sequences — difference.igraph.es","title":"Difference of edge sequences — difference.igraph.es","text":"Difference edge sequences","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Difference of edge sequences — difference.igraph.es","text":"","code":"# S3 method for class 'igraph.es' difference(big, small, ...)"},{"path":"https://r.igraph.org/reference/difference.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Difference of edge sequences — difference.igraph.es","text":"big ‘big’ edge sequence. small ‘small’ edge sequence. ... Ignored, included S3 signature compatibility.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Difference of edge sequences — difference.igraph.es","text":"edge sequence contains edges part big, part small.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.es.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Difference of edge sequences — difference.igraph.es","text":"must belong graph. Note function ‘set’ semantics multiplicity edges lost result.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/difference.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Difference of edge sequences — difference.igraph.es","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) difference(V(g), V(g)[6:10]) #> + 5/10 vertices, named, from 5e6c26e: #> [1] A B C D E"},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Difference of graphs — difference.igraph","title":"Difference of graphs — difference.igraph","text":"difference two graphs created.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Difference of graphs — difference.igraph","text":"","code":"# S3 method for class 'igraph' difference(big, small, byname = \"auto\", ...)"},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Difference of graphs — difference.igraph","text":"big left hand side argument minus operator. directed undirected graph. small right hand side argument minus operator. directed ot undirected graph. byname logical scalar, character scalar auto. Whether perform operation based symbolic vertex names. auto, means TRUE graphs named FALSE otherwise. warning generated auto one graph, graphs named. ... Ignored, included S3 compatibility.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Difference of graphs — difference.igraph","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Difference of graphs — difference.igraph","text":"difference() creates difference two graphs. edges present first graph second included new graph. corresponding operator %m%. byname argument TRUE (auto graphs named), operation performed based symbolic vertex names. Otherwise numeric vertex ids used. difference() keeps attributes (graph, vertex edge) first graph. Note big small must directed undirected, otherwise error message given.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Difference of graphs — difference.igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Difference of graphs — difference.igraph","text":"","code":"## Create a wheel graph wheel <- union( make_ring(10), make_star(11, center = 11, mode = \"undirected\") ) V(wheel)$name <- letters[seq_len(vcount(wheel))] ## Subtract a star graph from it sstar <- make_star(6, center = 6, mode = \"undirected\") V(sstar)$name <- letters[c(1, 3, 5, 7, 9, 11)] G <- wheel %m% sstar print_all(G) #> IGRAPH 6df2a8f UN-- 11 15 -- #> + attr: name_1 (g/c), name_2 (g/c), mutual (g/l), circular (g/l), mode #> | (g/c), center (g/n), name (v/c) #> + edges (vertex names): #> a -- b, j #> b -- a, c, k #> c -- b, d #> d -- c, e, k #> e -- d, f #> f -- e, g, k #> g -- f, h #> h -- g, i, k #> i -- h, j #> j -- a, i, k #> k -- b, d, f, h, j plot(G, layout = layout_nicely(wheel))"},{"path":"https://r.igraph.org/reference/difference.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Difference of vertex sequences — difference.igraph.vs","title":"Difference of vertex sequences — difference.igraph.vs","text":"Difference vertex sequences","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Difference of vertex sequences — difference.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' difference(big, small, ...)"},{"path":"https://r.igraph.org/reference/difference.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Difference of vertex sequences — difference.igraph.vs","text":"big ‘big’ vertex sequence. small ‘small’ vertex sequence. ... Ignored, included S3 signature compatibility.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Difference of vertex sequences — difference.igraph.vs","text":"vertex sequence contains vertices part big, part small.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.vs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Difference of vertex sequences — difference.igraph.vs","text":"must belong graph. Note function ‘set’ semantics multiplicity vertices lost result.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/difference.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Difference of vertex sequences — difference.igraph.vs","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) difference(V(g), V(g)[6:10]) #> + 5/10 vertices, named, from 429e274: #> [1] A B C D E"},{"path":"https://r.igraph.org/reference/dim_select.html","id":null,"dir":"Reference","previous_headings":"","what":"Dimensionality selection for singular values using profile likelihood. — dim_select","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"Select number significant singular values, finding ‘elbow’ scree plot, principled way.","code":""},{"path":"https://r.igraph.org/reference/dim_select.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"","code":"dim_select(sv)"},{"path":"https://r.igraph.org/reference/dim_select.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"sv numeric vector, ordered singular values.","code":""},{"path":"https://r.igraph.org/reference/dim_select.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"numeric scalar, estimate \\(d\\).","code":""},{"path":"https://r.igraph.org/reference/dim_select.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"input function numeric vector contains measure ‘importance’ dimension. spectral embedding, singular values adjacency matrix. singular values assumed generated Gaussian mixture distribution two components different means variance. dimensionality \\(d\\) chosen maximize likelihood \\(d\\) largest singular values assigned one component mixture rest singular values assigned component. function can also used general separation problem, assume left right vector coming two Normal distributions, different means, want know border. See examples .","code":""},{"path":"https://r.igraph.org/reference/dim_select.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"M. Zhu, . Ghodsi (2006). Automatic dimensionality selection scree plot via use profile likelihood. Computational Statistics Data Analysis, Vol. 51, 918–930.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/dim_select.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/dim_select.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"igraph_dim_select().","code":""},{"path":"https://r.igraph.org/reference/dim_select.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"","code":"# Generate the two groups of singular values with # Gaussian mixture of two components that have different means sing.vals <- c(rnorm(10, mean = 1, sd = 1), rnorm(10, mean = 3, sd = 1)) dim.chosen <- dim_select(sing.vals) dim.chosen #> [1] 9 # Sample random vectors with multivariate normal distribution # and normalize to unit length lpvs <- matrix(rnorm(200), 10, 20) lpvs <- apply(lpvs, 2, function(x) { (abs(x) / sqrt(sum(x^2))) }) RDP.graph <- sample_dot_product(lpvs) dim_select(embed_adjacency_matrix(RDP.graph, 10)$D) #> [1] 1 # Sample random vectors with the Dirichlet distribution lpvs.dir <- sample_dirichlet(n = 20, rep(1, 10)) RDP.graph.2 <- sample_dot_product(lpvs.dir) dim_select(embed_adjacency_matrix(RDP.graph.2, 10)$D) #> [1] 1 # Sample random vectors from hypersphere with radius 1. lpvs.sph <- sample_sphere_surface(dim = 10, n = 20, radius = 1) RDP.graph.3 <- sample_dot_product(lpvs.sph) dim_select(embed_adjacency_matrix(RDP.graph.3, 10)$D) #> [1] 1"},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":null,"dir":"Reference","previous_headings":"","what":"Disjoint union of graphs — disjoint_union","title":"Disjoint union of graphs — disjoint_union","text":"union two graphs created. graphs assumed disjoint vertex sets.","code":""},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Disjoint union of graphs — disjoint_union","text":"","code":"disjoint_union(...) x %du% y"},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Disjoint union of graphs — disjoint_union","text":"... Graph objects lists graph objects. x, y Graph objects.","code":""},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Disjoint union of graphs — disjoint_union","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Disjoint union of graphs — disjoint_union","text":"disjoint_union() creates union two disjoint graphs. Thus first vertices second, third, etc. graphs relabeled completely disjoint graphs. simple union created. function can also used via %du% operator. graph.disjont.union handles graph, vertex edge attributes. particular, merges vertex edge attributes using basic c() function. graphs lack vertex/edge attribute, corresponding values new graph set NA. Graph attributes simply copied result. result name clash, renamed adding suffixes: _1, _2, etc. Note graphs vertex names (.e. name vertex attribute), concatenated vertex names might non-unique result. warning given happens. error generated input graphs directed others undirected.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Disjoint union of graphs — disjoint_union","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Disjoint union of graphs — disjoint_union","text":"","code":"## A star and a ring g1 <- make_star(10, mode = \"undirected\") V(g1)$name <- letters[1:10] g2 <- make_ring(10) V(g2)$name <- letters[11:20] print_all(g1 %du% g2) #> IGRAPH 0f9a6f9 UN-- 20 19 -- #> + attr: name_1 (g/c), name_2 (g/c), mode (g/c), center (g/n), mutual #> | (g/l), circular (g/l), name (v/c) #> + edges from 0f9a6f9 (vertex names): #> [1] a--b a--c a--d a--e a--f a--g a--h a--i a--j k--l l--m m--n n--o o--p p--q #> [16] q--r r--s s--t k--t"},{"path":"https://r.igraph.org/reference/distances.html","id":null,"dir":"Reference","previous_headings":"","what":"Shortest (directed or undirected) paths between vertices — distance_table","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"distances() calculates length shortest paths vertices network. shortest_paths() calculates one shortest path (path , just length) given vertex.","code":""},{"path":"https://r.igraph.org/reference/distances.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"","code":"distance_table(graph, directed = TRUE) mean_distance( graph, weights = NULL, directed = TRUE, unconnected = TRUE, details = FALSE ) distances( graph, v = V(graph), to = V(graph), mode = c(\"all\", \"out\", \"in\"), weights = NULL, algorithm = c(\"automatic\", \"unweighted\", \"dijkstra\", \"bellman-ford\", \"johnson\", \"floyd-warshall\") ) shortest_paths( graph, from, to = V(graph), mode = c(\"out\", \"all\", \"in\"), weights = NULL, output = c(\"vpath\", \"epath\", \"both\"), predecessors = FALSE, inbound.edges = FALSE, algorithm = c(\"automatic\", \"unweighted\", \"dijkstra\", \"bellman-ford\") ) all_shortest_paths( graph, from, to = V(graph), mode = c(\"out\", \"all\", \"in\"), weights = NULL )"},{"path":"https://r.igraph.org/reference/distances.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"graph graph work . directed Whether consider directed paths directed graphs, argument ignored undirected graphs. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). weighted graph, length path sum weights constituent edges. unconnected graph unconnected (strongly connected directed paths considered). TRUE, lengths existing paths considered averaged; FALSE, length missing paths considered infinite length, making mean distance infinite well. details Whether provide additional details result. Functions accepting argument (like mean_distance()) return additional information like number disconnected vertex pairs result parameter set TRUE. v Numeric vector, vertices shortest paths calculated. Numeric vector, vertices shortest paths calculated. default includes vertices. Note distances() every vertex must included . (required shortest_paths(). mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, graph treated undirected, .e. edge directions taken account. argument ignored undirected graphs. algorithm algorithm use calculation. default igraph tries select fastest suitable algorithm. weights, unweighted breadth-first search used, otherwise weights positive, Dijkstra's algorithm used. negative weights calculation 100 sources, Johnson's algorithm used. Otherwise Bellman-Ford algorithm used. can override igraph's choice explicitly giving parameter. Note igraph C core might still override choice obvious cases, .e. edge weights, unweighted algorithm used, regardless argument. Numeric constant, vertex shortest paths calculated. Note right now vector vertex ids, single vertex. output Character scalar, defines report shortest paths. “vpath” means vertices along paths reported, form used prior igraph version 0.6. “epath” means edges along paths reported. “” means forms returned, named list components “vpath” “epath”. predecessors Logical scalar, whether return predecessor vertex vertex. predecessor vertex tree vertex vertex reached. predecessor start vertex (argument) definition. predecessor zero, means given vertex reached source search. Note search terminates vertices reached. inbound.edges Logical scalar, whether return inbound edge vertex. inbound edge vertex tree edge via vertex reached. start vertex vertices reached search zero corresponding entry vector. Note search terminates vertices reached.","code":""},{"path":"https://r.igraph.org/reference/distances.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"distances() numeric matrix length() columns length(v) rows. shortest path length vertex always zero. unreachable vertices Inf included. shortest_paths() named list four entries returned: vpath list, length length(); list element contains vertex ids path vertex vertex [] (way directed graphs depending mode argument). vector also contains first last elements. included . path two vertices numeric vector length zero returned list element. output requested output argument, NULL. epath list similar vpath, vectors list contain edge ids along shortest paths, instead vertex ids. entry set NULL requested output argument. predecessors Numeric vector, predecessor vertex argument, NULL requested. inbound_edges Numeric vector, inbound edge vertex, NULL, requested. all_shortest_paths() list returned, list element contains shortest path vertex . shortest paths vertex collected consecutive elements list. mean_distance() single number returned details=FALSE, named list two entries: res mean distance numeric scalar unconnected number unconnected vertex pairs, also numeric scalar. distance_table() returns named list two entries: res numeric vector, histogram distances, unconnected numeric scalar, number pairs first vertex reachable second. undirected directed graphs, unorderde ordered pairs considered, respectively. Therefore sum two entries always \\(n(n-1)\\) directed graphs \\(n(n-1)/2\\) undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/distances.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"shortest path, geodesic two pair vertices path minimal number vertices. functions documented manual page calculate shortest paths vertex pairs. distances() calculates lengths pairwise shortest paths set vertices () another set vertices (). uses different algorithms, depending algorithm argument weight edge attribute graph. implemented algorithms breadth-first search (‘unweighted’), works unweighted graphs; Dijkstra algorithm (‘dijkstra’), works graphs non-negative edge weights; Bellman-Ford algorithm (‘bellman-ford’); Johnson's algorithm (‘johnson’); faster version Floyd-Warshall algorithm expected quadratic running time (‘floyd-warshall’). latter three algorithms work arbitrary edge weights, (naturally) graphs negative cycle. Note negative-weight edge undirected graph implies cycle. Johnson's algorithm performs better Bellman-Ford one many source (target) vertices given, -pairs shortest path length calculations typical use case. igraph can choose automatically algorithms, chooses efficient one appropriate supplied weights (). automatic algorithm selection, supply ‘automatic’ algorithm argument. (also default.) shortest_paths() calculates single shortest path (.e. path , just length) source vertex given , target vertices given . shortest_paths() uses breadth-first search unweighted graphs Dijkstra's algorithm weighted graphs. latter works edge weights non-negative. all_shortest_paths() calculates shortest paths pairs vertices, including several shortest paths length. precisely, computerd shortest path starting , ending vertex given . uses breadth-first search unweighted graphs Dijkstra's algorithm weighted ones. latter supports non-negative edge weights. Caution: multigraphs, result size exponentially large number vertex pairs multiple edges . mean_distance() calculates average path length graph, calculating shortest paths pairs vertices (ways directed graphs). uses breadth-first search unweighted graphs Dijkstra's algorithm weighted ones. latter supports non-negative edge weights. distance_table() calculates histogram, calculating shortest path length pair vertices. directed graphs directions considered, every pair vertices appears twice histogram.","code":""},{"path":"https://r.igraph.org/reference/distances.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"West, D.B. (1996). Introduction Graph Theory. Upper Saddle River, N.J.: Prentice Hall.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/distances.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/distances.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"igraph_path_length_hist(), igraph_average_path_length_dijkstra().","code":""},{"path":"https://r.igraph.org/reference/distances.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"","code":"g <- make_ring(10) distances(g) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> [1,] 0 1 2 3 4 5 4 3 2 1 #> [2,] 1 0 1 2 3 4 5 4 3 2 #> [3,] 2 1 0 1 2 3 4 5 4 3 #> [4,] 3 2 1 0 1 2 3 4 5 4 #> [5,] 4 3 2 1 0 1 2 3 4 5 #> [6,] 5 4 3 2 1 0 1 2 3 4 #> [7,] 4 5 4 3 2 1 0 1 2 3 #> [8,] 3 4 5 4 3 2 1 0 1 2 #> [9,] 2 3 4 5 4 3 2 1 0 1 #> [10,] 1 2 3 4 5 4 3 2 1 0 shortest_paths(g, 5) #> $vpath #> $vpath[[1]] #> + 5/10 vertices, from c716a37: #> [1] 5 4 3 2 1 #> #> $vpath[[2]] #> + 4/10 vertices, from c716a37: #> [1] 5 4 3 2 #> #> $vpath[[3]] #> + 3/10 vertices, from c716a37: #> [1] 5 4 3 #> #> $vpath[[4]] #> + 2/10 vertices, from c716a37: #> [1] 5 4 #> #> $vpath[[5]] #> + 1/10 vertex, from c716a37: #> [1] 5 #> #> $vpath[[6]] #> + 2/10 vertices, from c716a37: #> [1] 5 6 #> #> $vpath[[7]] #> + 3/10 vertices, from c716a37: #> [1] 5 6 7 #> #> $vpath[[8]] #> + 4/10 vertices, from c716a37: #> [1] 5 6 7 8 #> #> $vpath[[9]] #> + 5/10 vertices, from c716a37: #> [1] 5 6 7 8 9 #> #> $vpath[[10]] #> + 6/10 vertices, from c716a37: #> [1] 5 4 3 2 1 10 #> #> #> $epath #> NULL #> #> $predecessors #> NULL #> #> $inbound_edges #> NULL #> all_shortest_paths(g, 1, 6:8) #> $vpaths #> $vpaths[[1]] #> + 6/10 vertices, from c716a37: #> [1] 1 10 9 8 7 6 #> #> $vpaths[[2]] #> + 6/10 vertices, from c716a37: #> [1] 1 2 3 4 5 6 #> #> $vpaths[[3]] #> + 5/10 vertices, from c716a37: #> [1] 1 10 9 8 7 #> #> $vpaths[[4]] #> + 4/10 vertices, from c716a37: #> [1] 1 10 9 8 #> #> #> $epaths #> $epaths[[1]] #> [1] 10 9 8 7 6 #> #> $epaths[[2]] #> [1] 1 2 3 4 5 #> #> $epaths[[3]] #> [1] 10 9 8 7 #> #> $epaths[[4]] #> [1] 10 9 8 #> #> #> $nrgeo #> [1] 1 1 1 1 1 2 1 1 1 1 #> #> $res #> $res[[1]] #> + 6/10 vertices, from c716a37: #> [1] 1 10 9 8 7 6 #> #> $res[[2]] #> + 6/10 vertices, from c716a37: #> [1] 1 2 3 4 5 6 #> #> $res[[3]] #> + 5/10 vertices, from c716a37: #> [1] 1 10 9 8 7 #> #> $res[[4]] #> + 4/10 vertices, from c716a37: #> [1] 1 10 9 8 #> #> mean_distance(g) #> [1] 2.777778 ## Weighted shortest paths el <- matrix( ncol = 3, byrow = TRUE, c( 1, 2, 0, 1, 3, 2, 1, 4, 1, 2, 3, 0, 2, 5, 5, 2, 6, 2, 3, 2, 1, 3, 4, 1, 3, 7, 1, 4, 3, 0, 4, 7, 2, 5, 6, 2, 5, 8, 8, 6, 3, 2, 6, 7, 1, 6, 9, 1, 6, 10, 3, 8, 6, 1, 8, 9, 1, 9, 10, 4 ) ) g2 <- add_edges(make_empty_graph(10), t(el[, 1:2]), weight = el[, 3]) distances(g2, mode = \"out\") #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> [1,] 0 0 0 1 5 2 1 13 3 5 #> [2,] Inf 0 0 1 5 2 1 13 3 5 #> [3,] Inf 1 0 1 6 3 1 14 4 6 #> [4,] Inf 1 0 0 6 3 1 14 4 6 #> [5,] Inf 5 4 5 0 2 3 8 3 5 #> [6,] Inf 3 2 3 8 0 1 16 1 3 #> [7,] Inf Inf Inf Inf Inf Inf 0 Inf Inf Inf #> [8,] Inf 4 3 4 9 1 2 0 1 4 #> [9,] Inf Inf Inf Inf Inf Inf Inf Inf 0 4 #> [10,] Inf Inf Inf Inf Inf Inf Inf Inf Inf 0"},{"path":"https://r.igraph.org/reference/diverging_pal.html","id":null,"dir":"Reference","previous_headings":"","what":"Diverging palette — diverging_pal","title":"Diverging palette — diverging_pal","text":"‘PuOr’ palette https://colorbrewer2.org/. eleven colors.","code":""},{"path":"https://r.igraph.org/reference/diverging_pal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Diverging palette — diverging_pal","text":"","code":"diverging_pal(n)"},{"path":"https://r.igraph.org/reference/diverging_pal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Diverging palette — diverging_pal","text":"n number colors palette. maximum eleven currently.","code":""},{"path":"https://r.igraph.org/reference/diverging_pal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Diverging palette — diverging_pal","text":"character vector RGB color codes.","code":""},{"path":"https://r.igraph.org/reference/diverging_pal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Diverging palette — diverging_pal","text":"similar sequential_pal(), also puts emphasis mid-range values, plus two extreme ends. Use palette, quantity mark vertex colors.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/diverging_pal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Diverging palette — diverging_pal","text":"","code":"library(igraphdata) data(foodwebs) fw <- foodwebs[[1]] %>% induced_subgraph(V(.)[ECO == 1]) %>% add_layout_(with_fr()) %>% set_vertex_attr(\"label\", value = seq_len(gorder(.))) %>% set_vertex_attr(\"size\", value = 10) %>% set_edge_attr(\"arrow.size\", value = 0.3) #> This graph was created by an old(er) igraph version. #> ℹ Call `igraph::upgrade_graph()` on it to use with the current igraph version. #> For now we convert it on the fly... V(fw)$color <- scales::dscale(V(fw)$Biomass %>% cut(10), diverging_pal) plot(fw) data(karate) karate <- karate %>% add_layout_(with_kk()) %>% set_vertex_attr(\"size\", value = 10) #> This graph was created by an old(er) igraph version. #> ℹ Call `igraph::upgrade_graph()` on it to use with the current igraph version. #> For now we convert it on the fly... V(karate)$color <- scales::dscale(degree(karate) %>% cut(5), diverging_pal) plot(karate)"},{"path":"https://r.igraph.org/reference/diversity.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph diversity — diversity","title":"Graph diversity — diversity","text":"Calculates measure diversity vertices.","code":""},{"path":"https://r.igraph.org/reference/diversity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph diversity — diversity","text":"","code":"diversity(graph, weights = NULL, vids = V(graph))"},{"path":"https://r.igraph.org/reference/diversity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph diversity — diversity","text":"graph input graph. Edge directions ignored. weights NULL, vector edge weights use computation. NULL, ‘weight’ attibute used. Note measure defined unweighted graphs. vids vertex ids calculate measure.","code":""},{"path":"https://r.igraph.org/reference/diversity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph diversity — diversity","text":"numeric vector, length number vertices.","code":""},{"path":"https://r.igraph.org/reference/diversity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph diversity — diversity","text":"diversity vertex defined (scaled) Shannon entropy weights incident edges: $$D()=\\frac{H()}{\\log k_i}$$ $$H()=-\\sum_{j=1}^{k_i} p_{ij}\\log p_{ij},$$ $$p_{ij}=\\frac{w_{ij}}{\\sum_{l=1}^{k_i}}V_{il},$$ \\(k_i\\) (total) degree vertex \\(\\), \\(w_{ij}\\) weight edge(s) vertices \\(\\) \\(j\\). vertices degree less two function returns NaN.","code":""},{"path":"https://r.igraph.org/reference/diversity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Graph diversity — diversity","text":"Nathan Eagle, Michael Macy Rob Claxton: Network Diversity Economic Development, Science 328, 1029–1031, 2010.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/diversity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph diversity — diversity","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/diversity.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Graph diversity — diversity","text":"igraph_diversity().","code":""},{"path":"https://r.igraph.org/reference/diversity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph diversity — diversity","text":"","code":"g1 <- sample_gnp(20, 2 / 20) g2 <- sample_gnp(20, 2 / 20) g3 <- sample_gnp(20, 5 / 20) E(g1)$weight <- 1 E(g2)$weight <- runif(ecount(g2)) E(g3)$weight <- runif(ecount(g3)) diversity(g1) #> [1] 1 0 1 1 0 0 1 1 NaN 0 NaN 1 1 1 1 0 1 1 0 #> [20] 1 diversity(g2) #> [1] 0.0000000 0.0000000 0.9912105 0.1954131 0.2786455 NaN 0.9285801 #> [8] NaN 0.9562562 0.8678366 0.9145202 0.0000000 0.9606785 NaN #> [15] 0.0000000 0.9837941 0.0000000 0.0000000 0.0000000 0.8888561 diversity(g3) #> [1] 0.9153007 0.9963839 0.7610137 0.9986502 0.7908580 0.6775001 0.9359162 #> [8] 0.9681371 0.6402843 0.9446303 0.8001961 0.9568925 0.8956848 0.2837485 #> [15] 0.8343112 0.8661485 0.8991006 0.5628532 0.8944529 0.9736941"},{"path":"https://r.igraph.org/reference/dominator.tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Dominator tree — dominator.tree","title":"Dominator tree — dominator.tree","text":"dominator.tree() renamed dominator_tree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/dominator.tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dominator tree — dominator.tree","text":"","code":"dominator.tree(graph, root, mode = c(\"out\", \"in\", \"all\", \"total\"))"},{"path":"https://r.igraph.org/reference/dominator.tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dominator tree — dominator.tree","text":"graph directed graph. flowgraph, contains vertices reachable root vertex, vertices collected returned part result. root id root (source) vertex, root tree. mode Constant, must ‘’ ‘’. ‘’, directions considered opposite original one input graph.","code":""},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Dominator tree — dominator_tree","title":"Dominator tree — dominator_tree","text":"Dominator tree directed graph.","code":""},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dominator tree — dominator_tree","text":"","code":"dominator_tree(graph, root, mode = c(\"out\", \"in\", \"all\", \"total\"))"},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dominator tree — dominator_tree","text":"graph directed graph. flowgraph, contains vertices reachable root vertex, vertices collected returned part result. root id root (source) vertex, root tree. mode Constant, must ‘’ ‘’. ‘’, directions considered opposite original one input graph.","code":""},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dominator tree — dominator_tree","text":"list components: dom numeric vector giving immediate dominators vertex. vertices unreachable root, contains NaN. root vertex contains minus one. domtree graph object, dominator tree. vertex ids vertex ids input graph. Isolate vertices ones unreachable root. leftout numeric vector containing vertex ids unreachable root.","code":""},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Dominator tree — dominator_tree","text":"flowgraph directed graph distinguished start (root) vertex \\(r\\), vertex \\(v\\), path \\(r\\) \\(v\\). vertex \\(v\\) dominates another vertex \\(w\\) (equal \\(v\\)), every path \\(r\\) \\(w\\) contains \\(v\\). Vertex \\(v\\) immediate dominator \\(w\\), \\(v=\\textrm{idom}(w)\\), \\(v\\) dominates \\(w\\) every dominator \\(w\\) dominates \\(v\\). edges \\({(\\textrm{idom}(w), w)| w \\ne r}\\) form directed tree, rooted \\(r\\), called dominator tree graph. Vertex \\(v\\) dominates vertex \\(w\\) \\(v\\) ancestor \\(w\\) dominator tree. function implements Lengauer-Tarjan algorithm construct dominator tree directed graph. details see reference .","code":""},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Dominator tree — dominator_tree","text":"Thomas Lengauer, Robert Endre Tarjan: fast algorithm finding dominators flowgraph, ACM Transactions Programming Languages Systems (TOPLAS) /1, 121–141, 1979.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Dominator tree — dominator_tree","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dominator tree — dominator_tree","text":"","code":"## The example from the paper g <- graph_from_literal( R -+ A:B:C, A -+ D, B -+ A:D:E, C -+ F:G, D -+ L, E -+ H, F -+ I, G -+ I:J, H -+ E:K, I -+ K, J -+ I, K -+ I:R, L -+ H ) dtree <- dominator_tree(g, root = \"R\") layout <- layout_as_tree(dtree$domtree, root = \"R\") layout[, 2] <- -layout[, 2] plot(dtree$domtree, layout = layout, vertex.label = V(dtree$domtree)$name)"},{"path":"https://r.igraph.org/reference/dot-apply_modifiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Applies a set of constructor modifiers to an already constructed graph. — .apply_modifiers","title":"Applies a set of constructor modifiers to an already constructed graph. — .apply_modifiers","text":"helper function common parts make_() sample_().","code":""},{"path":"https://r.igraph.org/reference/dot-apply_modifiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Applies a set of constructor modifiers to an already constructed graph. — .apply_modifiers","text":"","code":".apply_modifiers(graph, mods)"},{"path":"https://r.igraph.org/reference/dot-apply_modifiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Applies a set of constructor modifiers to an already constructed graph. — .apply_modifiers","text":"graph graph apply modifiers mods modifiers apply","code":""},{"path":"https://r.igraph.org/reference/dot-apply_modifiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Applies a set of constructor modifiers to an already constructed graph. — .apply_modifiers","text":"modified graph","code":""},{"path":"https://r.igraph.org/reference/dot-data.html","id":null,"dir":"Reference","previous_headings":"","what":".data and .env pronouns — dot-data","title":".data and .env pronouns — dot-data","text":".data .env pronouns make explicit look attribute names indexing V(g) E(g), .e. vertex edge sequence graph. pronouns inspired .data .env rlang - thanks Michał Bojanowski bringing attention. rules simple: .data retrieves attributes graph whose vertex edge sequence evaluated. .env retrieves variables calling environment. Note .data .env injected dynamically environment indexing expressions evaluated; get access objects outside context indexing expression. avoid warnings printed R CMD check code containing .data .env checked, can import .data .env igraph needed. Alternatively, can declare explicitly utils::globalVariables() silence warnings.","code":""},{"path":"https://r.igraph.org/reference/dot-extract_constructor_and_modifiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Takes an argument list and extracts the constructor specification and constructor modifiers from it. — .extract_constructor_and_modifiers","title":"Takes an argument list and extracts the constructor specification and constructor modifiers from it. — .extract_constructor_and_modifiers","text":"helper function common parts make_() sample_().","code":""},{"path":"https://r.igraph.org/reference/dot-extract_constructor_and_modifiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Takes an argument list and extracts the constructor specification and constructor modifiers from it. — .extract_constructor_and_modifiers","text":"","code":".extract_constructor_and_modifiers(..., .operation, .variant)"},{"path":"https://r.igraph.org/reference/dot-extract_constructor_and_modifiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Takes an argument list and extracts the constructor specification and constructor modifiers from it. — .extract_constructor_and_modifiers","text":"... Parameters extract .operation Human-readable description operation helper part .variant Constructor variant; must one ‘make’, ‘graph’ ‘sample’. Used cases constructor specification deterministic random variants.","code":""},{"path":"https://r.igraph.org/reference/dot-extract_constructor_and_modifiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Takes an argument list and extracts the constructor specification and constructor modifiers from it. — .extract_constructor_and_modifiers","text":"named list three items: ‘cons’ constructor function, ‘mods’ modifiers ‘args’ remaining, unparsed arguments.","code":""},{"path":"https://r.igraph.org/reference/dot-igraph.progress.html","id":null,"dir":"Reference","previous_headings":"","what":"igraph progress — .igraph.progress","title":"igraph progress — .igraph.progress","text":"igraph progress","code":""},{"path":"https://r.igraph.org/reference/dot-igraph.progress.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"igraph progress — .igraph.progress","text":"","code":".igraph.progress(percent, message, clean = FALSE)"},{"path":"https://r.igraph.org/reference/dot-igraph.progress.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"igraph progress — .igraph.progress","text":"percent, message, clean Used internally .igraph.progress() .igraph.status()","code":""},{"path":"https://r.igraph.org/reference/dot-igraph.status.html","id":null,"dir":"Reference","previous_headings":"","what":"igraph status — .igraph.status","title":"igraph status — .igraph.status","text":"igraph status","code":""},{"path":"https://r.igraph.org/reference/dot-igraph.status.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"igraph status — .igraph.status","text":"","code":".igraph.status(message)"},{"path":"https://r.igraph.org/reference/dyad.census.html","id":null,"dir":"Reference","previous_headings":"","what":"Dyad census of a graph — dyad.census","title":"Dyad census of a graph — dyad.census","text":"dyad.census() renamed dyad_census() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/dyad.census.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dyad census of a graph — dyad.census","text":"","code":"dyad.census(graph)"},{"path":"https://r.igraph.org/reference/dyad.census.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dyad census of a graph — dyad.census","text":"graph input graph. warning given directed.","code":""},{"path":"https://r.igraph.org/reference/dyad_census.html","id":null,"dir":"Reference","previous_headings":"","what":"Dyad census of a graph — dyad_census","title":"Dyad census of a graph — dyad_census","text":"Classify dyads directed graphs. relationship pair vertices measured. can three states: mutual, asymmetric non-existent.","code":""},{"path":"https://r.igraph.org/reference/dyad_census.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dyad census of a graph — dyad_census","text":"","code":"dyad_census(graph)"},{"path":"https://r.igraph.org/reference/dyad_census.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dyad census of a graph — dyad_census","text":"graph input graph. warning given directed.","code":""},{"path":"https://r.igraph.org/reference/dyad_census.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dyad census of a graph — dyad_census","text":"named numeric vector three elements: mut number pairs mutual connections. asym number pairs non-mutual connections. null number pairs connection .","code":""},{"path":"https://r.igraph.org/reference/dyad_census.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Dyad census of a graph — dyad_census","text":"Holland, P.W. Leinhardt, S. Method Detecting Structure Sociometric Data. American Journal Sociology, 76, 492–513. 1970. Wasserman, S., Faust, K. Social Network Analysis: Methods Applications. Cambridge: Cambridge University Press. 1994.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/dyad_census.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Dyad census of a graph — dyad_census","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/dyad_census.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Dyad census of a graph — dyad_census","text":"igraph_dyad_census().","code":""},{"path":"https://r.igraph.org/reference/dyad_census.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dyad census of a graph — dyad_census","text":"","code":"g <- sample_pa(100) dyad_census(g) #> $mut #> [1] 0 #> #> $asym #> [1] 99 #> #> $null #> [1] 4851 #>"},{"path":"https://r.igraph.org/reference/each_edge.html","id":null,"dir":"Reference","previous_headings":"","what":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","title":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","text":"function can used together rewire(). method rewires endpoints edges constant probability uniformly randomly new vertex graph.","code":""},{"path":"https://r.igraph.org/reference/each_edge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","text":"","code":"each_edge( prob, loops = FALSE, multiple = FALSE, mode = c(\"all\", \"out\", \"in\", \"total\") )"},{"path":"https://r.igraph.org/reference/each_edge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","text":"prob rewiring probability, real number zero one. loops Logical scalar, whether loop edges allowed rewired graph. multiple Logical scalar, whether multiple edges allowed generated graph. mode Character string, specifies endpoint edges rewire directed graphs. ‘’ rewires endpoints, ‘’ rewires start (tail) directed edge, ‘’ rewires end (head) directed edge. Ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/each_edge.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","text":"Note method might create graphs multiple /loop edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/each_edge.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/each_edge.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","text":"","code":"# Some random shortcuts shorten the distances on a lattice g <- make_lattice(length = 100, dim = 1, nei = 5) mean_distance(g) #> [1] 7.141414 g <- rewire(g, each_edge(prob = 0.05)) mean_distance(g) #> [1] 2.665455 # Rewiring the start of each directed edge preserves the in-degree distribution # but not the out-degree distribution g <- sample_pa(1000) g2 <- g %>% rewire(each_edge(mode = \"in\", multiple = TRUE, prob = 0.2)) degree(g, mode = \"in\") == degree(g2, mode = \"in\") #> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [15] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [29] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [43] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [57] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [71] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [85] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [99] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [113] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [127] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [141] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [155] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [169] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [183] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [197] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [211] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [225] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [239] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [253] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [267] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [281] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [295] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [309] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [323] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [337] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [351] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [365] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [379] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [393] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [407] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [421] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [435] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [449] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [463] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [477] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [491] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [505] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [519] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [533] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [547] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [561] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [575] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [589] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [603] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [617] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [631] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [645] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [659] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [673] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [687] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [701] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [715] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [729] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [743] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [757] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [771] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [785] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [799] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [813] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [827] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [841] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [855] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [869] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [883] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [897] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [911] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [925] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [939] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [953] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [967] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [981] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [995] TRUE TRUE TRUE TRUE TRUE TRUE"},{"path":"https://r.igraph.org/reference/eccentricity.html","id":null,"dir":"Reference","previous_headings":"","what":"Eccentricity of the vertices in a graph — eccentricity","title":"Eccentricity of the vertices in a graph — eccentricity","text":"eccentricity vertex shortest path distance farthest node graph.","code":""},{"path":"https://r.igraph.org/reference/eccentricity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Eccentricity of the vertices in a graph — eccentricity","text":"","code":"eccentricity( graph, vids = V(graph), ..., weights = NULL, mode = c(\"all\", \"out\", \"in\", \"total\") )"},{"path":"https://r.igraph.org/reference/eccentricity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Eccentricity of the vertices in a graph — eccentricity","text":"graph input graph, can directed undirected. vids vertices eccentricity calculated. ... dots future extensions must empty. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). weighted graph, length path sum weights constituent edges. mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, graph treated undirected, .e. edge directions taken account. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/eccentricity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Eccentricity of the vertices in a graph — eccentricity","text":"eccentricity() returns numeric vector, containing eccentricity score given vertex.","code":""},{"path":"https://r.igraph.org/reference/eccentricity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Eccentricity of the vertices in a graph — eccentricity","text":"eccentricity vertex calculated measuring shortest distance () vertex, () vertices graph, taking maximum. implementation ignores vertex pairs different components. Isolate vertices eccentricity zero.","code":""},{"path":"https://r.igraph.org/reference/eccentricity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Eccentricity of the vertices in a graph — eccentricity","text":"Harary, F. Graph Theory. Reading, MA: Addison-Wesley, p. 35, 1994.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/eccentricity.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Eccentricity of the vertices in a graph — eccentricity","text":"igraph_eccentricity_dijkstra().","code":""},{"path":"https://r.igraph.org/reference/eccentricity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Eccentricity of the vertices in a graph — eccentricity","text":"","code":"g <- make_star(10, mode = \"undirected\") eccentricity(g) #> [1] 1 2 2 2 2 2 2 2 2 2"},{"path":"https://r.igraph.org/reference/edge.betweenness.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure detection based on edge betweenness — edge.betweenness.community","title":"Community structure detection based on edge betweenness — edge.betweenness.community","text":"edge.betweenness.community() renamed cluster_edge_betweenness() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/edge.betweenness.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure detection based on edge betweenness — edge.betweenness.community","text":"","code":"edge.betweenness.community( graph, weights = NULL, directed = TRUE, edge.betweenness = TRUE, merges = TRUE, bridges = TRUE, modularity = TRUE, membership = TRUE )"},{"path":"https://r.igraph.org/reference/edge.betweenness.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure detection based on edge betweenness — edge.betweenness.community","text":"graph graph analyze. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. Edge weights used calculate weighted edge betweenness. means edges interpreted distances, connection strengths. directed Logical constant, whether calculate directed edge betweenness directed graphs. ignored undirected graphs. edge.betweenness Logical constant, whether return edge betweenness edges time removal. merges Logical constant, whether return merge matrix representing hierarchical community structure network. argument called merges, even community structure algorithm divisive agglomerative: builds tree top bottom. one line merge (.e. split) matrix, first line first merge (last split). communities identified integer number starting one. Community ids smaller equal \\(N\\), number vertices graph, belong singleton communities, .e. individual vertices. first merge \\(N\\) communities numbered one \\(N\\). first merge, first line matrix creates community \\(N+1\\), second merge creates community \\(N+2\\), etc. bridges Logical constant, whether return list edge removals actually splitted component graph. modularity Logical constant, whether calculate maximum modularity score, considering possibly community structures along edge-betweenness based edge removals. membership Logical constant, whether calculate membership vector corresponding highest possible modularity score.","code":""},{"path":"https://r.igraph.org/reference/edge.betweenness.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex and edge betweenness centrality — edge.betweenness","title":"Vertex and edge betweenness centrality — edge.betweenness","text":"edge.betweenness() renamed edge_betweenness() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/edge.betweenness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex and edge betweenness centrality — edge.betweenness","text":"","code":"edge.betweenness( graph, e = E(graph), directed = TRUE, weights = NULL, cutoff = -1 )"},{"path":"https://r.igraph.org/reference/edge.betweenness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex and edge betweenness centrality — edge.betweenness","text":"graph graph analyze. e edges edge betweenness calculated. directed Logical, whether directed paths considered determining shortest paths. weights Optional positive weight vector calculating weighted betweenness. graph weight edge attribute, used default. Weights used calculate weighted shortest paths, interpreted distances. cutoff maximum shortest path length consider calculating betweenness. negative, limit.","code":""},{"path":"https://r.igraph.org/reference/edge.connectivity.html","id":null,"dir":"Reference","previous_headings":"","what":"Edge connectivity — edge.connectivity","title":"Edge connectivity — edge.connectivity","text":"edge.connectivity() renamed edge_connectivity() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/edge.connectivity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Edge connectivity — edge.connectivity","text":"","code":"edge.connectivity(graph, source = NULL, target = NULL, checks = TRUE)"},{"path":"https://r.igraph.org/reference/edge.connectivity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Edge connectivity — edge.connectivity","text":"graph input graph. source id source vertex, edge_connectivity() can NULL, see details . target id target vertex, edge_connectivity() can NULL, see details . checks Logical constant. Whether check graph connected also degree vertices. graph (strongly) connected connectivity obviously zero. Otherwise minimum degree one edge connectivity also one. good idea perform checks, can done quickly compared connectivity calculation . suggested Peter McMahan, thanks Peter.","code":""},{"path":"https://r.igraph.org/reference/edge.disjoint.paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Edge connectivity — edge.disjoint.paths","title":"Edge connectivity — edge.disjoint.paths","text":"edge.disjoint.paths() renamed edge_connectivity() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/edge.disjoint.paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Edge connectivity — edge.disjoint.paths","text":"","code":"edge.disjoint.paths(graph, source = NULL, target = NULL, checks = TRUE)"},{"path":"https://r.igraph.org/reference/edge.disjoint.paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Edge connectivity — edge.disjoint.paths","text":"graph input graph. source id source vertex, edge_connectivity() can NULL, see details . target id target vertex, edge_connectivity() can NULL, see details . checks Logical constant. Whether check graph connected also degree vertices. graph (strongly) connected connectivity obviously zero. Otherwise minimum degree one edge connectivity also one. good idea perform checks, can done quickly compared connectivity calculation . suggested Peter McMahan, thanks Peter.","code":""},{"path":"https://r.igraph.org/reference/edge.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper function for adding and deleting edges — edge","title":"Helper function for adding and deleting edges — edge","text":"helper function simplifies adding deleting edges /graphs.","code":""},{"path":"https://r.igraph.org/reference/edge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper function for adding and deleting edges — edge","text":"","code":"edge(...) edges(...)"},{"path":"https://r.igraph.org/reference/edge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper function for adding and deleting edges — edge","text":"... See details .","code":""},{"path":"https://r.igraph.org/reference/edge.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper function for adding and deleting edges — edge","text":"special object can used together igraph graphs plus minus operators.","code":""},{"path":"https://r.igraph.org/reference/edge.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Helper function for adding and deleting edges — edge","text":"edges() alias edge(). adding edges via +, unnamed arguments edge() (edges()) concatenated, passed add_edges(). interpreted pairs vertex ids, edge added pair. Named arguments used edge attributes new edges. deleting edges via -, arguments edge() (edges()) concatenated via c() passed delete_edges().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/edge.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper function for adding and deleting edges — edge","text":"","code":"g <- make_ring(10) %>% set_edge_attr(\"color\", value = \"red\") g <- g + edge(1, 5, color = \"green\") + edge(2, 6, color = \"blue\") - edge(\"8|9\") E(g)[[]] #> + 11/11 edges from 504e5c6: #> tail head tid hid color #> 1 1 2 1 2 red #> 2 2 3 2 3 red #> 3 3 4 3 4 red #> 4 4 5 4 5 red #> 5 5 6 5 6 red #> 6 6 7 6 7 red #> 7 7 8 7 8 red #> 8 9 10 9 10 red #> 9 1 10 1 10 red #> 10 1 5 1 5 green #> 11 2 6 2 6 blue g %>% add_layout_(in_circle()) %>% plot() g <- make_ring(10) + edges(1:10) plot(g)"},{"path":"https://r.igraph.org/reference/edge_attr-set.html","id":null,"dir":"Reference","previous_headings":"","what":"Set one or more edge attributes — edge_attr<-","title":"Set one or more edge attributes — edge_attr<-","text":"Set one edge attributes","code":""},{"path":"https://r.igraph.org/reference/edge_attr-set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set one or more edge attributes — edge_attr<-","text":"","code":"edge_attr(graph, name, index = E(graph)) <- value"},{"path":"https://r.igraph.org/reference/edge_attr-set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set one or more edge attributes — edge_attr<-","text":"graph graph. name name edge attribute set. missing, value must named list, entries set edge attributes. index optional edge sequence set attributes subset edges. value new value attribute(s) (index) edges.","code":""},{"path":"https://r.igraph.org/reference/edge_attr-set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set one or more edge attributes — edge_attr<-","text":"graph, edge attribute(s) added set.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/edge_attr-set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set one or more edge attributes — edge_attr<-","text":"","code":"g <- make_ring(10) edge_attr(g) <- list( name = LETTERS[1:10], color = rep(\"green\", gsize(g)) ) edge_attr(g, \"label\") <- E(g)$name g #> IGRAPH e99d706 U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (e/c), color #> | (e/c), label (e/c) #> + edges from e99d706: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 plot(g)"},{"path":"https://r.igraph.org/reference/edge_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Query edge attributes of a graph — edge_attr","title":"Query edge attributes of a graph — edge_attr","text":"Query edge attributes graph","code":""},{"path":"https://r.igraph.org/reference/edge_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query edge attributes of a graph — edge_attr","text":"","code":"edge_attr(graph, name, index = E(graph))"},{"path":"https://r.igraph.org/reference/edge_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query edge attributes of a graph — edge_attr","text":"graph graph name name attribute query. missing, edge attributes returned list. index optional edge sequence query edge attributes subset edges.","code":""},{"path":"https://r.igraph.org/reference/edge_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query edge attributes of a graph — edge_attr","text":"value edge attribute, list edge attributes name missing.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/edge_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query edge attributes of a graph — edge_attr","text":"","code":"g <- make_ring(10) %>% set_edge_attr(\"weight\", value = 1:10) %>% set_edge_attr(\"color\", value = \"red\") g #> IGRAPH 5061260 U-W- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), weight (e/n), color #> | (e/c) #> + edges from 5061260: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 plot(g, edge.width = E(g)$weight)"},{"path":"https://r.igraph.org/reference/edge_attr_names.html","id":null,"dir":"Reference","previous_headings":"","what":"List names of edge attributes — edge_attr_names","title":"List names of edge attributes — edge_attr_names","text":"List names edge attributes","code":""},{"path":"https://r.igraph.org/reference/edge_attr_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List names of edge attributes — edge_attr_names","text":"","code":"edge_attr_names(graph)"},{"path":"https://r.igraph.org/reference/edge_attr_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List names of edge attributes — edge_attr_names","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/edge_attr_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List names of edge attributes — edge_attr_names","text":"Character vector, names edge attributes.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/edge_attr_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List names of edge attributes — edge_attr_names","text":"","code":"g <- make_ring(10) %>% set_edge_attr(\"label\", value = letters[1:10]) edge_attr_names(g) #> [1] \"label\" plot(g)"},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":null,"dir":"Reference","previous_headings":"","what":"Edge connectivity — edge_connectivity","title":"Edge connectivity — edge_connectivity","text":"edge connectivity graph two vertices, recently also called group adhesion.","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Edge connectivity — edge_connectivity","text":"","code":"edge_connectivity(graph, source = NULL, target = NULL, checks = TRUE) edge_disjoint_paths(graph, source, target) adhesion(graph, checks = TRUE)"},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Edge connectivity — edge_connectivity","text":"graph input graph. source id source vertex, edge_connectivity() can NULL, see details . target id target vertex, edge_connectivity() can NULL, see details . checks Logical constant. Whether check graph connected also degree vertices. graph (strongly) connected connectivity obviously zero. Otherwise minimum degree one edge connectivity also one. good idea perform checks, can done quickly compared connectivity calculation . suggested Peter McMahan, thanks Peter.","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Edge connectivity — edge_connectivity","text":"scalar real value.","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"edge-connectivity-edge-connectivity","dir":"Reference","previous_headings":"","what":"edge_connectivity() Edge connectivity","title":"Edge connectivity — edge_connectivity","text":"edge connectivity pair vertices (source target) minimum number edges needed remove eliminate (directed) paths source target. edge_connectivity() calculates quantity source target arguments given (NULL). edge connectivity graph minimum edge connectivity every (ordered) pair vertices graph. edge_connectivity() calculates quantity neither source target arguments given (.e. NULL).","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"edge-disjoint-paths-the-maximum-number-of-edge-disjoint-paths-between-two-vertices","dir":"Reference","previous_headings":"","what":"edge_disjoint_paths() The maximum number of edge-disjoint paths between two vertices","title":"Edge connectivity — edge_connectivity","text":"set paths two vertices called edge-disjoint share edges. maximum number edge-disjoint paths calculated function using maximum flow techniques. Directed paths considered directed graphs. set edge disjoint paths two vertices set paths containing common edges. maximum number edge disjoint paths two vertices edge connectivity. direct edges source target, number vertex-disjoint paths vertex connectivity two vertices. edges present, one contributes one extra path.","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"adhesion-adhesion-of-a-graph","dir":"Reference","previous_headings":"","what":"adhesion() Adhesion of a graph","title":"Edge connectivity — edge_connectivity","text":"adhesion graph minimum number edges needed remove obtain graph strongly connected. edge connectivity graph.","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"all-three-functions","dir":"Reference","previous_headings":"","what":"All three functions","title":"Edge connectivity — edge_connectivity","text":"three functions documented page calculate similar properties, precisely general edge_connectivity(), others included descriptive function names.","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Edge connectivity — edge_connectivity","text":"Douglas R. White Frank Harary (2001): cohesiveness blocks social networks: node connectivity conditional density, Sociological Methodology, vol. 31, 2001, pp. 305–59.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Edge connectivity — edge_connectivity","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Edge connectivity — edge_connectivity","text":"","code":"g <- sample_pa(100, m = 1) g2 <- sample_pa(100, m = 5) edge_connectivity(g, 100, 1) #> [1] 1 edge_connectivity(g2, 100, 1) #> [1] 5 edge_disjoint_paths(g2, 100, 1) #> [1] 5 g <- sample_gnp(50, 5 / 50) g <- as_directed(g) g <- induced_subgraph(g, subcomponent(g, 1)) adhesion(g) #> [1] 1"},{"path":"https://r.igraph.org/reference/edge_density.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph density — edge_density","title":"Graph density — edge_density","text":"density graph ratio actual number edges largest possible number edges graph, assuming multi-edges present.","code":""},{"path":"https://r.igraph.org/reference/edge_density.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph density — edge_density","text":"","code":"edge_density(graph, loops = FALSE)"},{"path":"https://r.igraph.org/reference/edge_density.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph density — edge_density","text":"graph input graph. loops Logical constant, whether loop edges may exist graph. affects calculation largest possible number edges graph. parameter set FALSE yet graph contains self-loops, result meaningful.","code":""},{"path":"https://r.igraph.org/reference/edge_density.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph density — edge_density","text":"real constant. function returns NaN (=0.0/0.0) empty graph zero vertices.","code":""},{"path":"https://r.igraph.org/reference/edge_density.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph density — edge_density","text":"concept density ill-defined multigraphs. Note function check whether graph multi-edges return meaningless results graphs.","code":""},{"path":"https://r.igraph.org/reference/edge_density.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Graph density — edge_density","text":"Wasserman, S., Faust, K. (1994). Social Network Analysis: Methods Applications. Cambridge: Cambridge University Press.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/edge_density.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph density — edge_density","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/edge_density.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Graph density — edge_density","text":"igraph_density().","code":""},{"path":"https://r.igraph.org/reference/edge_density.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph density — edge_density","text":"","code":"edge_density(make_empty_graph(n = 10)) # empty graphs have density 0 #> [1] 0 edge_density(make_full_graph(n = 10)) # complete graphs have density 1 #> [1] 1 edge_density(sample_gnp(n = 100, p = 0.4)) # density will be close to p #> [1] 0.3921212 # loop edges g <- make_graph(c(1, 2, 2, 2, 2, 3)) # graph with a self-loop edge_density(g, loops = FALSE) # this is wrong!!! #> [1] 0.5 edge_density(g, loops = TRUE) # this is right!!! #> [1] 0.3333333 edge_density(simplify(g), loops = FALSE) # this is also right, but different #> [1] 0.3333333"},{"path":"https://r.igraph.org/reference/ego.html","id":null,"dir":"Reference","previous_headings":"","what":"Neighborhood of graph vertices — connect","title":"Neighborhood of graph vertices — connect","text":"functions find vertices farther given limit another fixed vertex, called neighborhood vertex. Note ego() neighborhood(), ego_size() neighborhood_size(), make_ego_graph() make_neighborhood()_graph(), synonyms (aliases).","code":""},{"path":"https://r.igraph.org/reference/ego.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neighborhood of graph vertices — connect","text":"","code":"connect(graph, order, mode = c(\"all\", \"out\", \"in\", \"total\")) ego_size( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 ) neighborhood_size( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 ) ego( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 ) neighborhood( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 ) make_ego_graph( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 ) make_neighborhood_graph( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 )"},{"path":"https://r.igraph.org/reference/ego.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neighborhood of graph vertices — connect","text":"graph input graph. order Integer giving order neighborhood. mode Character constant, specifies use direction edges directed graph analyzed. ‘’ outgoing edges followed, vertices reachable source vertex order steps counted. ‘\"\"’ vertices source vertex reachable order steps counted. ‘\"\"’ ignores direction edges. argument ignored undirected graphs. nodes vertices calculation performed. mindist minimum distance include vertex result.","code":""},{"path":"https://r.igraph.org/reference/ego.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Neighborhood of graph vertices — connect","text":"ego_size()/neighborhood_size() returns integer vector. ego()/neighborhood() (synonyms) returns list igraph.vs list numeric vectors depending value igraph_opt(\"return.vs.es\"), see details performance characteristics. make_ego_graph()/make_neighborhood_graph() returns list graphs. connect() returns new graph object.","code":""},{"path":"https://r.igraph.org/reference/ego.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Neighborhood of graph vertices — connect","text":"neighborhood given order r vertex v includes vertices closer v order. .e. order 0 always v , order 1 v plus immediate neighbors, order 2 order 1 plus immediate neighbors vertices order 1, etc. ego_size()/neighborhood_size() (synonyms) returns size neighborhoods given order, given vertex. ego()/neighborhood() (synonyms) returns vertices belonging neighborhoods given order, given vertex. make_ego_graph()/make_neighborhood()_graph() (synonyms) creates (sub)graphs neighborhoods given vertices given order parameter. function preserves vertex, edge graph attributes. connect() creates new graph connecting vertex vertices neighborhood.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/ego.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Neighborhood of graph vertices — connect","text":"Gabor Csardi csardi.gabor@gmail.com, first version done Vincent Matossian","code":""},{"path":"https://r.igraph.org/reference/ego.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neighborhood of graph vertices — connect","text":"","code":"g <- make_ring(10) ego_size(g, order = 0, 1:3) #> [1] 1 1 1 ego_size(g, order = 1, 1:3) #> [1] 3 3 3 ego_size(g, order = 2, 1:3) #> [1] 5 5 5 # neighborhood_size() is an alias of ego_size() neighborhood_size(g, order = 0, 1:3) #> [1] 1 1 1 neighborhood_size(g, order = 1, 1:3) #> [1] 3 3 3 neighborhood_size(g, order = 2, 1:3) #> [1] 5 5 5 ego(g, order = 0, 1:3) #> [[1]] #> + 1/10 vertex, from 188fcd4: #> [1] 1 #> #> [[2]] #> + 1/10 vertex, from 188fcd4: #> [1] 2 #> #> [[3]] #> + 1/10 vertex, from 188fcd4: #> [1] 3 #> ego(g, order = 1, 1:3) #> [[1]] #> + 3/10 vertices, from 188fcd4: #> [1] 1 2 10 #> #> [[2]] #> + 3/10 vertices, from 188fcd4: #> [1] 2 1 3 #> #> [[3]] #> + 3/10 vertices, from 188fcd4: #> [1] 3 2 4 #> ego(g, order = 2, 1:3) #> [[1]] #> + 5/10 vertices, from 188fcd4: #> [1] 1 2 10 3 9 #> #> [[2]] #> + 5/10 vertices, from 188fcd4: #> [1] 2 1 3 10 4 #> #> [[3]] #> + 5/10 vertices, from 188fcd4: #> [1] 3 2 4 1 5 #> # neighborhood() is an alias of ego() neighborhood(g, order = 0, 1:3) #> [[1]] #> + 1/10 vertex, from 188fcd4: #> [1] 1 #> #> [[2]] #> + 1/10 vertex, from 188fcd4: #> [1] 2 #> #> [[3]] #> + 1/10 vertex, from 188fcd4: #> [1] 3 #> neighborhood(g, order = 1, 1:3) #> [[1]] #> + 3/10 vertices, from 188fcd4: #> [1] 1 2 10 #> #> [[2]] #> + 3/10 vertices, from 188fcd4: #> [1] 2 1 3 #> #> [[3]] #> + 3/10 vertices, from 188fcd4: #> [1] 3 2 4 #> neighborhood(g, order = 2, 1:3) #> [[1]] #> + 5/10 vertices, from 188fcd4: #> [1] 1 2 10 3 9 #> #> [[2]] #> + 5/10 vertices, from 188fcd4: #> [1] 2 1 3 10 4 #> #> [[3]] #> + 5/10 vertices, from 188fcd4: #> [1] 3 2 4 1 5 #> # attributes are preserved V(g)$name <- c(\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\") make_ego_graph(g, order = 2, 1:3) #> [[1]] #> IGRAPH bbad10b UN-- 5 4 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from bbad10b (vertex names): #> [1] a--b b--c a--j i--j #> #> [[2]] #> IGRAPH 295ebeb UN-- 5 4 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from 295ebeb (vertex names): #> [1] a--b b--c c--d a--j #> #> [[3]] #> IGRAPH 3d5b696 UN-- 5 4 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from 3d5b696 (vertex names): #> [1] a--b b--c c--d d--e #> # make_neighborhood_graph() is an alias of make_ego_graph() make_neighborhood_graph(g, order = 2, 1:3) #> [[1]] #> IGRAPH acf11b6 UN-- 5 4 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from acf11b6 (vertex names): #> [1] a--b b--c a--j i--j #> #> [[2]] #> IGRAPH 142e9cb UN-- 5 4 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from 142e9cb (vertex names): #> [1] a--b b--c c--d a--j #> #> [[3]] #> IGRAPH 1014658 UN-- 5 4 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from 1014658 (vertex names): #> [1] a--b b--c c--d d--e #> # connecting to the neighborhood g <- make_ring(10) g <- connect(g, 2)"},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Eigenvector centrality of vertices — eigen_centrality","title":"Eigenvector centrality of vertices — eigen_centrality","text":"eigen_centrality() takes graph (graph) returns eigenvector centralities vertices v within .","code":""},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Eigenvector centrality of vertices — eigen_centrality","text":"","code":"eigen_centrality( graph, directed = FALSE, scale = deprecated(), weights = NULL, options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Eigenvector centrality of vertices — eigen_centrality","text":"graph Graph analyzed. directed Logical scalar, whether consider direction edges directed graphs. ignored undirected graphs. scale Normalization always take place. weights numerical vector NULL. argument can used give edge weights calculating weighted eigenvector centrality vertices. NULL graph weight edge attribute used. weights numerical vector used, even graph weight edge attribute. NA, edge weights used (even graph weight edge attribute). Note negative edge weights direction edges considered, eigenvector might complex. case real part reported. function interprets weights connection strength. Higher weights spread centrality better. options named list, override ARPACK options. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Eigenvector centrality of vertices — eigen_centrality","text":"named list components: vector vector containing centrality scores. value eigenvalue corresponding calculated eigenvector, .e. centrality scores. options named list, information underlying ARPACK computation. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Eigenvector centrality of vertices — eigen_centrality","text":"Eigenvector centrality scores correspond values principal eigenvector graph's adjacency matrix; scores may, turn, interpreted arising reciprocal process centrality actor proportional sum centralities actors connected. general, vertices high eigenvector centralities connected many vertices , turn, connected many others (). perceptive may realize implies largest values obtained individuals large cliques (high-density substructures). also intelligible algebraic point view, first eigenvector closely related best rank-1 approximation adjacency matrix (relationship easy see special case diagonalizable symmetric real matrix via \\(SLS^-1\\) decomposition). adjacency matrix used eigenvector centrality calculation assumes loop edges counted twice undirected graphs; loop edge two endpoints connected vertex, traverse loop edge via either endpoint. directed case, left eigenvector adjacency matrix calculated. words, centrality vertex proportional sum centralities vertices pointing . Eigenvector centrality meaningful (strongly) connected graphs. Undirected graphs connected decomposed connected components, eigenvector centrality calculated separately. function verify graph connected. , undirected case scores one component zeros. Also note adjacency matrix directed acyclic graph adjacency matrix empty graph possess positive eigenvalues, therefore eigenvector centrality defined graphs. igraph return eigenvalue zero cases. eigenvector centralities equal empty graph zeros directed acyclic graph. pathological cases can detected checking whether eigenvalue close zero. igraph version 0.5 function uses ARPACK underlying computation, see arpack() ARPACK igraph.","code":""},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Eigenvector centrality of vertices — eigen_centrality","text":"Bonacich, P. (1987). Power Centrality: Family Measures. American Journal Sociology, 92, 1170-1182.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Eigenvector centrality of vertices — eigen_centrality","text":"Gabor Csardi csardi.gabor@gmail.com Carter T. Butts (http://www.faculty.uci.edu/profile.cfm?faculty_id=5057) manual page.","code":""},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Eigenvector centrality of vertices — eigen_centrality","text":"igraph_eigenvector_centrality().","code":""},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Eigenvector centrality of vertices — eigen_centrality","text":"","code":"# Generate some test data g <- make_ring(10, directed = FALSE) # Compute eigenvector centrality scores eigen_centrality(g) #> $vector #> [1] 1 1 1 1 1 1 1 1 1 1 #> #> $value #> [1] 2 #> #> $options #> $options$bmat #> [1] \"I\" #> #> $options$n #> [1] 10 #> #> $options$which #> [1] \"LA\" #> #> $options$nev #> [1] 1 #> #> $options$tol #> [1] 0 #> #> $options$ncv #> [1] 0 #> #> $options$ldv #> [1] 0 #> #> $options$ishift #> [1] 1 #> #> $options$maxiter #> [1] 3000 #> #> $options$nb #> [1] 1 #> #> $options$mode #> [1] 1 #> #> $options$start #> [1] 1 #> #> $options$sigma #> [1] 0 #> #> $options$sigmai #> [1] 0 #> #> $options$info #> [1] 0 #> #> $options$iter #> [1] 1 #> #> $options$nconv #> [1] 1 #> #> $options$numop #> [1] 7 #> #> $options$numopb #> [1] 0 #> #> $options$numreo #> [1] 6 #> #>"},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"Spectral decomposition adjacency matrices graphs.","code":""},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"","code":"embed_adjacency_matrix( graph, no, weights = NULL, which = c(\"lm\", \"la\", \"sa\"), scaled = TRUE, cvec = strength(graph, weights = weights)/(vcount(graph) - 1), options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"graph input graph, directed undirected. integer scalar. value embedding dimension spectral embedding. smaller number vertices. largest -dimensional non-zero singular values used spectral embedding. weights Optional positive weight vector calculating weighted embedding. graph weight edge attribute, used default. weighted embedding, edge weights used instead binary adjacencny matrix. eigenvalues (singular values, directed graphs) use. ‘lm’ means ones largest magnitude, ‘la’ ones (algebraic) largest, ‘sa’ (algebraic) smallest eigenvalues. default ‘lm’. Note directed graphs ‘la’ ‘lm’ equivalent, singular values used ordering. scaled Logical scalar, FALSE, \\(U\\) \\(V\\) returned instead \\(X\\) \\(Y\\). cvec numeric vector, length number vertices graph. vector added diagonal adjacency matrix. options named list containing parameters SVD computation algorithm ARPACK. default, list values assigned values given arpack_defaults().","code":""},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"list containing entries: X Estimated latent positions, n times matrix, n number vertices. Y NULL undirected graphs, second half latent positions directed graphs, n times matrix, n number vertices. D eigenvalues (undirected graphs) singular values (directed graphs) calculated algorithm. options named list, information underlying ARPACK computation. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"function computes -dimensional Euclidean representation graph based adjacency matrix, \\(\\). representation computed via singular value decomposition adjacency matrix, \\(=UDV^T\\).case, graph random dot product graph generated using latent position vectors \\(R^{}\\) vertex, embedding provide estimate latent vectors. undirected graphs latent positions calculated \\(X=U^{}D^{1/2}\\), \\(U^{}\\) equals first columns \\(U\\), \\(D^{1/2}\\) diagonal matrix containing top singular values diagonal. directed graphs embedding defined pair \\(X=U^{}D^{1/2}\\) \\(Y=V^{}D^{1/2}\\). (undirected graphs \\(U=V\\), enough keep one .)","code":""},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"Sussman, D.L., Tang, M., Fishkind, D.E., Priebe, C.E. Consistent Adjacency Spectral Embedding Stochastic Blockmodel Graphs, Journal American Statistical Association, Vol. 107(499), 2012","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"igraph_adjacency_spectral_embedding().","code":""},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"","code":"## A small graph lpvs <- matrix(rnorm(200), 20, 10) lpvs <- apply(lpvs, 2, function(x) { return(abs(x) / sqrt(sum(x^2))) }) RDP <- sample_dot_product(lpvs) embed <- embed_adjacency_matrix(RDP, 5)"},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"Spectral decomposition Laplacian matrices graphs.","code":""},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"","code":"embed_laplacian_matrix( graph, no, weights = NULL, which = c(\"lm\", \"la\", \"sa\"), type = c(\"default\", \"D-A\", \"DAD\", \"I-DAD\", \"OAP\"), scaled = TRUE, options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"graph input graph, directed undirected. integer scalar. value embedding dimension spectral embedding. smaller number vertices. largest -dimensional non-zero singular values used spectral embedding. weights Optional positive weight vector calculating weighted embedding. graph weight edge attribute, used default. weighted embedding, edge weights used instead binary adjacency matrix, vertex strength (see strength()) used instead degrees. eigenvalues (singular values, directed graphs) use. ‘lm’ means ones largest magnitude, ‘la’ ones (algebraic) largest, ‘sa’ (algebraic) smallest eigenvalues. default ‘lm’. Note directed graphs ‘la’ ‘lm’ equivalent, singular values used ordering. type type Laplacian use. Various definitions exist Laplacian graph, one can choose argument. Possible values: D-means \\(D-\\) \\(D\\) degree matrix \\(\\) adjacency matrix; DAD means \\(D^{1/2}\\) times \\(\\) times \\(D^{1/2}{D^1/2}\\), \\(D^{1/2}\\) inverse square root degree matrix; -DAD means \\(-D^{1/2}\\), \\(\\) identity matrix. OAP \\(O^{1/2}AP^{1/2}\\), \\(O^{1/2}\\) inverse square root -degree matrix \\(P^{1/2}\\) -degree matrix. OAP defined undirected graphs, defined type directed graphs. default (.e. type default) use D-undirected graphs OAP directed graphs. scaled Logical scalar, FALSE, \\(U\\) \\(V\\) returned instead \\(X\\) \\(Y\\). options named list containing parameters SVD computation algorithm ARPACK. default, list values assigned values given arpack_defaults().","code":""},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"list containing entries: X Estimated latent positions, n times matrix, n number vertices. Y NULL undirected graphs, second half latent positions directed graphs, n times matrix, n number vertices. D eigenvalues (undirected graphs) singular values (directed graphs) calculated algorithm. options named list, information underlying ARPACK computation. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"function computes -dimensional Euclidean representation graph based Laplacian matrix, \\(L\\). representation computed via singular value decomposition Laplacian matrix. essentially embed_adjacency_matrix(), work Laplacian matrix, instead adjacency matrix.","code":""},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"Sussman, D.L., Tang, M., Fishkind, D.E., Priebe, C.E. Consistent Adjacency Spectral Embedding Stochastic Blockmodel Graphs, Journal American Statistical Association, Vol. 107(499), 2012","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"igraph_laplacian_spectral_embedding().","code":""},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"","code":"## A small graph lpvs <- matrix(rnorm(200), 20, 10) lpvs <- apply(lpvs, 2, function(x) { return(abs(x) / sqrt(sum(x^2))) }) RDP <- sample_dot_product(lpvs) embed <- embed_laplacian_matrix(RDP, 5)"},{"path":"https://r.igraph.org/reference/ends.html","id":null,"dir":"Reference","previous_headings":"","what":"Incident vertices of some graph edges — ends","title":"Incident vertices of some graph edges — ends","text":"Incident vertices graph edges","code":""},{"path":"https://r.igraph.org/reference/ends.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Incident vertices of some graph edges — ends","text":"","code":"ends(graph, es, names = TRUE)"},{"path":"https://r.igraph.org/reference/ends.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Incident vertices of some graph edges — ends","text":"graph input graph es sequence edges query names Whether return vertex names numeric vertex ids. default vertex names used.","code":""},{"path":"https://r.igraph.org/reference/ends.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Incident vertices of some graph edges — ends","text":"two column matrix vertex names vertex ids.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/ends.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Incident vertices of some graph edges — ends","text":"","code":"g <- make_ring(5) ends(g, E(g)) #> [,1] [,2] #> [1,] 1 2 #> [2,] 2 3 #> [3,] 3 4 #> [4,] 4 5 #> [5,] 1 5"},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"Since igraph version 0.8.0, erdos.renyi.game() random.graph.game() deprecated, sample_gnp() sample_gnm() used instead. See details. random.graph.game() (also deprecated) alias function.","code":""},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"","code":"erdos.renyi.game( n, p.or.m, type = c(\"gnp\", \"gnm\"), directed = FALSE, loops = FALSE )"},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"n number vertices graph. p..m Either probability drawing edge two arbitrary vertices (\\(G(n,p)\\) graph), number edges graph (\\(G(n,m)\\) graphs). type type random graph create, either gnp() (\\(G(n,p)\\) graph) gnm() (\\(G(n,m)\\) graph). directed Logical, whether graph directed, defaults FALSE. loops Logical, whether add loop edges, defaults FALSE.","code":""},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"Erdős, P. Rényi, ., random graphs, Publicationes Mathematicae 6, 290–297 (1959).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"","code":"g <- erdos.renyi.game(1000, 1 / 1000) #> Warning: `erdos.renyi.game()` was deprecated in igraph 0.8.0. #> ℹ Please use `sample_gnp()` instead. degree_distribution(g) #> [1] 0.373 0.381 0.183 0.049 0.011 0.002 0.001"},{"path":"https://r.igraph.org/reference/establishment.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph generation based on different vertex types — establishment.game","title":"Graph generation based on different vertex types — establishment.game","text":"establishment.game() renamed sample_traits() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/establishment.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph generation based on different vertex types — establishment.game","text":"","code":"establishment.game( nodes, types, k = 1, type.dist = rep(1, types), pref.matrix = matrix(1, types, types), directed = FALSE )"},{"path":"https://r.igraph.org/reference/establishment.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph generation based on different vertex types — establishment.game","text":"nodes number vertices graph. types number different vertex types. k number trials per time step, see details . type.dist distribution vertex types. assumed stationary time. pref.matrix matrix giving preferences given vertex types. probabilities, .e. numbers zero one. directed Logical constant, whether generate directed graphs.","code":""},{"path":"https://r.igraph.org/reference/estimate_betweenness.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated version of betweenness() — estimate_betweenness","title":"Deprecated version of betweenness() — estimate_betweenness","text":"Use betweenness() cutoff argument instead.","code":""},{"path":"https://r.igraph.org/reference/estimate_betweenness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deprecated version of betweenness() — estimate_betweenness","text":"","code":"estimate_betweenness( graph, vids = V(graph), directed = TRUE, cutoff, weights = NULL )"},{"path":"https://r.igraph.org/reference/estimate_betweenness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deprecated version of betweenness() — estimate_betweenness","text":"graph graph analyze. vids vertices vertex betweenness estimation calculated. directed Logical, whether directed paths considered determining shortest paths. cutoff maximum shortest path length consider calculating betweenness. negative, limit. weights Optional positive weight vector calculating weighted betweenness. graph weight edge attribute, used default. Weights used calculate weighted shortest paths, interpreted distances.","code":""},{"path":"https://r.igraph.org/reference/estimate_closeness.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated version of closeness() — estimate_closeness","title":"Deprecated version of closeness() — estimate_closeness","text":"Use closeness() cutoff argument instead.","code":""},{"path":"https://r.igraph.org/reference/estimate_closeness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deprecated version of closeness() — estimate_closeness","text":"","code":"estimate_closeness( graph, vids = V(graph), mode = c(\"out\", \"in\", \"all\", \"total\"), cutoff, weights = NULL, normalized = FALSE )"},{"path":"https://r.igraph.org/reference/estimate_closeness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deprecated version of closeness() — estimate_closeness","text":"graph graph analyze. vids vertices closeness calculated. mode Character string, defined types paths used measuring distance directed graphs. “” measures paths vertex, “” measures paths vertex, uses undirected paths. argument ignored undirected graphs. cutoff maximum path length consider calculating closeness. zero negative limit. weights Optional positive weight vector calculating weighted closeness. graph weight edge attribute, used default. Weights used calculating weighted shortest paths, interpreted distances. normalized Logical scalar, whether calculate normalized closeness, .e. inverse average distance reachable vertices. non-normalized closeness inverse sum distances reachable vertices.","code":""},{"path":"https://r.igraph.org/reference/estimate_edge_betweenness.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated version of edge_betweenness() — estimate_edge_betweenness","title":"Deprecated version of edge_betweenness() — estimate_edge_betweenness","text":"Use edge_betweenness() cutoff argument instead.","code":""},{"path":"https://r.igraph.org/reference/estimate_edge_betweenness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deprecated version of edge_betweenness() — estimate_edge_betweenness","text":"","code":"estimate_edge_betweenness( graph, e = E(graph), directed = TRUE, cutoff, weights = NULL )"},{"path":"https://r.igraph.org/reference/estimate_edge_betweenness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deprecated version of edge_betweenness() — estimate_edge_betweenness","text":"graph graph analyze. e edges edge betweenness calculated. directed Logical, whether directed paths considered determining shortest paths. cutoff maximum shortest path length consider calculating betweenness. negative, limit. weights Optional positive weight vector calculating weighted betweenness. graph weight edge attribute, used default. Weights used calculate weighted shortest paths, interpreted distances.","code":""},{"path":"https://r.igraph.org/reference/evcent.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Eigenvector Centrality Scores of Network Positions — evcent","title":"Find Eigenvector Centrality Scores of Network Positions — evcent","text":"evcent() renamed eigen_centrality() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/evcent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Eigenvector Centrality Scores of Network Positions — evcent","text":"","code":"evcent( graph, directed = FALSE, scale = TRUE, weights = NULL, options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/evcent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Eigenvector Centrality Scores of Network Positions — evcent","text":"graph Graph analyzed. directed Logical scalar, whether consider direction edges directed graphs. ignored undirected graphs. scale Normalization always take place. weights numerical vector NULL. argument can used give edge weights calculating weighted eigenvector centrality vertices. NULL graph weight edge attribute used. weights numerical vector used, even graph weight edge attribute. NA, edge weights used (even graph weight edge attribute). Note negative edge weights direction edges considered, eigenvector might complex. case real part reported. function interprets weights connection strength. Higher weights spread centrality better. options named list, override ARPACK options. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/exportPajek.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Cohesive Blocks — exportPajek","title":"Calculate Cohesive Blocks — exportPajek","text":"exportPajek() renamed export_pajek() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/exportPajek.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Cohesive Blocks — exportPajek","text":"","code":"exportPajek(blocks, graph, file, project.file = TRUE)"},{"path":"https://r.igraph.org/reference/exportPajek.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Cohesive Blocks — exportPajek","text":"graph cohesive_blocks() graph object class igraph. must undirected simple. (See is_simple().) graphs_from_cohesive_blocks() export_pajek() graph must supplied whose cohesive block structure given blocks() argument. file Defines file (connection) Pajek file written . project.file argument TRUE, can filename (extension), file object, general king connection object. file/connection opened already. project.file argument FALSE, several files created file must character scalar containing base name files, without extension. (can contain path files.) See also details . project.file Logical scalar, whether create single Pajek project file containing data, create separated files item. See details .","code":""},{"path":"https://r.igraph.org/reference/farthest.nodes.html","id":null,"dir":"Reference","previous_headings":"","what":"Diameter of a graph — farthest.nodes","title":"Diameter of a graph — farthest.nodes","text":"farthest.nodes() renamed farthest_vertices() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/farthest.nodes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Diameter of a graph — farthest.nodes","text":"","code":"farthest.nodes(graph, directed = TRUE, unconnected = TRUE, weights = NULL)"},{"path":"https://r.igraph.org/reference/farthest.nodes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Diameter of a graph — farthest.nodes","text":"graph graph analyze. directed Logical, whether directed undirected paths considered. ignored undirected graphs. unconnected Logical, graph unconnected. FALSE, function return number one larger largest possible diameter, always number vertices. TRUE, diameters connected components calculated largest one returned. weights Optional positive weight vector calculating weighted distances. graph weight edge attribute, used default.","code":""},{"path":"https://r.igraph.org/reference/fastgreedy.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure via greedy optimization of modularity — fastgreedy.community","title":"Community structure via greedy optimization of modularity — fastgreedy.community","text":"fastgreedy.community() renamed cluster_fast_greedy() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/fastgreedy.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure via greedy optimization of modularity — fastgreedy.community","text":"","code":"fastgreedy.community( graph, merges = TRUE, modularity = TRUE, membership = TRUE, weights = NULL )"},{"path":"https://r.igraph.org/reference/fastgreedy.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure via greedy optimization of modularity — fastgreedy.community","text":"graph input graph merges Logical scalar, whether return merge matrix. modularity Logical scalar, whether return vector containing modularity merge. membership Logical scalar, whether calculate membership vector corresponding maximum modularity score, considering possible community structures along merges. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function.","code":""},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding a feedback arc set in a graph — feedback_arc_set","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"feedback arc set graph subset edges whose removal breaks cycles graph.","code":""},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"","code":"feedback_arc_set(graph, weights = NULL, algo = c(\"approx_eades\", \"exact_ip\"))"},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"graph input graph weights Potential edge weights. graph edge attribute called ‘weight’, argument NULL, edge attribute used automatically. goal feedback arc set problem find feedback arc set smallest total weight. algo Specifies algorithm use. “exact_ip” solves feedback arc set problem exact integer programming algorithm guarantees total weight removed edges small possible. “approx_eades” uses fast (linear-time) approximation algorithm Eades, Lin Smyth. “exact” alias “exact_ip” “approx” alias “approx_eades”.","code":""},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"edge sequence (default, see return.vs.es option igraph_options()) containing feedback arc set.","code":""},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"Feedback arc sets typically used directed graphs. removal feedback arc set directed graph ensures remaining graph directed acyclic graph (DAG). undirected graphs, removal feedback arc set ensures remaining graph forest (.e. every connected component tree).","code":""},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"Peter Eades, Xuemin Lin W.F.Smyth: fast effective heuristic feedback arc set problem. Information Processing Letters 47:6, pp. 319-323, 1993","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"igraph_feedback_arc_set().","code":""},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"","code":"g <- sample_gnm(20, 40, directed = TRUE) feedback_arc_set(g) #> + 6/40 edges from d6f4e1f: #> [1] 6->15 6->19 9->15 11-> 3 16->10 17-> 5 feedback_arc_set(g, algo = \"approx_eades\") #> + 6/40 edges from d6f4e1f: #> [1] 6->15 6->19 9->15 11-> 3 16->10 17-> 5"},{"path":"https://r.igraph.org/reference/fit_hrg.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit a hierarchical random graph model — fit_hrg","title":"Fit a hierarchical random graph model — fit_hrg","text":"fit_hrg() fits HRG given graph. takes specified steps number MCMC steps perform fitting, convergence criteria specified number steps zero. fit_hrg() can start given HRG, given hrg() argument start argument TRUE. can converted hclust class using .hclust() provided package.","code":""},{"path":"https://r.igraph.org/reference/fit_hrg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit a hierarchical random graph model — fit_hrg","text":"","code":"fit_hrg(graph, hrg = NULL, start = FALSE, steps = 0)"},{"path":"https://r.igraph.org/reference/fit_hrg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit a hierarchical random graph model — fit_hrg","text":"graph graph fit model . Edge directions ignored directed graphs. hrg hierarchical random graph model, form igraphHRG object. fit_hrg() allows NULL, case random starting point used fitting. start Logical, whether start fitting/sampling supplied igraphHRG object, random starting point. steps number MCMC steps make. zero, MCMC procedure performed convergence.","code":""},{"path":"https://r.igraph.org/reference/fit_hrg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit a hierarchical random graph model — fit_hrg","text":"fit_hrg() returns igraphHRG object. list following members: left Vector contains left children internal tree vertices. first vertex always root vertex, first element vector left child root vertex. Internal vertices denoted negative numbers, starting -1 going , .e. root vertex -1. Leaf vertices denoted non-negative number, starting zero . right Vector contains right children vertices, encoding left vector. prob connection probabilities attached internal vertices, first number belongs root vertex (.e. internal vertex -1), second internal vertex -2, etc. edges number edges subtree given internal vertex. vertices number vertices subtree given internal vertex, including .","code":""},{"path":"https://r.igraph.org/reference/fit_hrg.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fit a hierarchical random graph model — fit_hrg","text":". Clauset, C. Moore, M.E.J. Newman. Hierarchical structure prediction missing links networks. Nature 453, 98–101 (2008); . Clauset, C. Moore, M.E.J. Newman. Structural Inference Hierarchies Networks. E. M. Airoldi et al. (Eds.): ICML 2006 Ws, Lecture Notes Computer Science 4503, 1–13. Springer-Verlag, Berlin Heidelberg (2007).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/fit_hrg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit a hierarchical random graph model — fit_hrg","text":"","code":"if (FALSE) { # rlang::is_interactive() ## A graph with two dense groups g <- sample_gnp(10, p = 1 / 2) + sample_gnp(10, p = 1 / 2) hrg <- fit_hrg(g) hrg summary(as.hclust(hrg)) ## The consensus tree for it consensus_tree(g, hrg = hrg, start = TRUE) ## Prediction of missing edges g2 <- make_full_graph(4) + (make_full_graph(4) - path(1, 2)) predict_edges(g2) }"},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":null,"dir":"Reference","previous_headings":"","what":"Fitting a power-law distribution function to discrete data — fit_power_law","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"fit_power_law() fits power-law distribution data set.","code":""},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"","code":"fit_power_law( x, xmin = NULL, start = 2, force.continuous = FALSE, implementation = c(\"plfit\", \"R.mle\"), p.value = FALSE, p.precision = NULL, ... )"},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"x data fit, numeric vector. implementation ‘R.mle’ data must integer values. ‘plfit’ implementation non-integer values might present continuous power-law distribution fitted. xmin Numeric scalar, NULL. lower bound fitting power-law. NULL, smallest value x used ‘R.mle’ implementation, value automatically determined ‘plfit’ implementation. argument makes possible fit tail distribution. start Numeric scalar. initial value exponent minimizing function, ‘R.mle’ implementation. Usually safe leave untouched. force.continuous Logical scalar. Whether force continuous distribution ‘plfit’ implementation, even sample vector contains integer values (chance). argument false, igraph assume continuous distribution least one sample non-integer assume discrete distribution otherwise. implementation Character scalar. implementation use. See details . p.value Set TRUE compute p-value implementation = \"plfit\". p.precision desired precision p-value calculation. precision ultimately depends number resampling attempts. number resampling trials determined 0.25 divided square required precision. instance, required precision 0.01 means 2500 samples drawn. ... Additional arguments, passed maximum likelihood optimizing function, stats4::mle(), ‘R.mle’ implementation chosen. ignored ‘plfit’ implementation.","code":""},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"Depends implementation argument. ‘R.mle’, object class ‘mle’. can used calculate confidence intervals log-likelihood. See stats4::mle-class() details. implementation ‘plfit’, result named list entries: continuous Logical scalar, whether fitted power-law distribution continuous discrete. alpha Numeric scalar, exponent fitted power-law distribution. xmin Numeric scalar, minimum value power-law distribution fitted. words, values larger xmin used input vector. logLik Numeric scalar, log-likelihood fitted parameters. KS.stat Numeric scalar, test statistic Kolmogorov-Smirnov test compares fitted distribution input vector. Smaller scores denote better fit. KS.p p.value = TRUE. Numeric scalar, p-value Kolmogorov-Smirnov test. Small p-values (less 0.05) indicate test rejected hypothesis original data drawn fitted power-law distribution.","code":""},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"function fits power-law distribution vector containing samples distribution (assumed follow power-law course). power-law distribution, generally assumed \\(P(X=x)\\) proportional \\(x^{-\\alpha}\\), \\(x\\) positive number \\(\\alpha\\) greater 1. many real-world cases, power-law behaviour kicks threshold value \\(x_\\text{min}\\). goal function determine \\(\\alpha\\) \\(x_\\text{min}\\) given, determine \\(x_\\text{min}\\) corresponding value \\(\\alpha\\). fit_power_law() provides two maximum likelihood implementations. implementation argument ‘R.mle’, BFGS optimization (see stats4::mle()) algorithm applied. additional arguments passed mle function, possible change optimization method /parameters. implementation can fit \\(x_\\text{min}\\) argument, use ‘plfit’ implementation want . ‘plfit’ implementation also uses maximum likelihood principle determine \\(\\alpha\\) given \\(x_\\text{min}\\); \\(x_\\text{min}\\) given advance, algorithm attempt find optimal value \\(p\\)-value Kolmogorov-Smirnov test fitted distribution original sample largest. function uses method Clauset, Shalizi Newman calculate parameters fitted distribution. See references details. Pass p.value = TRUE include p-value output. returned default computation may slow.","code":""},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"Power laws, Pareto distributions Zipf's law, M. E. J. Newman, Contemporary Physics, 46, 323-351, 2005. Aaron Clauset, Cosma R .Shalizi Mark E.J. Newman: Power-law distributions empirical data. SIAM Review 51(4):661-703, 2009.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"","code":"# This should approximately yield the correct exponent 3 g <- sample_pa(1000) # increase this number to have a better estimate d <- degree(g, mode = \"in\") fit1 <- fit_power_law(d + 1, 10) fit2 <- fit_power_law(d + 1, 10, implementation = \"R.mle\") fit1$alpha #> [1] 2.567177 stats4::coef(fit2) #> alpha #> 2.566887 fit1$logLik #> [1] -58.53319 stats4::logLik(fit2) #> 'log Lik.' -58.53288 (df=1)"},{"path":"https://r.igraph.org/reference/forest.fire.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Forest Fire Network Model — forest.fire.game","title":"Forest Fire Network Model — forest.fire.game","text":"forest.fire.game() renamed sample_forestfire() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/forest.fire.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Forest Fire Network Model — forest.fire.game","text":"","code":"forest.fire.game(nodes, fw.prob, bw.factor = 1, ambs = 1, directed = TRUE)"},{"path":"https://r.igraph.org/reference/forest.fire.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Forest Fire Network Model — forest.fire.game","text":"nodes number vertices graph. fw.prob forward burning probability, see details . bw.factor backward burning ratio. backward burning probability calculated bw.factor*fw.prob. ambs number ambassador vertices. directed Logical scalar, whether create directed graph.","code":""},{"path":"https://r.igraph.org/reference/from_incidence_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph from incidence matrix — from_incidence_matrix","title":"Graph from incidence matrix — from_incidence_matrix","text":"graph_from_incidence_matrix() renamed graph_from_biadjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/from_incidence_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph from incidence matrix — from_incidence_matrix","text":"","code":"from_incidence_matrix(...)"},{"path":"https://r.igraph.org/reference/from_incidence_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph from incidence matrix — from_incidence_matrix","text":"authors refer bipartite adjacency matrix \"bipartite incidence matrix\". igraph 1.6.0 later use naming avoid confusion edge-vertex incidence matrix.","code":""},{"path":"https://r.igraph.org/reference/get.adjacency.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a graph to an adjacency matrix — get.adjacency","title":"Convert a graph to an adjacency matrix — get.adjacency","text":"get.adjacency() renamed as_adjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.adjacency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a graph to an adjacency matrix — get.adjacency","text":"","code":"get.adjacency( graph, type = c(\"both\", \"upper\", \"lower\"), attr = NULL, edges = FALSE, names = TRUE, sparse = igraph_opt(\"sparsematrices\") )"},{"path":"https://r.igraph.org/reference/get.adjacency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a graph to an adjacency matrix — get.adjacency","text":"graph graph convert. type Gives create adjacency matrix undirected graphs. ignored directed graphs. Possible values: upper: upper right triangle matrix used, lower: lower left triangle matrix used. : whole matrix used, symmetric matrix returned. attr Either NULL character string giving edge attribute name. NULL traditional adjacency matrix returned. NULL values given edge attribute included adjacency matrix. graph multiple edges, edge attribute arbitrarily chosen edge (multiple edges) included. argument ignored edges TRUE. Note works certain attribute types. sparse argumen TRUE, attribute must either logical numeric. sparse argument FALSE, character also allowed. reason difference Matrix package support character sparse matrices yet. edges Logical scalar, whether return edge ids matrix. non-existant edges zero returned. names Logical constant, whether assign row column names matrix. assigned name vertex attribute present graph. sparse Logical scalar, whether create sparse matrix. ‘Matrix’ package must installed creating sparse matrices.","code":""},{"path":"https://r.igraph.org/reference/get.adjedgelist.html","id":null,"dir":"Reference","previous_headings":"","what":"Adjacency lists — get.adjedgelist","title":"Adjacency lists — get.adjedgelist","text":"get.adjedgelist() renamed as_adj_edge_list() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.adjedgelist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adjacency lists — get.adjedgelist","text":"","code":"get.adjedgelist( graph, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = c(\"twice\", \"once\", \"ignore\") )"},{"path":"https://r.igraph.org/reference/get.adjedgelist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adjacency lists — get.adjedgelist","text":"graph input graph. mode Character scalar, gives kind adjacent edges/vertices include lists. ‘’ outgoing edges/vertices, ‘’ incoming edges/vertices, ‘’ . argument ignored undirected graphs. loops Character scalar, one \"ignore\" (omit loops), \"twice\" (include loop edges twice) \"\" (include ). \"twice\" allowed directed graphs replaced \"\".","code":""},{"path":"https://r.igraph.org/reference/get.adjlist.html","id":null,"dir":"Reference","previous_headings":"","what":"Adjacency lists — get.adjlist","title":"Adjacency lists — get.adjlist","text":"get.adjlist() renamed as_adj_list() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.adjlist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adjacency lists — get.adjlist","text":"","code":"get.adjlist( graph, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = c(\"twice\", \"once\", \"ignore\"), multiple = TRUE )"},{"path":"https://r.igraph.org/reference/get.adjlist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adjacency lists — get.adjlist","text":"graph input graph. mode Character scalar, gives kind adjacent edges/vertices include lists. ‘’ outgoing edges/vertices, ‘’ incoming edges/vertices, ‘’ . argument ignored undirected graphs. loops Character scalar, one \"ignore\" (omit loops), \"twice\" (include loop edges twice) \"\" (include ). \"twice\" allowed directed graphs replaced \"\". multiple Logical scalar, set FALSE use one representative set parallel edges.","code":""},{"path":"https://r.igraph.org/reference/get.all.shortest.paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Shortest (directed or undirected) paths between vertices — get.all.shortest.paths","title":"Shortest (directed or undirected) paths between vertices — get.all.shortest.paths","text":"get..shortest.paths() renamed all_shortest_paths() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.all.shortest.paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shortest (directed or undirected) paths between vertices — get.all.shortest.paths","text":"","code":"get.all.shortest.paths( graph, from, to = V(graph), mode = c(\"out\", \"all\", \"in\"), weights = NULL )"},{"path":"https://r.igraph.org/reference/get.all.shortest.paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shortest (directed or undirected) paths between vertices — get.all.shortest.paths","text":"graph graph work . Numeric constant, vertex shortest paths calculated. Note right now vector vertex ids, single vertex. Numeric vector, vertices shortest paths calculated. default includes vertices. Note distances() every vertex must included . (required shortest_paths(). mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, graph treated undirected, .e. edge directions taken account. argument ignored undirected graphs. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). weighted graph, length path sum weights constituent edges.","code":""},{"path":"https://r.igraph.org/reference/get.data.frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating igraph graphs from data frames or vice-versa — get.data.frame","title":"Creating igraph graphs from data frames or vice-versa — get.data.frame","text":"get.data.frame() renamed as_data_frame() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.data.frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating igraph graphs from data frames or vice-versa — get.data.frame","text":"","code":"get.data.frame(x, what = c(\"edges\", \"vertices\", \"both\"))"},{"path":"https://r.igraph.org/reference/get.data.frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating igraph graphs from data frames or vice-versa — get.data.frame","text":"x igraph object. Character constant, whether return info vertices, edges, . default ‘edges’.","code":""},{"path":"https://r.igraph.org/reference/get.diameter.html","id":null,"dir":"Reference","previous_headings":"","what":"Diameter of a graph — get.diameter","title":"Diameter of a graph — get.diameter","text":"get.diameter() renamed get_diameter() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.diameter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Diameter of a graph — get.diameter","text":"","code":"get.diameter(graph, directed = TRUE, unconnected = TRUE, weights = NULL)"},{"path":"https://r.igraph.org/reference/get.diameter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Diameter of a graph — get.diameter","text":"graph graph analyze. directed Logical, whether directed undirected paths considered. ignored undirected graphs. unconnected Logical, graph unconnected. FALSE, function return number one larger largest possible diameter, always number vertices. TRUE, diameters connected components calculated largest one returned. weights Optional positive weight vector calculating weighted distances. graph weight edge attribute, used default.","code":""},{"path":"https://r.igraph.org/reference/get.edge.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Query edge attributes of a graph — get.edge.attribute","title":"Query edge attributes of a graph — get.edge.attribute","text":"get.edge.attribute() renamed edge_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.edge.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query edge attributes of a graph — get.edge.attribute","text":"","code":"get.edge.attribute(graph, name, index = E(graph))"},{"path":"https://r.igraph.org/reference/get.edge.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query edge attributes of a graph — get.edge.attribute","text":"graph graph name name attribute query. missing, edge attributes returned list. index optional edge sequence query edge attributes subset edges.","code":""},{"path":"https://r.igraph.org/reference/get.edge.html","id":null,"dir":"Reference","previous_headings":"","what":"Incident vertices of some graph edges — get.edge","title":"Incident vertices of some graph edges — get.edge","text":"Use ends().","code":""},{"path":"https://r.igraph.org/reference/get.edge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Incident vertices of some graph edges — get.edge","text":"","code":"get.edge(graph, id)"},{"path":"https://r.igraph.org/reference/get.edge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Incident vertices of some graph edges — get.edge","text":"graph input graph","code":""},{"path":"https://r.igraph.org/reference/get.edge.ids.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the edge ids based on the incident vertices of the edges — get.edge.ids","title":"Find the edge ids based on the incident vertices of the edges — get.edge.ids","text":"get.edge.ids() renamed get_edge_ids() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.edge.ids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the edge ids based on the incident vertices of the edges — get.edge.ids","text":"","code":"get.edge.ids(graph, vp, directed = TRUE, error = FALSE, multi = deprecated())"},{"path":"https://r.igraph.org/reference/get.edge.ids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the edge ids based on the incident vertices of the edges — get.edge.ids","text":"graph input graph. vp incident vertices, given vertex ids symbolic vertex names. interpreted pairwise, .e. first second used first edge, third fourth second, etc. directed Logical scalar, whether consider edge directions directed graphs. argument ignored undirected graphs. error Logical scalar, whether report error edge found graph. FALSE, error reported, zero returned non-existant edge(s). multi","code":""},{"path":"https://r.igraph.org/reference/get.edgelist.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a graph to an edge list — get.edgelist","title":"Convert a graph to an edge list — get.edgelist","text":"get.edgelist() renamed as_edgelist() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.edgelist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a graph to an edge list — get.edgelist","text":"","code":"get.edgelist(graph, names = TRUE)"},{"path":"https://r.igraph.org/reference/get.edgelist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a graph to an edge list — get.edgelist","text":"graph graph convert. names Whether return character matrix containing vertex names (.e. name vertex attribute) exist numeric vertex ids.","code":""},{"path":"https://r.igraph.org/reference/get.graph.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph attributes of a graph — get.graph.attribute","title":"Graph attributes of a graph — get.graph.attribute","text":"get.graph.attribute() renamed graph_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.graph.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph attributes of a graph — get.graph.attribute","text":"","code":"get.graph.attribute(graph, name)"},{"path":"https://r.igraph.org/reference/get.graph.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph attributes of a graph — get.graph.attribute","text":"graph Input graph. name name attribute query. missing, attributes returned list.","code":""},{"path":"https://r.igraph.org/reference/get.incidence.html","id":null,"dir":"Reference","previous_headings":"","what":"Bipartite adjacency matrix of a bipartite graph — get.incidence","title":"Bipartite adjacency matrix of a bipartite graph — get.incidence","text":"get.incidence() renamed as_biadjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.incidence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bipartite adjacency matrix of a bipartite graph — get.incidence","text":"","code":"get.incidence(graph, types = NULL, attr = NULL, names = TRUE, sparse = FALSE)"},{"path":"https://r.igraph.org/reference/get.incidence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bipartite adjacency matrix of a bipartite graph — get.incidence","text":"graph input graph. direction edges ignored directed graphs. types optional vertex type vector use instead type vertex attribute. must supply argument graph type vertex attribute. attr Either NULL character string giving edge attribute name. NULL, traditional bipartite adjacency matrix returned. NULL values given edge attribute included bipartite adjacency matrix. graph multiple edges, edge attribute arbitrarily chosen edge (multiple edges) included. names Logical scalar, TRUE vertices graph named (.e. graph vertex attribute called name), vertex names added result row column names. Otherwise ids vertices used row column names. sparse Logical scalar, TRUE sparse matrix created, need Matrix package .","code":""},{"path":"https://r.igraph.org/reference/get.shortest.paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Shortest (directed or undirected) paths between vertices — get.shortest.paths","title":"Shortest (directed or undirected) paths between vertices — get.shortest.paths","text":"get.shortest.paths() renamed shortest_paths() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.shortest.paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shortest (directed or undirected) paths between vertices — get.shortest.paths","text":"","code":"get.shortest.paths( graph, from, to = V(graph), mode = c(\"out\", \"all\", \"in\"), weights = NULL, output = c(\"vpath\", \"epath\", \"both\"), predecessors = FALSE, inbound.edges = FALSE, algorithm = c(\"automatic\", \"unweighted\", \"dijkstra\", \"bellman-ford\") )"},{"path":"https://r.igraph.org/reference/get.shortest.paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shortest (directed or undirected) paths between vertices — get.shortest.paths","text":"graph graph work . Numeric constant, vertex shortest paths calculated. Note right now vector vertex ids, single vertex. Numeric vector, vertices shortest paths calculated. default includes vertices. Note distances() every vertex must included . (required shortest_paths(). mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, graph treated undirected, .e. edge directions taken account. argument ignored undirected graphs. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). weighted graph, length path sum weights constituent edges. output Character scalar, defines report shortest paths. “vpath” means vertices along paths reported, form used prior igraph version 0.6. “epath” means edges along paths reported. “” means forms returned, named list components “vpath” “epath”. predecessors Logical scalar, whether return predecessor vertex vertex. predecessor vertex tree vertex vertex reached. predecessor start vertex (argument) definition. predecessor zero, means given vertex reached source search. Note search terminates vertices reached. inbound.edges Logical scalar, whether return inbound edge vertex. inbound edge vertex tree edge via vertex reached. start vertex vertices reached search zero corresponding entry vector. Note search terminates vertices reached. algorithm algorithm use calculation. default igraph tries select fastest suitable algorithm. weights, unweighted breadth-first search used, otherwise weights positive, Dijkstra's algorithm used. negative weights calculation 100 sources, Johnson's algorithm used. Otherwise Bellman-Ford algorithm used. can override igraph's choice explicitly giving parameter. Note igraph C core might still override choice obvious cases, .e. edge weights, unweighted algorithm used, regardless argument.","code":""},{"path":"https://r.igraph.org/reference/get.stochastic.html","id":null,"dir":"Reference","previous_headings":"","what":"Stochastic matrix of a graph — get.stochastic","title":"Stochastic matrix of a graph — get.stochastic","text":"get.stochastic() renamed stochastic_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.stochastic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stochastic matrix of a graph — get.stochastic","text":"","code":"get.stochastic( graph, column.wise = FALSE, sparse = igraph_opt(\"sparsematrices\") )"},{"path":"https://r.igraph.org/reference/get.stochastic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stochastic matrix of a graph — get.stochastic","text":"graph input graph. Must class igraph. column.wise FALSE, rows stochastic matrix sum one; otherwise columns. sparse Logical scalar, whether return sparse matrix. Matrix package needed sparse matrices.","code":""},{"path":"https://r.igraph.org/reference/get.vertex.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Query vertex attributes of a graph — get.vertex.attribute","title":"Query vertex attributes of a graph — get.vertex.attribute","text":"get.vertex.attribute() renamed vertex_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.vertex.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query vertex attributes of a graph — get.vertex.attribute","text":"","code":"get.vertex.attribute(graph, name, index = V(graph))"},{"path":"https://r.igraph.org/reference/get.vertex.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query vertex attributes of a graph — get.vertex.attribute","text":"graph graph. name Name attribute query. missing, vertex attributes returned list. index optional vertex sequence query attribute vertices.","code":""},{"path":"https://r.igraph.org/reference/getIgraphOpt.html","id":null,"dir":"Reference","previous_headings":"","what":"Parameters for the igraph package — getIgraphOpt","title":"Parameters for the igraph package — getIgraphOpt","text":"getIgraphOpt() renamed igraph_opt() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/getIgraphOpt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parameters for the igraph package — getIgraphOpt","text":"","code":"getIgraphOpt(x, default = NULL)"},{"path":"https://r.igraph.org/reference/getIgraphOpt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parameters for the igraph package — getIgraphOpt","text":"x character string holding option name. default specified option set options list, value returned. facilitates retrieving option checking whether set setting separately .","code":""},{"path":"https://r.igraph.org/reference/get_edge_ids.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the edge ids based on the incident vertices of the edges — get_edge_ids","title":"Find the edge ids based on the incident vertices of the edges — get_edge_ids","text":"Find edges igraph graph specified end points. function handles multi-graph (graphs multiple edges) can consider ignore edge directions directed graphs.","code":""},{"path":"https://r.igraph.org/reference/get_edge_ids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the edge ids based on the incident vertices of the edges — get_edge_ids","text":"","code":"get_edge_ids(graph, vp, directed = TRUE, error = FALSE)"},{"path":"https://r.igraph.org/reference/get_edge_ids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the edge ids based on the incident vertices of the edges — get_edge_ids","text":"graph input graph. vp incident vertices, given vertex ids symbolic vertex names. interpreted pairwise, .e. first second used first edge, third fourth second, etc. directed Logical scalar, whether consider edge directions directed graphs. argument ignored undirected graphs. error Logical scalar, whether report error edge found graph. FALSE, error reported, zero returned non-existant edge(s).","code":""},{"path":"https://r.igraph.org/reference/get_edge_ids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the edge ids based on the incident vertices of the edges — get_edge_ids","text":"numeric vector edge ids, one pair input vertices. edge input graph given pair vertices, zero reported. (error argument FALSE.)","code":""},{"path":"https://r.igraph.org/reference/get_edge_ids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find the edge ids based on the incident vertices of the edges — get_edge_ids","text":"igraph vertex ids natural numbers, starting one, number vertices graph. Similarly, edges also numbered one, number edges. function allows finding edges graph, via incident vertices.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/get_edge_ids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find the edge ids based on the incident vertices of the edges — get_edge_ids","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/get_edge_ids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find the edge ids based on the incident vertices of the edges — get_edge_ids","text":"","code":"g <- make_ring(10) ei <- get_edge_ids(g, c(1, 2, 4, 5)) E(g)[ei] #> + 2/10 edges from 945b747: #> [1] 1--2 4--5 ## non-existant edge get_edge_ids(g, c(2, 1, 1, 4, 5, 4)) #> [1] 1 0 4 ## For multiple edges, a single edge id is returned, ## as many times as corresponding pairs in the vertex series. g <- make_graph(rep(c(1, 2), 5)) eis <- get_edge_ids(g, c(1, 2, 1, 2)) eis #> [1] 5 5 E(g)[eis] #> + 2/5 edges from a3f64d2: #> [1] 1->2 1->2"},{"path":"https://r.igraph.org/reference/girth.html","id":null,"dir":"Reference","previous_headings":"","what":"Girth of a graph — girth","title":"Girth of a graph — girth","text":"girth graph length shortest circle .","code":""},{"path":"https://r.igraph.org/reference/girth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Girth of a graph — girth","text":"","code":"girth(graph, circle = TRUE)"},{"path":"https://r.igraph.org/reference/girth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Girth of a graph — girth","text":"graph input graph. may directed, algorithm searches undirected circles anyway. circle Logical scalar, whether return shortest circle .","code":""},{"path":"https://r.igraph.org/reference/girth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Girth of a graph — girth","text":"named list two components: girth Integer constant, girth graph, 0 graph acyclic. circle Numeric vector vertex ids shortest circle.","code":""},{"path":"https://r.igraph.org/reference/girth.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Girth of a graph — girth","text":"current implementation works undirected graphs , directed graphs treated undirected graphs. Loop edges multiple edges ignored. graph forest (.e. acyclic), Inf returned. implementation based Alon Itai Michael Rodeh: Finding minimum circuit graph Proceedings ninth annual ACM symposium Theory computing, 1-10, 1977. first implementation function done Keith Briggs, thanks Keith.","code":""},{"path":"https://r.igraph.org/reference/girth.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Girth of a graph — girth","text":"Alon Itai Michael Rodeh: Finding minimum circuit graph Proceedings ninth annual ACM symposium Theory computing, 1-10, 1977","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/girth.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Girth of a graph — girth","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/girth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Girth of a graph — girth","text":"","code":"# No circle in a tree g <- make_tree(1000, 3) girth(g) #> $girth #> [1] Inf #> #> $circle #> + 0/1000 vertices, from 4602f00: #> # The worst case running time is for a ring g <- make_ring(100) girth(g) #> $girth #> [1] 100 #> #> $circle #> + 100/100 vertices, from 8e03806: #> [1] 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 #> [19] 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 #> [37] 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1 2 3 4 #> [55] 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 #> [73] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 #> [91] 41 42 43 44 45 46 47 48 49 50 #> # What about a random graph? g <- sample_gnp(1000, 1 / 1000) girth(g) #> $girth #> [1] 12 #> #> $circle #> + 12/1000 vertices, from d2475e4: #> [1] 903 811 514 822 850 938 125 275 732 518 446 475 #>"},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":null,"dir":"Reference","previous_headings":"","what":"Efficiency of a graph — global_efficiency","title":"Efficiency of a graph — global_efficiency","text":"functions calculate global average local efficiency network, local efficiency every vertex network. See definitions.","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Efficiency of a graph — global_efficiency","text":"","code":"global_efficiency(graph, weights = NULL, directed = TRUE) local_efficiency( graph, vids = V(graph), weights = NULL, directed = TRUE, mode = c(\"all\", \"out\", \"in\", \"total\") ) average_local_efficiency( graph, weights = NULL, directed = TRUE, mode = c(\"all\", \"out\", \"in\", \"total\") )"},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Efficiency of a graph — global_efficiency","text":"graph graph analyze. weights edge weights. edge weights must non-negative; additionally, edge weight may NaN. NULL (default) graph weight edge attribute, used automatically. directed Logical scalar, whether consider directed paths. Ignored undirected graphs. vids vertex ids vertices calculation done. Applies local efficiency calculation . mode Specifies define local neighborhood vertex directed graphs. “” considers -neighbors , “” considers -neighbors , “” considers .","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Efficiency of a graph — global_efficiency","text":"global_efficiency(), global efficiency graph single number. average_local_efficiency(), average local efficiency graph single number. local_efficiency(), local efficiency vertex vector.","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"global-efficiency","dir":"Reference","previous_headings":"","what":"Global efficiency","title":"Efficiency of a graph — global_efficiency","text":"global efficiency network defined average inverse distances pairs vertices. precisely: $$E_g = \\frac{1}{n (n-1)} \\sum_{\\ne j} \\frac{1}{d_{ij}}$$ \\(n\\) number vertices. inverse distance pairs reachable considered zero. graphs fewer 2 vertices, NaN returned.","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"local-efficiency","dir":"Reference","previous_headings":"","what":"Local efficiency","title":"Efficiency of a graph — global_efficiency","text":"local efficiency network around vertex defined follows: remove vertex compute distances (shortest path lengths) neighbours rest network. local efficiency around removed vertex average inverse distances. inverse distance two vertices reachable considered zero. local efficiency around vertex fewer two neighbours taken zero convention.","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"average-local-efficiency","dir":"Reference","previous_headings":"","what":"Average local efficiency","title":"Efficiency of a graph — global_efficiency","text":"average local efficiency network simply arithmetic mean local efficiencies vertices; see definition local efficiency .","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Efficiency of a graph — global_efficiency","text":"V. Latora M. Marchiori: Efficient Behavior Small-World Networks, Phys. Rev. Lett. 87, 198701 (2001). . Vragović, E. Louis, . Díaz-Guilera, Efficiency informational transfer regular complex networks, Phys. Rev. E 71, 1 (2005).","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Efficiency of a graph — global_efficiency","text":"igraph_global_efficiency(), igraph_local_efficiency(), igraph_average_local_efficiency().","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Efficiency of a graph — global_efficiency","text":"","code":"g <- make_graph(\"zachary\") global_efficiency(g) #> [1] 0.4920083 average_local_efficiency(g) #> [1] 0.752932"},{"path":"https://r.igraph.org/reference/gorder.html","id":null,"dir":"Reference","previous_headings":"","what":"Order (number of vertices) of a graph — gorder","title":"Order (number of vertices) of a graph — gorder","text":"vcount() gorder() aliases.","code":""},{"path":"https://r.igraph.org/reference/gorder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Order (number of vertices) of a graph — gorder","text":"","code":"vcount(graph) gorder(graph)"},{"path":"https://r.igraph.org/reference/gorder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Order (number of vertices) of a graph — gorder","text":"graph graph","code":""},{"path":"https://r.igraph.org/reference/gorder.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Order (number of vertices) of a graph — gorder","text":"Number vertices, numeric scalar.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/gorder.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Order (number of vertices) of a graph — gorder","text":"igraph_vcount().","code":""},{"path":"https://r.igraph.org/reference/gorder.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Order (number of vertices) of a graph — gorder","text":"","code":"g <- make_ring(10) gorder(g) #> [1] 10 vcount(g) #> [1] 10"},{"path":"https://r.igraph.org/reference/graph.adhesion.html","id":null,"dir":"Reference","previous_headings":"","what":"Edge connectivity — graph.adhesion","title":"Edge connectivity — graph.adhesion","text":"graph.adhesion() renamed adhesion() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.adhesion.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Edge connectivity — graph.adhesion","text":"","code":"graph.adhesion(graph, checks = TRUE)"},{"path":"https://r.igraph.org/reference/graph.adhesion.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Edge connectivity — graph.adhesion","text":"graph input graph. checks Logical constant. Whether check graph connected also degree vertices. graph (strongly) connected connectivity obviously zero. Otherwise minimum degree one edge connectivity also one. good idea perform checks, can done quickly compared connectivity calculation . suggested Peter McMahan, thanks Peter.","code":""},{"path":"https://r.igraph.org/reference/graph.adjacency.html","id":null,"dir":"Reference","previous_headings":"","what":"Create graphs from adjacency matrices — graph.adjacency","title":"Create graphs from adjacency matrices — graph.adjacency","text":"graph.adjacency() renamed graph_from_adjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.adjacency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create graphs from adjacency matrices — graph.adjacency","text":"","code":"graph.adjacency( adjmatrix, mode = c(\"directed\", \"undirected\", \"max\", \"min\", \"upper\", \"lower\", \"plus\"), weighted = NULL, diag = TRUE, add.colnames = NULL, add.rownames = NA )"},{"path":"https://r.igraph.org/reference/graph.adjacency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create graphs from adjacency matrices — graph.adjacency","text":"adjmatrix square adjacency matrix. igraph version 0.5.1 can sparse matrix created Matrix package. mode Character scalar, specifies igraph interpret supplied matrix. See also weighted argument, interpretation depends . Possible values : directed, undirected, upper, lower, max, min, plus. See details . weighted argument specifies whether create weighted graph adjacency matrix. NULL unweighted graph created elements adjacency matrix gives number edges vertices. character constant every non-zero matrix entry edge created value entry added edge attribute named weighted argument. TRUE weighted graph created name edge attribute weight. See also details . diag Logical scalar, whether include diagonal matrix calculation. FALSE diagonal zerod first. add.colnames Character scalar, whether add column names vertex attributes. ‘NULL’ (default) , present, column names added vertex attribute ‘name’. ‘NA’ added. character constant, gives name vertex attribute add. add.rownames Character scalar, whether add row names vertex attributes. Possible values previous argument. default row names added. ‘add.rownames’ ‘add.colnames’ specify vertex attribute, former ignored.","code":""},{"path":"https://r.igraph.org/reference/graph.adjlist.html","id":null,"dir":"Reference","previous_headings":"","what":"Create graphs from adjacency lists — graph.adjlist","title":"Create graphs from adjacency lists — graph.adjlist","text":"graph.adjlist() renamed graph_from_adj_list() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.adjlist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create graphs from adjacency lists — graph.adjlist","text":"","code":"graph.adjlist(adjlist, mode = c(\"out\", \"in\", \"all\", \"total\"), duplicate = TRUE)"},{"path":"https://r.igraph.org/reference/graph.adjlist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create graphs from adjacency lists — graph.adjlist","text":"adjlist adjacency list. consistent, .e. maximum throughout vectors list must less number vectors (=number vertices graph). mode Character scalar, specifies whether graph create undirected (‘’ ‘total’) directed; latter case, whether contains outgoing (‘’) incoming (‘’) neighbors vertices. duplicate Logical scalar. undirected graphs gives whether edges included list twice. E.g. TRUE undirected {,B} edge graph_from_adj_list() expects included neighbors B B included neighbors . argument ignored mode .","code":""},{"path":"https://r.igraph.org/reference/graph.atlas.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a graph from the Graph Atlas — graph.atlas","title":"Create a graph from the Graph Atlas — graph.atlas","text":"graph.atlas() renamed graph_from_atlas() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.atlas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a graph from the Graph Atlas — graph.atlas","text":"","code":"graph.atlas(n)"},{"path":"https://r.igraph.org/reference/graph.atlas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a graph from the Graph Atlas — graph.atlas","text":"n id graph create.","code":""},{"path":"https://r.igraph.org/reference/graph.automorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of automorphisms — graph.automorphisms","title":"Number of automorphisms — graph.automorphisms","text":"graph.automorphisms() renamed count_automorphisms() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.automorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of automorphisms — graph.automorphisms","text":"","code":"graph.automorphisms( graph, colors = NULL, sh = c(\"fm\", \"f\", \"fs\", \"fl\", \"flm\", \"fsm\") )"},{"path":"https://r.igraph.org/reference/graph.automorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of automorphisms — graph.automorphisms","text":"graph input graph, treated undirected. colors colors individual vertices graph; vertices color allowed match automorphism. omitted, igraph uses color attribute vertices, , vertex attribute, simply assumes vertices color. Pass NULL explicitly graph color vertex attribute want use . sh splitting heuristics BLISS algorithm. Possible values : ‘f’: first non-singleton cell, ‘fl’: first largest non-singleton cell, ‘fs’: first smallest non-singleton cell, ‘fm’: first maximally non-trivially connected non-singleton cell, ‘flm’: first largest maximally non-trivially connected non-singleton cell, ‘fsm’: first smallest maximally non-trivially connected non-singleton cell.","code":""},{"path":"https://r.igraph.org/reference/graph.bfs.html","id":null,"dir":"Reference","previous_headings":"","what":"Breadth-first search — graph.bfs","title":"Breadth-first search — graph.bfs","text":"graph.bfs() renamed bfs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.bfs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Breadth-first search — graph.bfs","text":"","code":"graph.bfs( graph, root, mode = c(\"out\", \"in\", \"all\", \"total\"), unreachable = TRUE, restricted = NULL, order = TRUE, rank = FALSE, father = FALSE, pred = FALSE, succ = FALSE, dist = FALSE, callback = NULL, extra = NULL, rho = parent.frame(), neimode )"},{"path":"https://r.igraph.org/reference/graph.bfs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Breadth-first search — graph.bfs","text":"graph input graph. root Numeric vector, usually length one. root vertex, root vertices start search . mode directed graphs specifies type edges follow. ‘’ follows outgoing, ‘’ incoming edges. ‘’ ignores edge directions completely. ‘total’ synonym ‘’. argument ignored undirected graphs. unreachable Logical scalar, whether search visit vertices unreachable given root vertex (vertices). TRUE, additional searches performed vertices visited. restricted NULL (=restriction), vector vertices (ids symbolic names). latter case, search restricted given vertices. order Logical scalar, whether return ordering vertices. rank Logical scalar, whether return rank vertices. father Logical scalar, whether return father vertices. pred Logical scalar, whether return predecessors vertices. succ Logical scalar, whether return successors vertices. dist Logical scalar, whether return distance root search tree. callback NULL, must callback function. called whenever vertex visited. See details . extra Additional argument supply callback function. rho environment callback function evaluated. neimode argument deprecated igraph 1.3.0; use mode instead.","code":""},{"path":"https://r.igraph.org/reference/graph.bipartite.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a bipartite graph — graph.bipartite","title":"Create a bipartite graph — graph.bipartite","text":"graph.bipartite() renamed make_bipartite_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.bipartite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a bipartite graph — graph.bipartite","text":"","code":"graph.bipartite(types, edges, directed = FALSE)"},{"path":"https://r.igraph.org/reference/graph.bipartite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a bipartite graph — graph.bipartite","text":"types vector giving vertex types. coerced boolean. length vector gives number vertices graph. vector named vector, names attached graph name vertex attribute. edges vector giving edges graph, way regular make_graph() function. checked edges indeed connect vertices different kind, according supplied types vector. vector may string vector types named vector. directed Whether create directed graph, boolean constant. Note default undirected graphs created, common bipartite graphs.","code":""},{"path":"https://r.igraph.org/reference/graph.cohesion.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex connectivity — graph.cohesion","title":"Vertex connectivity — graph.cohesion","text":"graph.cohesion() renamed cohesion() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.cohesion.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex connectivity — graph.cohesion","text":"","code":"graph.cohesion(x, ...)"},{"path":"https://r.igraph.org/reference/graph.cohesion.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex connectivity — graph.cohesion","text":"x x ... passed cohesion()","code":""},{"path":"https://r.igraph.org/reference/graph.complementer.html","id":null,"dir":"Reference","previous_headings":"","what":"Complementer of a graph — graph.complementer","title":"Complementer of a graph — graph.complementer","text":"graph.complementer() renamed complementer() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.complementer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Complementer of a graph — graph.complementer","text":"","code":"graph.complementer(graph, loops = FALSE)"},{"path":"https://r.igraph.org/reference/graph.complementer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Complementer of a graph — graph.complementer","text":"graph input graph, can directed undirected. loops Logical constant, whether generate loop edges.","code":""},{"path":"https://r.igraph.org/reference/graph.compose.html","id":null,"dir":"Reference","previous_headings":"","what":"Compose two graphs as binary relations — graph.compose","title":"Compose two graphs as binary relations — graph.compose","text":"graph.compose() renamed compose() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.compose.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compose two graphs as binary relations — graph.compose","text":"","code":"graph.compose(g1, g2, byname = \"auto\")"},{"path":"https://r.igraph.org/reference/graph.compose.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compose two graphs as binary relations — graph.compose","text":"g1 first input graph. g2 second input graph. byname logical scalar, character scalar auto. Whether perform operation based symbolic vertex names. auto, means TRUE graphs named FALSE otherwise. warning generated auto one graph, graphs named.","code":""},{"path":"https://r.igraph.org/reference/graph.coreness.html","id":null,"dir":"Reference","previous_headings":"","what":"K-core decomposition of graphs — graph.coreness","title":"K-core decomposition of graphs — graph.coreness","text":"graph.coreness() renamed coreness() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.coreness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"K-core decomposition of graphs — graph.coreness","text":"","code":"graph.coreness(graph, mode = c(\"all\", \"out\", \"in\"))"},{"path":"https://r.igraph.org/reference/graph.coreness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"K-core decomposition of graphs — graph.coreness","text":"graph input graph, can directed undirected mode type core directed graphs. Character constant, possible values: : -cores computed, : -cores computed, : corresponding undirected graph considered. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/graph.data.frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating igraph graphs from data frames or vice-versa — graph.data.frame","title":"Creating igraph graphs from data frames or vice-versa — graph.data.frame","text":"graph.data.frame() renamed graph_from_data_frame() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.data.frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating igraph graphs from data frames or vice-versa — graph.data.frame","text":"","code":"graph.data.frame(d, directed = TRUE, vertices = NULL)"},{"path":"https://r.igraph.org/reference/graph.data.frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating igraph graphs from data frames or vice-versa — graph.data.frame","text":"d data frame containing symbolic edge list first two columns. Additional columns considered edge attributes. Since version 0.7 argument coerced data frame .data.frame. directed Logical scalar, whether create directed graph. vertices data frame vertex metadata, NULL. See details . Since version 0.7 argument coerced data frame .data.frame, NULL.","code":""},{"path":"https://r.igraph.org/reference/graph.de.bruijn.html","id":null,"dir":"Reference","previous_headings":"","what":"De Bruijn graphs — graph.de.bruijn","title":"De Bruijn graphs — graph.de.bruijn","text":"graph.de.bruijn() renamed make_de_bruijn_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.de.bruijn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"De Bruijn graphs — graph.de.bruijn","text":"","code":"graph.de.bruijn(m, n)"},{"path":"https://r.igraph.org/reference/graph.de.bruijn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"De Bruijn graphs — graph.de.bruijn","text":"m Integer scalar, size alphabet. See details . n Integer scalar, length labels. See details .","code":""},{"path":"https://r.igraph.org/reference/graph.density.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph density — graph.density","title":"Graph density — graph.density","text":"graph.density() renamed edge_density() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.density.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph density — graph.density","text":"","code":"graph.density(graph, loops = FALSE)"},{"path":"https://r.igraph.org/reference/graph.density.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph density — graph.density","text":"graph input graph. loops Logical constant, whether loop edges may exist graph. affects calculation largest possible number edges graph. parameter set FALSE yet graph contains self-loops, result meaningful.","code":""},{"path":"https://r.igraph.org/reference/graph.dfs.html","id":null,"dir":"Reference","previous_headings":"","what":"Depth-first search — graph.dfs","title":"Depth-first search — graph.dfs","text":"graph.dfs() renamed dfs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.dfs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Depth-first search — graph.dfs","text":"","code":"graph.dfs( graph, root, mode = c(\"out\", \"in\", \"all\", \"total\"), unreachable = TRUE, order = TRUE, order.out = FALSE, father = FALSE, dist = FALSE, in.callback = NULL, out.callback = NULL, extra = NULL, rho = parent.frame(), neimode )"},{"path":"https://r.igraph.org/reference/graph.dfs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Depth-first search — graph.dfs","text":"graph input graph. root single root vertex start search . mode directed graphs specifies type edges follow. ‘’ follows outgoing, ‘’ incoming edges. ‘’ ignores edge directions completely. ‘total’ synonym ‘’. argument ignored undirected graphs. unreachable Logical scalar, whether search visit vertices unreachable given root vertex (vertices). TRUE, additional searches performed vertices visited. order Logical scalar, whether return DFS ordering vertices. order.Logical scalar, whether return ordering based leaving subtree vertex. father Logical scalar, whether return father vertices. dist Logical scalar, whether return distance root search tree. .callback NULL, must callback function. called whenever vertex visited. See details . .callback NULL, must callback function. called whenever subtree vertex completed algorithm. See details . extra Additional argument supply callback function. rho environment callback function evaluated. neimode argument deprecated igraph 1.3.0; use mode instead.","code":""},{"path":"https://r.igraph.org/reference/graph.difference.html","id":null,"dir":"Reference","previous_headings":"","what":"Difference of two sets — graph.difference","title":"Difference of two sets — graph.difference","text":"graph.difference() renamed difference() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.difference.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Difference of two sets — graph.difference","text":"","code":"graph.difference(...)"},{"path":"https://r.igraph.org/reference/graph.difference.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Difference of two sets — graph.difference","text":"... Arguments, number interpretation depends function implements difference().","code":""},{"path":"https://r.igraph.org/reference/graph.disjoint.union.html","id":null,"dir":"Reference","previous_headings":"","what":"Disjoint union of graphs — graph.disjoint.union","title":"Disjoint union of graphs — graph.disjoint.union","text":"graph.disjoint.union() renamed disjoint_union() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.disjoint.union.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Disjoint union of graphs — graph.disjoint.union","text":"","code":"graph.disjoint.union(...)"},{"path":"https://r.igraph.org/reference/graph.disjoint.union.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Disjoint union of graphs — graph.disjoint.union","text":"... Graph objects lists graph objects.","code":""},{"path":"https://r.igraph.org/reference/graph.diversity.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph diversity — graph.diversity","title":"Graph diversity — graph.diversity","text":"graph.diversity() renamed diversity() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.diversity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph diversity — graph.diversity","text":"","code":"graph.diversity(graph, weights = NULL, vids = V(graph))"},{"path":"https://r.igraph.org/reference/graph.diversity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph diversity — graph.diversity","text":"graph input graph. Edge directions ignored. weights NULL, vector edge weights use computation. NULL, ‘weight’ attibute used. Note measure defined unweighted graphs. vids vertex ids calculate measure.","code":""},{"path":"https://r.igraph.org/reference/graph.edgelist.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a graph from an edge list matrix — graph.edgelist","title":"Create a graph from an edge list matrix — graph.edgelist","text":"graph.edgelist() renamed graph_from_edgelist() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.edgelist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a graph from an edge list matrix — graph.edgelist","text":"","code":"graph.edgelist(el, directed = TRUE)"},{"path":"https://r.igraph.org/reference/graph.edgelist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a graph from an edge list matrix — graph.edgelist","text":"el edge list, two column matrix, character numeric. directed Whether create directed graph.","code":""},{"path":"https://r.igraph.org/reference/graph.eigen.html","id":null,"dir":"Reference","previous_headings":"","what":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — graph.eigen","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — graph.eigen","text":"graph.eigen() renamed spectrum() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.eigen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — graph.eigen","text":"","code":"graph.eigen( graph, algorithm = c(\"arpack\", \"auto\", \"lapack\", \"comp_auto\", \"comp_lapack\", \"comp_arpack\"), which = list(), options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/graph.eigen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — graph.eigen","text":"graph input graph, can directed undirected. algorithm algorithm use. Currently arpack implemented, uses ARPACK solver. See also arpack(). list specify eigenvalues eigenvectors calculate. default leading (.e. largest magnitude) eigenvalue corresponding eigenvector calculated. options Options ARPACK solver. See arpack_defaults().","code":""},{"path":"https://r.igraph.org/reference/graph.empty.html","id":null,"dir":"Reference","previous_headings":"","what":"A graph with no edges — graph.empty","title":"A graph with no edges — graph.empty","text":"graph.empty() renamed make_empty_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.empty.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A graph with no edges — graph.empty","text":"","code":"graph.empty(n = 0, directed = TRUE)"},{"path":"https://r.igraph.org/reference/graph.empty.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A graph with no edges — graph.empty","text":"n Number vertices. directed Whether create directed graph.","code":""},{"path":"https://r.igraph.org/reference/graph.extended.chordal.ring.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an extended chordal ring graph — graph.extended.chordal.ring","title":"Create an extended chordal ring graph — graph.extended.chordal.ring","text":"graph.extended.chordal.ring() renamed make_chordal_ring() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.extended.chordal.ring.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an extended chordal ring graph — graph.extended.chordal.ring","text":"","code":"graph.extended.chordal.ring(n, w, directed = FALSE)"},{"path":"https://r.igraph.org/reference/graph.extended.chordal.ring.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an extended chordal ring graph — graph.extended.chordal.ring","text":"n number vertices. w matrix specifies extended chordal ring. See details . directed Logical scalar, whether create directed graph.","code":""},{"path":"https://r.igraph.org/reference/graph.famous.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an igraph graph from a list of edges, or a notable graph — graph.famous","title":"Create an igraph graph from a list of edges, or a notable graph — graph.famous","text":"graph.famous() renamed make_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.famous.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an igraph graph from a list of edges, or a notable graph — graph.famous","text":"","code":"graph.famous( edges, ..., n = max(edges), isolates = NULL, directed = TRUE, dir = directed, simplify = TRUE )"},{"path":"https://r.igraph.org/reference/graph.famous.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an igraph graph from a list of edges, or a notable graph — graph.famous","text":"edges vector defining edges, first edge points first element second, second edge third fourth, etc. numeric vector, interpreted internal vertex ids. character vectors, interpreted vertex names. Alternatively, can character scalar, name notable graph. See Notable graphs . name case insensitive. Starting igraph 0.8.0, can also include literals , via igraph's formula notation (see graph_from_literal()). case, first term formula start ‘~’ character, just like regular formulae R. See examples . ... make_graph(): extra arguments case graph given via literal, see graph_from_literal(). directed_graph() undirected_graph(): Passed make_directed_graph() make_undirected_graph(). n number vertices graph. argument ignored (warning) edges symbolic vertex names. also ignored bigger vertex id edges. means function safe supply zero vertex largest id isolate. isolates Character vector, names isolate vertices, symbolic edge lists. ignored numeric edge lists. directed Whether create directed graph. dir directed, compatibility. give . simplify graph literals, whether simplify graph.","code":""},{"path":"https://r.igraph.org/reference/graph.formula.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating (small) graphs via a simple interface — graph.formula","title":"Creating (small) graphs via a simple interface — graph.formula","text":"graph.formula() renamed graph_from_literal() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.formula.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating (small) graphs via a simple interface — graph.formula","text":"","code":"graph.formula(..., simplify = TRUE)"},{"path":"https://r.igraph.org/reference/graph.formula.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating (small) graphs via a simple interface — graph.formula","text":"... graph_from_literal() formulae giving structure graph, see details . from_literal() arguments passed graph_from_literal(). simplify Logical scalar, whether call simplify() created graph. default graph simplified, loop multiple edges removed.","code":""},{"path":"https://r.igraph.org/reference/graph.full.bipartite.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a full bipartite graph — graph.full.bipartite","title":"Create a full bipartite graph — graph.full.bipartite","text":"graph.full.bipartite() renamed make_full_bipartite_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.full.bipartite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a full bipartite graph — graph.full.bipartite","text":"","code":"graph.full.bipartite(n1, n2, directed = FALSE, mode = c(\"all\", \"out\", \"in\"))"},{"path":"https://r.igraph.org/reference/graph.full.bipartite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a full bipartite graph — graph.full.bipartite","text":"n1 number vertices first kind. n2 number vertices second kind. directed Logical scalar, whether graphs directed. mode Scalar giving kind edges create directed graphs. ‘’ vertices first kind connected others; ‘’ specifies opposite direction; ‘’ creates mutual edges. argument ignored undirected graphs.x","code":""},{"path":"https://r.igraph.org/reference/graph.full.citation.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a complete (full) citation graph — graph.full.citation","title":"Create a complete (full) citation graph — graph.full.citation","text":"graph.full.citation() renamed make_full_citation_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.full.citation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a complete (full) citation graph — graph.full.citation","text":"","code":"graph.full.citation(n, directed = TRUE)"},{"path":"https://r.igraph.org/reference/graph.full.citation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a complete (full) citation graph — graph.full.citation","text":"n number vertices. directed Whether create directed graph.","code":""},{"path":"https://r.igraph.org/reference/graph.full.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a full graph — graph.full","title":"Create a full graph — graph.full","text":"graph.full() renamed make_full_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.full.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a full graph — graph.full","text":"","code":"graph.full(n, directed = FALSE, loops = FALSE)"},{"path":"https://r.igraph.org/reference/graph.full.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a full graph — graph.full","text":"n Number vertices. directed Whether create directed graph. loops Whether add self-loops graph.","code":""},{"path":"https://r.igraph.org/reference/graph.graphdb.html","id":null,"dir":"Reference","previous_headings":"","what":"Load a graph from the graph database for testing graph isomorphism. — graph.graphdb","title":"Load a graph from the graph database for testing graph isomorphism. — graph.graphdb","text":"graph.graphdb() renamed graph_from_graphdb() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.graphdb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load a graph from the graph database for testing graph isomorphism. — graph.graphdb","text":"","code":"graph.graphdb( url = NULL, prefix = \"iso\", type = \"r001\", nodes = NULL, pair = \"A\", which = 0, base = \"http://cneurocvs.rmki.kfki.hu/graphdb/gzip\", compressed = TRUE, directed = TRUE )"},{"path":"https://r.igraph.org/reference/graph.graphdb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load a graph from the graph database for testing graph isomorphism. — graph.graphdb","text":"url NULL complete URL file import. prefix Gives prefix. See details . Possible values: iso, i2, si4, si6, mcs10, mcs30, mcs50, mcs70, mcs90. type Gives graph type identifier. See details . Possible values: r001, r005, r01, r02, m2D, m2Dr2, m2Dr4, m2Dr6 m3D, m3Dr2, m3Dr4, m3Dr6, m4D, m4Dr2, m4Dr4, m4Dr6, b03, b03m, b06, b06m, b09, b09m. nodes number vertices graph. pair Specifies graph pair read. Possible values: B. Gives number graph read. every graph type number actual graphs database. argument specifies one read. base base address database. See details . compressed Logical constant, TRUE file expected compressed gzip. url NULL ‘.gz’ suffix added filename. directed Logical constant, whether create directed graph.","code":""},{"path":"https://r.igraph.org/reference/graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an igraph graph from a list of edges, or a notable graph — graph","title":"Create an igraph graph from a list of edges, or a notable graph — graph","text":"graph() renamed make_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an igraph graph from a list of edges, or a notable graph — graph","text":"","code":"graph( edges, ..., n = max(edges), isolates = NULL, directed = TRUE, dir = directed, simplify = TRUE )"},{"path":"https://r.igraph.org/reference/graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an igraph graph from a list of edges, or a notable graph — graph","text":"edges vector defining edges, first edge points first element second, second edge third fourth, etc. numeric vector, interpreted internal vertex ids. character vectors, interpreted vertex names. Alternatively, can character scalar, name notable graph. See Notable graphs . name case insensitive. Starting igraph 0.8.0, can also include literals , via igraph's formula notation (see graph_from_literal()). case, first term formula start ‘~’ character, just like regular formulae R. See examples . ... make_graph(): extra arguments case graph given via literal, see graph_from_literal(). directed_graph() undirected_graph(): Passed make_directed_graph() make_undirected_graph(). n number vertices graph. argument ignored (warning) edges symbolic vertex names. also ignored bigger vertex id edges. means function safe supply zero vertex largest id isolate. isolates Character vector, names isolate vertices, symbolic edge lists. ignored numeric edge lists. directed Whether create directed graph. dir directed, compatibility. give . simplify graph literals, whether simplify graph.","code":""},{"path":"https://r.igraph.org/reference/graph.incidence.html","id":null,"dir":"Reference","previous_headings":"","what":"Create graphs from a bipartite adjacency matrix — graph.incidence","title":"Create graphs from a bipartite adjacency matrix — graph.incidence","text":"graph.incidence() renamed graph_from_biadjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.incidence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create graphs from a bipartite adjacency matrix — graph.incidence","text":"","code":"graph.incidence( incidence, directed = FALSE, mode = c(\"all\", \"out\", \"in\", \"total\"), multiple = FALSE, weighted = NULL, add.names = NULL )"},{"path":"https://r.igraph.org/reference/graph.incidence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create graphs from a bipartite adjacency matrix — graph.incidence","text":"incidence input bipartite adjacency matrix. can also sparse matrix Matrix package. directed Logical scalar, whether create directed graph. mode character constant, defines direction edges directed graphs, ignored undirected graphs. ‘’, edges go vertices first kind (corresponding rows bipartite adjacency matrix) vertices second kind (columns incidence matrix). ‘’, opposite direction used. ‘’ ‘total’, mutual edges created. multiple Logical scalar, specifies interpret matrix elements. See details . weighted argument specifies whether create weighted graph bipartite adjacency matrix. NULL unweighted graph created multiple argument used determine edges graph. character constant every non-zero matrix entry edge created value entry added edge attribute named weighted argument. TRUE weighted graph created name edge attribute ‘weight’. add.names character constant, NA NULL. graph_from_biadjacency_matrix() can add row column names incidence matrix vertex attributes. argument NULL (default) bipartite adjacency matrix row column names, added ‘name’ vertex attribute. want different vertex attribute , give name attributes character string. argument NA, vertex attributes (type) added.","code":""},{"path":"https://r.igraph.org/reference/graph.intersection.html","id":null,"dir":"Reference","previous_headings":"","what":"Intersection of two or more sets — graph.intersection","title":"Intersection of two or more sets — graph.intersection","text":"graph.intersection() renamed intersection() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.intersection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Intersection of two or more sets — graph.intersection","text":"","code":"graph.intersection(...)"},{"path":"https://r.igraph.org/reference/graph.intersection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Intersection of two or more sets — graph.intersection","text":"... Arguments, number interpretation depends function implements intersection().","code":""},{"path":"https://r.igraph.org/reference/graph.isocreate.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a graph from an isomorphism class — graph.isocreate","title":"Create a graph from an isomorphism class — graph.isocreate","text":"graph.isocreate() renamed graph_from_isomorphism_class() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.isocreate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a graph from an isomorphism class — graph.isocreate","text":"","code":"graph.isocreate(size, number, directed = TRUE)"},{"path":"https://r.igraph.org/reference/graph.isocreate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a graph from an isomorphism class — graph.isocreate","text":"size number vertices graph. number isomorphism class. directed Whether create directed graph (default).","code":""},{"path":"https://r.igraph.org/reference/graph.kautz.html","id":null,"dir":"Reference","previous_headings":"","what":"Kautz graphs — graph.kautz","title":"Kautz graphs — graph.kautz","text":"graph.kautz() renamed make_kautz_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.kautz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kautz graphs — graph.kautz","text":"","code":"graph.kautz(m, n)"},{"path":"https://r.igraph.org/reference/graph.kautz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kautz graphs — graph.kautz","text":"m Integer scalar, size alphabet. See details . n Integer scalar, length labels. See details .","code":""},{"path":"https://r.igraph.org/reference/graph.knn.html","id":null,"dir":"Reference","previous_headings":"","what":"Average nearest neighbor degree — graph.knn","title":"Average nearest neighbor degree — graph.knn","text":"graph.knn() renamed knn() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.knn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average nearest neighbor degree — graph.knn","text":"","code":"graph.knn( graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), neighbor.degree.mode = c(\"all\", \"out\", \"in\", \"total\"), weights = NULL )"},{"path":"https://r.igraph.org/reference/graph.knn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average nearest neighbor degree — graph.knn","text":"graph input graph. may directed. vids vertices calculation performed. Normally includes vertices. Note, vertices given , ‘knn’ ‘knnk’ calculated based given vertices . mode Character constant indicate type neighbors consider directed graphs. considers -neighbors, considers -neighbors ignores edge directions. neighbor.degree.mode type degree average directed graphs. averages -degrees, averages -degrees ignores edge directions degree calculation. weights Weight vector. graph weight edge attribute, used default. argument given, vertex strength (see strength()) used instead vertex degree. note knnk still given function normal vertex degree. Weights used calculate weighted degree (also called strength()) instead degree.","code":""},{"path":"https://r.igraph.org/reference/graph.laplacian.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph Laplacian — graph.laplacian","title":"Graph Laplacian — graph.laplacian","text":"graph.laplacian() renamed laplacian_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.laplacian.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph Laplacian — graph.laplacian","text":"","code":"graph.laplacian( graph, normalized = FALSE, weights = NULL, sparse = igraph_opt(\"sparsematrices\") )"},{"path":"https://r.igraph.org/reference/graph.laplacian.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph Laplacian — graph.laplacian","text":"graph input graph. normalized Deprecated, use normalization instead. weights optional vector giving edge weights weighted Laplacian matrix. NULL graph edge attribute called weight, used automatically. Set NA want unweighted Laplacian graph weight edge attribute. sparse Logical scalar, whether return result sparse matrix. Matrix package required sparse matrices.","code":""},{"path":"https://r.igraph.org/reference/graph.lattice.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a lattice graph — graph.lattice","title":"Create a lattice graph — graph.lattice","text":"graph.lattice() renamed make_lattice() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.lattice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a lattice graph — graph.lattice","text":"","code":"graph.lattice( dimvector = NULL, length = NULL, dim = NULL, nei = 1, directed = FALSE, mutual = FALSE, periodic = FALSE, circular = deprecated() )"},{"path":"https://r.igraph.org/reference/graph.lattice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a lattice graph — graph.lattice","text":"dimvector vector giving size lattice dimension. length Integer constant, regular lattices, size lattice dimension. dim Integer constant, dimension lattice. nei distance within (inclusive) neighbors lattice connected. parameter used right now. directed Whether create directed lattice. mutual Logical, TRUE directed lattices mutually connected. periodic Logical vector, Boolean vector, defines whether generated lattice periodic along dimension. parameter may also scalar boolen value extended boolean vector dimvector length. circular Deprecated, use periodic instead.","code":""},{"path":"https://r.igraph.org/reference/graph.lattice.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Create a lattice graph — graph.lattice","text":"igraph_square_lattice().","code":""},{"path":"https://r.igraph.org/reference/graph.lcf.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating a graph from LCF notation — graph.lcf","title":"Creating a graph from LCF notation — graph.lcf","text":"graph.lcf() renamed graph_from_lcf() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.lcf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating a graph from LCF notation — graph.lcf","text":"","code":"graph.lcf(n, shifts, repeats = 1)"},{"path":"https://r.igraph.org/reference/graph.lcf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating a graph from LCF notation — graph.lcf","text":"n Integer, number vertices graph. shifts Integer vector, shifts. repeats Integer constant, many times repeat shifts.","code":""},{"path":"https://r.igraph.org/reference/graph.maxflow.html","id":null,"dir":"Reference","previous_headings":"","what":"Maximum flow in a graph — graph.maxflow","title":"Maximum flow in a graph — graph.maxflow","text":"graph.maxflow() renamed max_flow() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.maxflow.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Maximum flow in a graph — graph.maxflow","text":"","code":"graph.maxflow(graph, source, target, capacity = NULL)"},{"path":"https://r.igraph.org/reference/graph.maxflow.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Maximum flow in a graph — graph.maxflow","text":"graph input graph. source id source vertex. target id target vertex (sometimes also called sink). capacity Vector giving capacity edges. NULL (default) capacity edge attribute used. Note weight edge attribute used function.","code":""},{"path":"https://r.igraph.org/reference/graph.mincut.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum cut in a graph — graph.mincut","title":"Minimum cut in a graph — graph.mincut","text":"graph.mincut() renamed min_cut() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.mincut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum cut in a graph — graph.mincut","text":"","code":"graph.mincut( graph, source = NULL, target = NULL, capacity = NULL, value.only = TRUE )"},{"path":"https://r.igraph.org/reference/graph.mincut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum cut in a graph — graph.mincut","text":"graph input graph. source id source vertex. target id target vertex (sometimes also called sink). capacity Vector giving capacity edges. NULL (default) capacity edge attribute used. value.Logical scalar, TRUE minimum cut value returned, FALSE edges cut two () partitions also returned.","code":""},{"path":"https://r.igraph.org/reference/graph.motifs.est.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph motifs — graph.motifs.est","title":"Graph motifs — graph.motifs.est","text":"graph.motifs.est() renamed sample_motifs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.motifs.est.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph motifs — graph.motifs.est","text":"","code":"graph.motifs.est( graph, size = 3, cut.prob = rep(0, size), sample.size = vcount(graph)/10, sample = NULL )"},{"path":"https://r.igraph.org/reference/graph.motifs.est.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph motifs — graph.motifs.est","text":"graph Graph object, input graph. size size motif, currently size 3 4 supported directed graphs sizes 3-6 undirected graphs. cut.prob Numeric vector giving probabilities search graph cut certain level. length size motif (size argument). default cuts made. sample.size number vertices use starting point finding motifs. used sample argument NULL. sample NULL specifies vertices use starting point finding motifs.","code":""},{"path":"https://r.igraph.org/reference/graph.motifs.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph motifs — graph.motifs","title":"Graph motifs — graph.motifs","text":"graph.motifs() renamed motifs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.motifs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph motifs — graph.motifs","text":"","code":"graph.motifs(graph, size = 3, cut.prob = rep(0, size))"},{"path":"https://r.igraph.org/reference/graph.motifs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph motifs — graph.motifs","text":"graph Graph object, input graph. size size motif, currently sizes 3 4 supported directed graphs sizes 3-6 undirected graphs. cut.prob Numeric vector giving probabilities search graph cut certain level. length size motif (size argument). default cuts made.","code":""},{"path":"https://r.igraph.org/reference/graph.motifs.no.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph motifs — graph.motifs.no","title":"Graph motifs — graph.motifs.no","text":"graph.motifs.() renamed count_motifs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.motifs.no.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph motifs — graph.motifs.no","text":"","code":"graph.motifs.no(graph, size = 3, cut.prob = rep(0, size))"},{"path":"https://r.igraph.org/reference/graph.motifs.no.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph motifs — graph.motifs.no","text":"graph Graph object, input graph. size size motif. cut.prob Numeric vector giving probabilities search graph cut certain level. length size motif (size argument). default cuts made.","code":""},{"path":"https://r.igraph.org/reference/graph.neighborhood.html","id":null,"dir":"Reference","previous_headings":"","what":"Neighborhood of graph vertices — graph.neighborhood","title":"Neighborhood of graph vertices — graph.neighborhood","text":"graph.neighborhood() renamed make_ego_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.neighborhood.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neighborhood of graph vertices — graph.neighborhood","text":"","code":"graph.neighborhood( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 )"},{"path":"https://r.igraph.org/reference/graph.neighborhood.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neighborhood of graph vertices — graph.neighborhood","text":"graph input graph. order Integer giving order neighborhood. nodes vertices calculation performed. mode Character constant, specifies use direction edges directed graph analyzed. ‘’ outgoing edges followed, vertices reachable source vertex order steps counted. ‘\"\"’ vertices source vertex reachable order steps counted. ‘\"\"’ ignores direction edges. argument ignored undirected graphs. mindist minimum distance include vertex result.","code":""},{"path":"https://r.igraph.org/reference/graph.ring.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a ring graph — graph.ring","title":"Create a ring graph — graph.ring","text":"graph.ring() renamed make_ring() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.ring.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a ring graph — graph.ring","text":"","code":"graph.ring(n, directed = FALSE, mutual = FALSE, circular = TRUE)"},{"path":"https://r.igraph.org/reference/graph.ring.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a ring graph — graph.ring","text":"n Number vertices. directed Whether graph directed. mutual Whether directed edges mutual. ignored undirected graphs. circular Whether create circular ring. non-circular ring essentially “line”: tree every non-leaf vertex one child.","code":""},{"path":"https://r.igraph.org/reference/graph.star.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a star graph, a tree with n vertices and n - 1 leaves — graph.star","title":"Create a star graph, a tree with n vertices and n - 1 leaves — graph.star","text":"graph.star() renamed make_star() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.star.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a star graph, a tree with n vertices and n - 1 leaves — graph.star","text":"","code":"graph.star(n, mode = c(\"in\", \"out\", \"mutual\", \"undirected\"), center = 1)"},{"path":"https://r.igraph.org/reference/graph.star.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a star graph, a tree with n vertices and n - 1 leaves — graph.star","text":"n Number vertices. mode defines direction edges, : edges point center, : edges point center, mutual: directed star created mutual edges, undirected: edges undirected. center ID center vertex.","code":""},{"path":"https://r.igraph.org/reference/graph.strength.html","id":null,"dir":"Reference","previous_headings":"","what":"Strength or weighted vertex degree — graph.strength","title":"Strength or weighted vertex degree — graph.strength","text":"graph.strength() renamed strength() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.strength.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Strength or weighted vertex degree — graph.strength","text":"","code":"graph.strength( graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), loops = TRUE, weights = NULL )"},{"path":"https://r.igraph.org/reference/graph.strength.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Strength or weighted vertex degree — graph.strength","text":"graph input graph. vids vertices strength calculated. mode Character string, “” -degree, “” -degree “” sum two. undirected graphs argument ignored. loops Logical; whether loop edges also counted. weights Weight vector. graph weight edge attribute, used default. graph weight edge attribute argument NULL, degree() called. NA, edge weights used (even graph weight edge attribute).","code":""},{"path":"https://r.igraph.org/reference/graph.tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Create tree graphs — graph.tree","title":"Create tree graphs — graph.tree","text":"graph.tree() renamed make_tree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create tree graphs — graph.tree","text":"","code":"graph.tree(n, children = 2, mode = c(\"out\", \"in\", \"undirected\"))"},{"path":"https://r.igraph.org/reference/graph.tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create tree graphs — graph.tree","text":"n Number vertices. children Integer scalar, number children vertex (except leafs) mode Defines direction edges. indicates edges point parent children, indicates point children parents, undirected creates undirected graph.","code":""},{"path":"https://r.igraph.org/reference/graph.union.html","id":null,"dir":"Reference","previous_headings":"","what":"Union of graphs — graph.union","title":"Union of graphs — graph.union","text":"graph.union() renamed union.igraph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.union.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Union of graphs — graph.union","text":"","code":"graph.union(..., byname = \"auto\")"},{"path":"https://r.igraph.org/reference/graph.union.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Union of graphs — graph.union","text":"... Graph objects lists graph objects. byname logical scalar, character scalar auto. Whether perform operation based symbolic vertex names. auto, means TRUE graphs named FALSE otherwise. warning generated auto () graphs named.","code":""},{"path":"https://r.igraph.org/reference/graph_.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert object to a graph — graph_","title":"Convert object to a graph — graph_","text":"generic function convert R objects igraph graphs.","code":""},{"path":"https://r.igraph.org/reference/graph_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert object to a graph — graph_","text":"","code":"graph_(...)"},{"path":"https://r.igraph.org/reference/graph_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert object to a graph — graph_","text":"... Parameters, see details .","code":""},{"path":"https://r.igraph.org/reference/graph_.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert object to a graph — graph_","text":"TODO","code":""},{"path":"https://r.igraph.org/reference/graph_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert object to a graph — graph_","text":"","code":"## These are equivalent graph_(cbind(1:5, 2:6), from_edgelist(directed = FALSE)) #> Warning: `graph_()` was deprecated in igraph 2.1.0. #> ℹ Please use constructors directly, for instance graph_from_edgelist(). #> ℹ graph_() will be removed in a future version of igraph. #> IGRAPH d66b63b U--- 6 5 -- #> + edges from d66b63b: #> [1] 1--2 2--3 3--4 4--5 5--6 graph_(cbind(1:5, 2:6), from_edgelist(), directed = FALSE) #> IGRAPH ddf07bf U--- 6 5 -- #> + edges from ddf07bf: #> [1] 1--2 2--3 3--4 4--5 5--6"},{"path":"https://r.igraph.org/reference/graph_attr-set.html","id":null,"dir":"Reference","previous_headings":"","what":"Set all or some graph attributes — graph_attr<-","title":"Set all or some graph attributes — graph_attr<-","text":"Set graph attributes","code":""},{"path":"https://r.igraph.org/reference/graph_attr-set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set all or some graph attributes — graph_attr<-","text":"","code":"graph_attr(graph, name) <- value"},{"path":"https://r.igraph.org/reference/graph_attr-set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set all or some graph attributes — graph_attr<-","text":"graph graph. name name attribute set. missing, value named list, list members set attributes. value value attribute set","code":""},{"path":"https://r.igraph.org/reference/graph_attr-set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set all or some graph attributes — graph_attr<-","text":"graph, attribute(s) added.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_attr-set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set all or some graph attributes — graph_attr<-","text":"","code":"g <- make_graph(~ A - B:C:D) graph_attr(g, \"name\") <- \"4-star\" g #> IGRAPH b0d194a UN-- 4 3 -- 4-star #> + attr: name (g/c), name (v/c) #> + edges from b0d194a (vertex names): #> [1] A--B A--C A--D graph_attr(g) <- list( layout = layout_with_fr(g), name = \"4-star layed out\" ) plot(g)"},{"path":"https://r.igraph.org/reference/graph_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph attributes of a graph — graph_attr","title":"Graph attributes of a graph — graph_attr","text":"Graph attributes graph","code":""},{"path":"https://r.igraph.org/reference/graph_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph attributes of a graph — graph_attr","text":"","code":"graph_attr(graph, name)"},{"path":"https://r.igraph.org/reference/graph_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph attributes of a graph — graph_attr","text":"graph Input graph. name name attribute query. missing, attributes returned list.","code":""},{"path":"https://r.igraph.org/reference/graph_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph attributes of a graph — graph_attr","text":"list graph attributes, single graph attribute.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph attributes of a graph — graph_attr","text":"","code":"g <- make_ring(10) graph_attr(g) #> $name #> [1] \"Ring graph\" #> #> $mutual #> [1] FALSE #> #> $circular #> [1] TRUE #> graph_attr(g, \"name\") #> [1] \"Ring graph\""},{"path":"https://r.igraph.org/reference/graph_attr_names.html","id":null,"dir":"Reference","previous_headings":"","what":"List names of graph attributes — graph_attr_names","title":"List names of graph attributes — graph_attr_names","text":"List names graph attributes","code":""},{"path":"https://r.igraph.org/reference/graph_attr_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List names of graph attributes — graph_attr_names","text":"","code":"graph_attr_names(graph)"},{"path":"https://r.igraph.org/reference/graph_attr_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List names of graph attributes — graph_attr_names","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/graph_attr_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List names of graph attributes — graph_attr_names","text":"Character vector, names graph attributes.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_attr_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List names of graph attributes — graph_attr_names","text":"","code":"g <- make_ring(10) graph_attr_names(g) #> [1] \"name\" \"mutual\" \"circular\""},{"path":"https://r.igraph.org/reference/graph_center.html","id":null,"dir":"Reference","previous_headings":"","what":"Central vertices of a graph — graph_center","title":"Central vertices of a graph — graph_center","text":"center graph set vertices minimal eccentricity.","code":""},{"path":"https://r.igraph.org/reference/graph_center.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Central vertices of a graph — graph_center","text":"","code":"graph_center(graph, ..., weights = NULL, mode = c(\"all\", \"out\", \"in\", \"total\"))"},{"path":"https://r.igraph.org/reference/graph_center.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Central vertices of a graph — graph_center","text":"graph input graph, can directed undirected. ... dots future extensions must empty. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). weighted graph, length path sum weights constituent edges. mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, graph treated undirected, .e. edge directions taken account. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/graph_center.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Central vertices of a graph — graph_center","text":"vertex IDs central vertices.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_center.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Central vertices of a graph — graph_center","text":"igraph_graph_center_dijkstra().","code":""},{"path":"https://r.igraph.org/reference/graph_center.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Central vertices of a graph — graph_center","text":"","code":"tree <- make_tree(100, 7) graph_center(tree) #> + 2/100 vertices, from 9ceba56: #> [1] 1 2 graph_center(tree, mode = \"in\") #> + 1/100 vertex, from 9ceba56: #> [1] 1 graph_center(tree, mode = \"out\") #> + 85/100 vertices, from 9ceba56: #> [1] 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 #> [20] 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 #> [39] 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 #> [58] 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 #> [77] 92 93 94 95 96 97 98 99 100 # Without and with weights ring <- make_ring(10) graph_center(ring) #> + 10/10 vertices, from f9762ff: #> [1] 1 2 3 4 5 6 7 8 9 10 # Add weights E(ring)$weight <- seq_len(ecount(ring)) graph_center(ring) #> + 1/10 vertex, from f9762ff: #> [1] 7"},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Create graphs from adjacency lists — graph_from_adj_list","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"adjacency list list numeric vectors, containing neighbor vertices vertex. function creates igraph graph object list.","code":""},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"","code":"graph_from_adj_list( adjlist, mode = c(\"out\", \"in\", \"all\", \"total\"), duplicate = TRUE )"},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"adjlist adjacency list. consistent, .e. maximum throughout vectors list must less number vectors (=number vertices graph). mode Character scalar, specifies whether graph create undirected (‘’ ‘total’) directed; latter case, whether contains outgoing (‘’) incoming (‘’) neighbors vertices. duplicate Logical scalar. undirected graphs gives whether edges included list twice. E.g. TRUE undirected {,B} edge graph_from_adj_list() expects included neighbors B B included neighbors . argument ignored mode .","code":""},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"igraph graph object.","code":""},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"Adjacency lists handy intend many (small) modifications graph. case adjacency lists efficient igraph graphs. idea convert graph adjacency list as_adj_list(), modifications graphs finally create igraph graph calling graph_from_adj_list().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"igraph_adjlist().","code":""},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"","code":"## Directed g <- make_ring(10, directed = TRUE) al <- as_adj_list(g, mode = \"out\") g2 <- graph_from_adj_list(al) graph.isomorphic(g, g2) #> [1] TRUE ## Undirected g <- make_ring(10) al <- as_adj_list(g) g2 <- graph_from_adj_list(al, mode = \"all\") graph.isomorphic(g, g2) #> [1] TRUE ecount(g2) #> [1] 10 g3 <- graph_from_adj_list(al, mode = \"all\", duplicate = FALSE) ecount(g3) #> [1] 20 which_multiple(g3) #> [1] FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE #> [13] TRUE FALSE TRUE FALSE TRUE FALSE TRUE TRUE"},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"graph_from_adjacency_matrix() flexible function creating igraph graphs adjacency matrices.","code":""},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"","code":"graph_from_adjacency_matrix( adjmatrix, mode = c(\"directed\", \"undirected\", \"max\", \"min\", \"upper\", \"lower\", \"plus\"), weighted = NULL, diag = TRUE, add.colnames = NULL, add.rownames = NA ) from_adjacency(...)"},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"adjmatrix square adjacency matrix. igraph version 0.5.1 can sparse matrix created Matrix package. mode Character scalar, specifies igraph interpret supplied matrix. See also weighted argument, interpretation depends . Possible values : directed, undirected, upper, lower, max, min, plus. See details . weighted argument specifies whether create weighted graph adjacency matrix. NULL unweighted graph created elements adjacency matrix gives number edges vertices. character constant every non-zero matrix entry edge created value entry added edge attribute named weighted argument. TRUE weighted graph created name edge attribute weight. See also details . diag Logical scalar, whether include diagonal matrix calculation. FALSE diagonal zerod first. add.colnames Character scalar, whether add column names vertex attributes. ‘NULL’ (default) , present, column names added vertex attribute ‘name’. ‘NA’ added. character constant, gives name vertex attribute add. add.rownames Character scalar, whether add row names vertex attributes. Possible values previous argument. default row names added. ‘add.rownames’ ‘add.colnames’ specify vertex attribute, former ignored. ... Passed graph_from_adjacency_matrix().","code":""},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"igraph graph object.","code":""},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"order vertices preserved, .e. vertex corresponding first row vertex 0 graph, etc. graph_from_adjacency_matrix() operates two main modes, depending weighted argument. argument NULL unweighted graph created element adjacency matrix gives number edges create two corresponding vertices. details depend value mode argument: \"directed\" graph directed matrix element gives number edges two vertices. \"undirected\" exactly max, convenience. Note checked whether matrix symmetric. \"max\" undirected graph created max((,j), (j,)) gives number edges. \"upper\" undirected graph created, upper right triangle (including diagonal) used number edges. \"lower\" undirected graph created, lower left triangle (including diagonal) used creating edges. \"min\" undirected graph created min((,j), (j,)) edges vertex j. \"plus\" undirected graph created (,j)+(j,) edges vertex j. weighted argument NULL elements matrix give weights edges (zero). details depend value mode argument: \"directed\" graph directed matrix element gives edge weights. \"undirected\" First check matrix symmetric. error . upper triangle used create weighted undirected graph. \"max\" undirected graph created max((,j), (j,)) gives edge weights. \"upper\" undirected graph created, upper right triangle (including diagonal) used (edge weights). \"lower\" undirected graph created, lower left triangle (including diagonal) used creating edges. \"min\" undirected graph created, min((,j), (j,)) gives edge weights. \"plus\" undirected graph created, (,j)+(j,) gives edge weights.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"","code":"g1 <- sample( x = 0:1, size = 100, replace = TRUE, prob = c(0.9, 0.1) ) %>% matrix(ncol = 10) %>% graph_from_adjacency_matrix() g2 <- sample( x = 0:5, size = 100, replace = TRUE, prob = c(0.9, 0.02, 0.02, 0.02, 0.02, 0.02) ) %>% matrix(ncol = 10) %>% graph_from_adjacency_matrix(weighted = TRUE) E(g2)$weight #> [1] 5 2 3 1 4 4 5 5 3 4 4 3 ## various modes for weighted graphs, with some tests non_zero_sort <- function(x) sort(x[x != 0]) adj_matrix <- matrix(runif(100), 10) adj_matrix[adj_matrix < 0.5] <- 0 g3 <- graph_from_adjacency_matrix( (adj_matrix + t(adj_matrix)) / 2, weighted = TRUE, mode = \"undirected\" ) g4 <- graph_from_adjacency_matrix( adj_matrix, weighted = TRUE, mode = \"max\" ) expected_g4_weights <- non_zero_sort( pmax(adj_matrix, t(adj_matrix))[upper.tri(adj_matrix, diag = TRUE)] ) actual_g4_weights <- sort(E(g4)$weight) all(expected_g4_weights == actual_g4_weights) #> [1] TRUE g5 <- graph_from_adjacency_matrix( adj_matrix, weighted = TRUE, mode = \"min\" ) expected_g5_weights <- non_zero_sort( pmin(adj_matrix, t(adj_matrix))[upper.tri(adj_matrix, diag = TRUE)] ) actual_g5_weights <- sort(E(g5)$weight) all(expected_g5_weights == actual_g5_weights) #> [1] TRUE g6 <- graph_from_adjacency_matrix( adj_matrix, weighted = TRUE, mode = \"upper\" ) expected_g6_weights <- non_zero_sort(adj_matrix[upper.tri(adj_matrix, diag = TRUE)]) actual_g6_weights <- sort(E(g6)$weight) all(expected_g6_weights == actual_g6_weights) #> [1] TRUE g7 <- graph_from_adjacency_matrix( adj_matrix, weighted = TRUE, mode = \"lower\" ) expected_g7_weights <- non_zero_sort(adj_matrix[lower.tri(adj_matrix, diag = TRUE)]) actual_g7_weights <- sort(E(g7)$weight) all(expected_g7_weights == actual_g7_weights) #> [1] TRUE g8 <- graph_from_adjacency_matrix( adj_matrix, weighted = TRUE, mode = \"plus\" ) halve_diag <- function(x) { diag(x) <- diag(x) / 2 x } expected_g8_weights <- non_zero_sort( halve_diag(adj_matrix + t(adj_matrix) )[lower.tri(adj_matrix, diag = TRUE)]) actual_g8_weights <- sort(E(g8)$weight) all(expected_g8_weights == actual_g8_weights) #> [1] TRUE g9 <- graph_from_adjacency_matrix( adj_matrix, weighted = TRUE, mode = \"plus\", diag = FALSE ) zero_diag <- function(x) { diag(x) <- 0 } expected_g9_weights <- non_zero_sort((zero_diag(adj_matrix + t(adj_matrix)))[lower.tri(adj_matrix)]) actual_g9_weights <- sort(E(g9)$weight) all(expected_g9_weights == actual_g9_weights) #> [1] TRUE ## row/column names rownames(adj_matrix) <- sample(letters, nrow(adj_matrix)) colnames(adj_matrix) <- seq(ncol(adj_matrix)) g10 <- graph_from_adjacency_matrix( adj_matrix, weighted = TRUE, add.rownames = \"code\" ) summary(g10) #> IGRAPH 801edad DNW- 10 56 -- #> + attr: name (v/c), code (v/c), weight (e/n)"},{"path":"https://r.igraph.org/reference/graph_from_atlas.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a graph from the Graph Atlas — graph_from_atlas","title":"Create a graph from the Graph Atlas — graph_from_atlas","text":"graph_from_atlas() creates graphs book ‘Atlas Graphs’ Roland C. Read Robin J. Wilson. atlas contains undirected graphs seven vertices, numbered 0 1252. graphs listed: increasing order number nodes; fixed number nodes, increasing order number edges; fixed numbers nodes edges, increasing order degree sequence, example 111223 < 112222; fixed degree sequence, increasing number automorphisms.","code":""},{"path":"https://r.igraph.org/reference/graph_from_atlas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a graph from the Graph Atlas — graph_from_atlas","text":"","code":"graph_from_atlas(n) atlas(...)"},{"path":"https://r.igraph.org/reference/graph_from_atlas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a graph from the Graph Atlas — graph_from_atlas","text":"n id graph create. ... Passed graph_from_atlas().","code":""},{"path":"https://r.igraph.org/reference/graph_from_atlas.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a graph from the Graph Atlas — graph_from_atlas","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_atlas.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a graph from the Graph Atlas — graph_from_atlas","text":"","code":"## Some randomly picked graphs from the atlas graph_from_atlas(sample(0:1252, 1)) #> IGRAPH d00c77a U--- 7 11 -- Graph from the Atlas #766 #> + attr: name (g/c), n (g/n) #> + edges from d00c77a: #> [1] 4--5 1--5 1--2 2--3 3--4 1--6 4--6 1--4 2--6 3--6 6--7 graph_from_atlas(sample(0:1252, 1)) #> IGRAPH a114626 U--- 7 12 -- Graph from the Atlas #893 #> + attr: name (g/c), n (g/n) #> + edges from a114626: #> [1] 1--2 2--3 3--4 5--6 1--5 2--4 2--5 3--5 1--4 4--6 1--3 2--7"},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"graph_from_biadjacency_matrix() creates bipartite igraph graph incidence matrix.","code":""},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"","code":"graph_from_biadjacency_matrix( incidence, directed = FALSE, mode = c(\"all\", \"out\", \"in\", \"total\"), multiple = FALSE, weighted = NULL, add.names = NULL )"},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"incidence input bipartite adjacency matrix. can also sparse matrix Matrix package. directed Logical scalar, whether create directed graph. mode character constant, defines direction edges directed graphs, ignored undirected graphs. ‘’, edges go vertices first kind (corresponding rows bipartite adjacency matrix) vertices second kind (columns incidence matrix). ‘’, opposite direction used. ‘’ ‘total’, mutual edges created. multiple Logical scalar, specifies interpret matrix elements. See details . weighted argument specifies whether create weighted graph bipartite adjacency matrix. NULL unweighted graph created multiple argument used determine edges graph. character constant every non-zero matrix entry edge created value entry added edge attribute named weighted argument. TRUE weighted graph created name edge attribute ‘weight’. add.names character constant, NA NULL. graph_from_biadjacency_matrix() can add row column names incidence matrix vertex attributes. argument NULL (default) bipartite adjacency matrix row column names, added ‘name’ vertex attribute. want different vertex attribute , give name attributes character string. argument NA, vertex attributes (type) added.","code":""},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"bipartite igraph graph. words, igraph graph vertex attribute type.","code":""},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"Bipartite graphs ‘type’ vertex attribute igraph, boolean FALSE vertices first kind TRUE vertices second kind. graph_from_biadjacency_matrix() can operate two modes, depending multiple argument. FALSE single edge created every non-zero element bipartite adjacency matrix. multiple TRUE, matrix elements rounded closest non-negative integer get number edges create pair vertices. authors refer bipartite adjacency matrix \"bipartite incidence matrix\". igraph 1.6.0 later use naming avoid confusion edge-vertex incidence matrix.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"","code":"inc <- matrix(sample(0:1, 15, repl = TRUE), 3, 5) colnames(inc) <- letters[1:5] rownames(inc) <- LETTERS[1:3] graph_from_biadjacency_matrix(inc) #> IGRAPH b5eddf2 UN-B 8 9 -- #> + attr: type (v/l), name (v/c) #> + edges from b5eddf2 (vertex names): #> [1] A--c A--d A--e B--a B--d B--e C--b C--c C--e"},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating igraph graphs from data frames or vice-versa — as_data_frame","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"function creates igraph graph one two data frames containing (symbolic) edge list edge/vertex attributes.","code":""},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"","code":"as_data_frame(x, what = c(\"edges\", \"vertices\", \"both\")) graph_from_data_frame(d, directed = TRUE, vertices = NULL) from_data_frame(...)"},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"x igraph object. Character constant, whether return info vertices, edges, . default ‘edges’. d data frame containing symbolic edge list first two columns. Additional columns considered edge attributes. Since version 0.7 argument coerced data frame .data.frame. directed Logical scalar, whether create directed graph. vertices data frame vertex metadata, NULL. See details . Since version 0.7 argument coerced data frame .data.frame, NULL. ... Passed graph_from_data_frame().","code":""},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"igraph graph object graph_from_data_frame(), either data frame list two data frames named edges vertices .data.frame.","code":""},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"graph_from_data_frame() creates igraph graphs one two data frames. two modes operation, depending whether vertices argument NULL . vertices NULL, first two columns d used symbolic edge list additional columns edge attributes. names attributes taken names columns. vertices NULL, must data frame giving vertex metadata. first column vertices assumed contain symbolic vertex names, added graphs ‘name’ vertex attribute. columns added additional vertex attributes. vertices NULL symbolic edge list given d checked contain vertex names listed vertices. Typically, data frames exported spreadsheet software like Excel imported R via read.table(), read.delim() read.csv(). edges data frame included graph, may include multiple parallel edges loops. as_data_frame() converts igraph graph one data frames, depending argument. argument edges (default), edges graph also edge attributes returned. edges first two columns, named . (also denotes edge direction directed graphs.) named graphs, vertex names included columns, graphs, numeric vertex ids. edge attributes columns. good idea edge attribute named , column named data frame unique. edges listed order numeric ids. argument vertices, vertex attributes returned. Vertices listed order numeric vertex ids. argument , vertex edge data returned, list named entries vertices edges.","code":""},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"graph_from_data_frame() NA elements first two columns ‘d’ replaced string “NA” creating graph. means NAs correspond single vertex. NA elements first column ‘vertices’ also replaced string “NA”, rest ‘vertices’ touched. words, vertex names (=first column) NA, vertex attributes can.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"","code":"## A simple example with a couple of actors ## The typical case is that these tables are read in from files.... actors <- data.frame( name = c( \"Alice\", \"Bob\", \"Cecil\", \"David\", \"Esmeralda\" ), age = c(48, 33, 45, 34, 21), gender = c(\"F\", \"M\", \"F\", \"M\", \"F\") ) relations <- data.frame( from = c( \"Bob\", \"Cecil\", \"Cecil\", \"David\", \"David\", \"Esmeralda\" ), to = c(\"Alice\", \"Bob\", \"Alice\", \"Alice\", \"Bob\", \"Alice\"), same.dept = c(FALSE, FALSE, TRUE, FALSE, FALSE, TRUE), friendship = c(4, 5, 5, 2, 1, 1), advice = c(4, 5, 5, 4, 2, 3) ) g <- graph_from_data_frame(relations, directed = TRUE, vertices = actors) print(g, e = TRUE, v = TRUE) #> IGRAPH 7926fd4 DN-- 5 6 -- #> + attr: name (v/c), age (v/n), gender (v/c), same.dept (e/l), #> | friendship (e/n), advice (e/n) #> + edges from 7926fd4 (vertex names): #> [1] Bob ->Alice Cecil ->Bob Cecil ->Alice David ->Alice #> [5] David ->Bob Esmeralda->Alice ## The opposite operation as_data_frame(g, what = \"vertices\") #> name age gender #> Alice Alice 48 F #> Bob Bob 33 M #> Cecil Cecil 45 F #> David David 34 M #> Esmeralda Esmeralda 21 F as_data_frame(g, what = \"edges\") #> from to same.dept friendship advice #> 1 Bob Alice FALSE 4 4 #> 2 Cecil Bob FALSE 5 5 #> 3 Cecil Alice TRUE 5 5 #> 4 David Alice FALSE 2 4 #> 5 David Bob FALSE 1 2 #> 6 Esmeralda Alice TRUE 1 3"},{"path":"https://r.igraph.org/reference/graph_from_edgelist.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a graph from an edge list matrix — graph_from_edgelist","title":"Create a graph from an edge list matrix — graph_from_edgelist","text":"graph_from_edgelist() creates graph edge list. argument two-column matrix, row defines one edge. numeric matrix elements interpreted vertex ids. character matrix interpreted symbolic vertex names vertex id assigned name, also name vertex attribute added.","code":""},{"path":"https://r.igraph.org/reference/graph_from_edgelist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a graph from an edge list matrix — graph_from_edgelist","text":"","code":"graph_from_edgelist(el, directed = TRUE) from_edgelist(...)"},{"path":"https://r.igraph.org/reference/graph_from_edgelist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a graph from an edge list matrix — graph_from_edgelist","text":"el edge list, two column matrix, character numeric. directed Whether create directed graph. ... Passed graph_from_edgelist().","code":""},{"path":"https://r.igraph.org/reference/graph_from_edgelist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a graph from an edge list matrix — graph_from_edgelist","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_edgelist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a graph from an edge list matrix — graph_from_edgelist","text":"","code":"el <- matrix(c(\"foo\", \"bar\", \"bar\", \"foobar\"), nc = 2, byrow = TRUE) graph_from_edgelist(el) #> IGRAPH 3c1b027 DN-- 3 2 -- #> + attr: name (v/c) #> + edges from 3c1b027 (vertex names): #> [1] foo->bar bar->foobar # Create a ring by hand graph_from_edgelist(cbind(1:10, c(2:10, 1))) #> IGRAPH 3c5461c D--- 10 10 -- #> + edges from 3c5461c: #> [1] 1-> 2 2-> 3 3-> 4 4-> 5 5-> 6 6-> 7 7-> 8 8-> 9 9->10 10-> 1"},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":null,"dir":"Reference","previous_headings":"","what":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"function downloads graph database created evaluation graph isomorphism testing algothitms.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"","code":"graph_from_graphdb( url = NULL, prefix = \"iso\", type = \"r001\", nodes = NULL, pair = \"A\", which = 0, base = \"http://cneurocvs.rmki.kfki.hu/graphdb/gzip\", compressed = TRUE, directed = TRUE )"},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"url NULL complete URL file import. prefix Gives prefix. See details . Possible values: iso, i2, si4, si6, mcs10, mcs30, mcs50, mcs70, mcs90. type Gives graph type identifier. See details . Possible values: r001, r005, r01, r02, m2D, m2Dr2, m2Dr4, m2Dr6 m3D, m3Dr2, m3Dr4, m3Dr6, m4D, m4Dr2, m4Dr4, m4Dr6, b03, b03m, b06, b06m, b09, b09m. nodes number vertices graph. pair Specifies graph pair read. Possible values: B. Gives number graph read. every graph type number actual graphs database. argument specifies one read. base base address database. See details . compressed Logical constant, TRUE file expected compressed gzip. url NULL ‘.gz’ suffix added filename. directed Logical constant, whether create directed graph.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"graph_from_graphdb() reads graph graph database FTP HTTP server local copy. two modes operation: url argument specified complete path local remote graph database file. case simply call read_graph() proper arguments read file. url NULL, default, filename assembled base, prefix, type, nodes, pair arguments. Unfortunately original graph database homepage now defunct, see old version http://web.archive.org/web/20090215182331/http://amalfi.dis.unina./graph/db/doc/graphdbat.html actual format graph database file information.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"","code":"g <- graph_from_graphdb(prefix=\"iso\", type=\"r001\", nodes=20, pair=\"A\", which=10, compressed=TRUE) g2 <- graph_from_graphdb(prefix=\"iso\", type=\"r001\", nodes=20, pair=\"B\", which=10, compressed=TRUE) graph.isomorphic.vf2(g, g2)\t% should be TRUE g3 <- graph_from_graphdb(url=paste(sep=\"/\", \"http://cneurocvs.rmki.kfki.hu\", \"graphdb/gzip/iso/bvg/b06m\", \"iso_b06m_m200.A09.gz\"))"},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"M. De Santo, P. Foggia, C. Sansone, M. Vento: large database graphs use benchmarking graph isomorphism algorithms, Pattern Recognition Letters, Volume 24, Issue 8 (May 2003)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphnel.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","title":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","text":"graphNEL class defined graph package, another way represent graphs. graph_from_graphnel() takes graphNEL graph converts igraph graph. handles graph/vertex/edge attributes. graphNEL graph vertex attribute called ‘name’ used igraph vertex attribute ‘name’ graphNEL vertex names ignored.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphnel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","text":"","code":"graph_from_graphnel(graphNEL, name = TRUE, weight = TRUE, unlist.attrs = TRUE)"},{"path":"https://r.igraph.org/reference/graph_from_graphnel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","text":"graphNEL graphNEL graph. name Logical scalar, whether add graphNEL vertex names igraph vertex attribute called ‘name’. weight Logical scalar, whether add graphNEL edge weights igraph edge attribute called ‘weight’. (graphNEL graphs always weighted.) unlist.attrs Logical scalar. graphNEL attribute query functions return values attributes R lists, argument TRUE (default) converted atomic vectors, whenever possible, adding igraph graph.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphnel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","text":"graph_from_graphnel() returns igraph graph object.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphnel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","text":"graphNEL graphs poorly support multiple edges, edge attributes multiple edges lost: replaced attributes first multiple edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_graphnel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","text":"","code":"## Undirected g <- make_ring(10) V(g)$name <- letters[1:10] GNEL <- as_graphnel(g) g2 <- graph_from_graphnel(GNEL) g2 #> IGRAPH cd544f9 UNW- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c), weight #> | (e/n) #> + edges from cd544f9 (vertex names): #> [1] a--b a--j b--c c--d d--e e--f f--g g--h h--i i--j ## Directed g3 <- make_star(10, mode = \"in\") V(g3)$name <- letters[1:10] GNEL2 <- as_graphnel(g3) g4 <- graph_from_graphnel(GNEL2) g4 #> IGRAPH d98947a DNW- 10 9 -- In-star #> + attr: name (g/c), mode (g/c), center (g/n), name (v/c), weight (e/n) #> + edges from d98947a (vertex names): #> [1] b->a c->a d->a e->a f->a g->a h->a i->a j->a"},{"path":"https://r.igraph.org/reference/graph_from_incidence_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"From incidence matrix — graph_from_incidence_matrix","title":"From incidence matrix — graph_from_incidence_matrix","text":"graph_from_incidence_matrix() renamed graph_from_biadjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph_from_incidence_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"From incidence matrix — graph_from_incidence_matrix","text":"","code":"graph_from_incidence_matrix(...)"},{"path":"https://r.igraph.org/reference/graph_from_incidence_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"From incidence matrix — graph_from_incidence_matrix","text":"authors refer bipartite adjacency matrix \"bipartite incidence matrix\". igraph 1.6.0 later use naming avoid confusion edge-vertex incidence matrix.","code":""},{"path":"https://r.igraph.org/reference/graph_from_isomorphism_class.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a graph from an isomorphism class — graph_from_isomorphism_class","title":"Create a graph from an isomorphism class — graph_from_isomorphism_class","text":"isomorphism class non-negative integer number. Graphs (number vertices) isomorphism class isomorphic isomorphic graphs always isomorphism class. Currently can handle directed graphs 3 4 vertices undirected graphd 3 6 vertices.","code":""},{"path":"https://r.igraph.org/reference/graph_from_isomorphism_class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a graph from an isomorphism class — graph_from_isomorphism_class","text":"","code":"graph_from_isomorphism_class(size, number, directed = TRUE)"},{"path":"https://r.igraph.org/reference/graph_from_isomorphism_class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a graph from an isomorphism class — graph_from_isomorphism_class","text":"size number vertices graph. number isomorphism class. directed Whether create directed graph (default).","code":""},{"path":"https://r.igraph.org/reference/graph_from_isomorphism_class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a graph from an isomorphism class — graph_from_isomorphism_class","text":"igraph object, graph given size, directedness isomorphism class.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_isomorphism_class.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Create a graph from an isomorphism class — graph_from_isomorphism_class","text":"igraph_isoclass_create().","code":""},{"path":"https://r.igraph.org/reference/graph_from_lcf.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating a graph from LCF notation — graph_from_lcf","title":"Creating a graph from LCF notation — graph_from_lcf","text":"LCF short Lederberg-Coxeter-Frucht, concise notation 3-regular Hamiltonian graphs. constists three parameters, number vertices graph, list shifts giving additional edges cycle backbone another integer giving many times shifts performed. See http://mathworld.wolfram.com/LCFNotation.html details.","code":""},{"path":"https://r.igraph.org/reference/graph_from_lcf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating a graph from LCF notation — graph_from_lcf","text":"","code":"graph_from_lcf(n, shifts, repeats = 1)"},{"path":"https://r.igraph.org/reference/graph_from_lcf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating a graph from LCF notation — graph_from_lcf","text":"n Integer, number vertices graph. shifts Integer vector, shifts. repeats Integer constant, many times repeat shifts.","code":""},{"path":"https://r.igraph.org/reference/graph_from_lcf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creating a graph from LCF notation — graph_from_lcf","text":"graph object.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_lcf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Creating a graph from LCF notation — graph_from_lcf","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/graph_from_lcf.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Creating a graph from LCF notation — graph_from_lcf","text":"igraph_lcf_vector().","code":""},{"path":"https://r.igraph.org/reference/graph_from_lcf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creating a graph from LCF notation — graph_from_lcf","text":"","code":"# This is the Franklin graph: g1 <- graph_from_lcf(12, c(5, -5), 6) g2 <- make_graph(\"Franklin\") isomorphic(g1, g2) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/graph_from_literal.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating (small) graphs via a simple interface — graph_from_literal","title":"Creating (small) graphs via a simple interface — graph_from_literal","text":"function useful want create small (named) graph quickly, works directed undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/graph_from_literal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating (small) graphs via a simple interface — graph_from_literal","text":"","code":"graph_from_literal(..., simplify = TRUE) from_literal(...)"},{"path":"https://r.igraph.org/reference/graph_from_literal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating (small) graphs via a simple interface — graph_from_literal","text":"... graph_from_literal() formulae giving structure graph, see details . from_literal() arguments passed graph_from_literal(). simplify Logical scalar, whether call simplify() created graph. default graph simplified, loop multiple edges removed.","code":""},{"path":"https://r.igraph.org/reference/graph_from_literal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creating (small) graphs via a simple interface — graph_from_literal","text":"igraph graph","code":""},{"path":"https://r.igraph.org/reference/graph_from_literal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creating (small) graphs via a simple interface — graph_from_literal","text":"graph_from_literal() handy creating small graphs quickly. need supply one R expressions giving structure graph. expressions consist vertex names edge operators. edge operator sequence ‘-’ ‘+’ characters, former edges latter used arrow heads. edges can arbitrarily long, .e. may use many ‘-’ characters “draw” like. edge operators consist ‘-’ characters graph undirected, whereas single ‘+’ character implies directed graph. Let us see simple examples. Without arguments function creates empty graph: simple undirected graph two vertices called ‘’ ‘B’ one edge : Remember length edges matter, written following, creates graph: many disconnected components graph, separate commas. can also give isolate vertices. ‘:’ operator can used define vertex sets. edge operator connects two vertex sets every vertex first set connected every vertex second set. following form creates full graph, including loop edges: directed graphs, edges created edge operator includes arrow head (‘+’) end edge: Thus third example edge created vertices B C. Mutual edges can also created simple edge operator: Note length edge operators arbitrary, ‘+’, ‘++’ ‘+-----+’ exactly meaning. vertex names include spaces special characters need quote : can include character vertex names way, even ‘+’ ‘-’ characters. See examples .","code":"graph_from_literal() graph_from_literal(A-B) graph_from_literal( A-----B ) graph_from_literal( A--B, C--D, E--F, G--H, I, J, K ) graph_from_literal( A:B:C:D -- A:B:C:D ) graph_from_literal( A -+ B -+ C ) graph_from_literal( A +- B -+ C ) graph_from_literal( A +- B -- C ) graph_from_literal( A +-+ B +---+ C ++ D + E) graph_from_literal( \"this is\" +- \"a silly\" -+ \"graph here\" )"},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_literal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creating (small) graphs via a simple interface — graph_from_literal","text":"","code":"# A simple undirected graph g <- graph_from_literal( Alice - Bob - Cecil - Alice, Daniel - Cecil - Eugene, Cecil - Gordon ) g #> IGRAPH b412a86 UN-- 6 6 -- #> + attr: name (v/c) #> + edges from b412a86 (vertex names): #> [1] Alice--Bob Alice--Cecil Bob --Cecil Cecil--Daniel Cecil--Eugene #> [6] Cecil--Gordon # Another undirected graph, \":\" notation g2 <- graph_from_literal(Alice - Bob:Cecil:Daniel, Cecil:Daniel - Eugene:Gordon) g2 #> IGRAPH 240b5bc UN-- 6 7 -- #> + attr: name (v/c) #> + edges from 240b5bc (vertex names): #> [1] Alice --Bob Alice --Cecil Alice --Daniel Cecil --Eugene Cecil --Gordon #> [6] Daniel--Eugene Daniel--Gordon # A directed graph g3 <- graph_from_literal( Alice +-+ Bob --+ Cecil +-- Daniel, Eugene --+ Gordon:Helen ) g3 #> IGRAPH 0a9a8ec DN-- 7 6 -- #> + attr: name (v/c) #> + edges from 0a9a8ec (vertex names): #> [1] Alice ->Bob Bob ->Alice Bob ->Cecil Daniel->Cecil Eugene->Gordon #> [6] Eugene->Helen # A graph with isolate vertices g4 <- graph_from_literal(Alice -- Bob -- Daniel, Cecil:Gordon, Helen) g4 #> IGRAPH 316264e UN-- 6 2 -- #> + attr: name (v/c) #> + edges from 316264e (vertex names): #> [1] Alice--Bob Bob --Daniel V(g4)$name #> [1] \"Alice\" \"Bob\" \"Daniel\" \"Cecil\" \"Gordon\" \"Helen\" # \"Arrows\" can be arbitrarily long g5 <- graph_from_literal(Alice +---------+ Bob) g5 #> IGRAPH 999a521 DN-- 2 2 -- #> + attr: name (v/c) #> + edges from 999a521 (vertex names): #> [1] Alice->Bob Bob ->Alice # Special vertex names g6 <- graph_from_literal(\"+\" -- \"-\", \"*\" -- \"/\", \"%%\" -- \"%/%\") g6 #> IGRAPH d88c3eb UN-- 6 3 -- #> + attr: name (v/c) #> + edges from d88c3eb (vertex names): #> [1] + --- * --/ %%--%/%"},{"path":"https://r.igraph.org/reference/graph_id.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the id of a graph — graph_id","title":"Get the id of a graph — graph_id","text":"Graph ids used check vertex edge sequence belongs graph. create new graph changing structure graph, new graph new id. Changing attributes change id.","code":""},{"path":"https://r.igraph.org/reference/graph_id.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the id of a graph — graph_id","text":"","code":"graph_id(x, ...)"},{"path":"https://r.igraph.org/reference/graph_id.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the id of a graph — graph_id","text":"x graph vertex sequence edge sequence. ... used currently.","code":""},{"path":"https://r.igraph.org/reference/graph_id.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the id of a graph — graph_id","text":"id graph, character scalar. vertex edge sequences id graph created .","code":""},{"path":"https://r.igraph.org/reference/graph_id.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the id of a graph — graph_id","text":"","code":"g <- make_ring(10) graph_id(g) #> [1] \"ff571191-c65c-4a9f-ac10-56f21212b5c5\" graph_id(V(g)) #> [1] \"ff571191-c65c-4a9f-ac10-56f21212b5c5\" graph_id(E(g)) #> [1] \"ff571191-c65c-4a9f-ac10-56f21212b5c5\" g2 <- g + 1 graph_id(g2) #> [1] \"69469c94-ffa9-4303-aea1-c19543867c8e\""},{"path":"https://r.igraph.org/reference/graph_version.html","id":null,"dir":"Reference","previous_headings":"","what":"igraph data structure versions — graph_version","title":"igraph data structure versions — graph_version","text":"igraph's internal data representation changes sometimes versions. means always possible use igraph objects created (possibly saved file) older igraph version.","code":""},{"path":"https://r.igraph.org/reference/graph_version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"igraph data structure versions — graph_version","text":"","code":"graph_version(graph)"},{"path":"https://r.igraph.org/reference/graph_version.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"igraph data structure versions — graph_version","text":"graph input graph. missing, version number current data format returned.","code":""},{"path":"https://r.igraph.org/reference/graph_version.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"igraph data structure versions — graph_version","text":"integer scalar.","code":""},{"path":"https://r.igraph.org/reference/graph_version.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"igraph data structure versions — graph_version","text":"graph_version() queries current data format, data format possibly older igraph graph. upgrade_graph() can convert older data format current one.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graphlet_basis.html","id":null,"dir":"Reference","previous_headings":"","what":"Graphlet decomposition of a graph — graphlet_basis","title":"Graphlet decomposition of a graph — graphlet_basis","text":"Graphlet decomposition models weighted undirected graph via union potentially overlapping dense social groups. done two-step algorithm. first step candidate set groups (candidate basis) created finding cliques thresholded input graph. second step graph projected candidate basis, resulting weight coefficient clique candidate basis.","code":""},{"path":"https://r.igraph.org/reference/graphlet_basis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graphlet decomposition of a graph — graphlet_basis","text":"","code":"graphlet_basis(graph, weights = NULL) graphlet_proj( graph, weights = NULL, cliques, niter = 1000, Mu = rep(1, length(cliques)) ) graphlets(graph, weights = NULL, niter = 1000)"},{"path":"https://r.igraph.org/reference/graphlet_basis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graphlet decomposition of a graph — graphlet_basis","text":"graph input graph, edge directions ignored. simple graph (.e. graphs without self-loops multiple edges) supported. weights Edge weights. graph weight edge attribute argument NULL (default), weight edge attribute used. cliques list vertex ids, graphlet basis use projection. niter Integer scalar, number iterations perform. Mu Starting weights projection.","code":""},{"path":"https://r.igraph.org/reference/graphlet_basis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graphlet decomposition of a graph — graphlet_basis","text":"graphlets() returns list two members: cliques list subgraphs, candidate graphlet basis. subgraph give vector vertex ids. Mu weights subgraphs graphlet basis. graphlet_basis() returns list two elements: cliques list subgraphs, candidate graphlet basis. subgraph give vector vertex ids. thresholds weight thresholds used finding subgraphs. graphlet_proj() return numeric vector, weights graphlet basis subgraphs.","code":""},{"path":"https://r.igraph.org/reference/graphlet_basis.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graphlet decomposition of a graph — graphlet_basis","text":"igraph contains three functions performing graph decomponsition graph. first graphlets(), performed steps method returns list subgraphs, corresponding weights. second third functions correspond first second steps algorithm, useful user wishes perform individually: graphlet_basis() graphlet_proj().","code":""},{"path":"https://r.igraph.org/reference/graphlet_basis.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Graphlet decomposition of a graph — graphlet_basis","text":"igraph_graphlets().","code":""},{"path":"https://r.igraph.org/reference/graphlet_basis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graphlet decomposition of a graph — graphlet_basis","text":"","code":"## Create an example graph first D1 <- matrix(0, 5, 5) D2 <- matrix(0, 5, 5) D3 <- matrix(0, 5, 5) D1[1:3, 1:3] <- 2 D2[3:5, 3:5] <- 3 D3[2:5, 2:5] <- 1 g <- simplify(graph_from_adjacency_matrix(D1 + D2 + D3, mode = \"undirected\", weighted = TRUE )) V(g)$color <- \"white\" E(g)$label <- E(g)$weight E(g)$label.cex <- 2 E(g)$color <- \"black\" layout(matrix(1:6, nrow = 2, byrow = TRUE)) co <- layout_with_kk(g) par(mar = c(1, 1, 1, 1)) plot(g, layout = co) ## Calculate graphlets gl <- graphlets(g, niter = 1000) ## Plot graphlets for (i in 1:length(gl$cliques)) { sel <- gl$cliques[[i]] V(g)$color <- \"white\" V(g)[sel]$color <- \"#E495A5\" E(g)$width <- 1 E(g)[V(g)[sel] %--% V(g)[sel]]$width <- 2 E(g)$label <- \"\" E(g)[width == 2]$label <- round(gl$Mu[i], 2) E(g)$color <- \"black\" E(g)[width == 2]$color <- \"#E495A5\" plot(g, layout = co) }"},{"path":"https://r.igraph.org/reference/graphlets.candidate.basis.html","id":null,"dir":"Reference","previous_headings":"","what":"Graphlet decomposition of a graph — graphlets.candidate.basis","title":"Graphlet decomposition of a graph — graphlets.candidate.basis","text":"graphlets.candidate.basis() renamed graphlet_basis() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graphlets.candidate.basis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graphlet decomposition of a graph — graphlets.candidate.basis","text":"","code":"graphlets.candidate.basis(graph, weights = NULL)"},{"path":"https://r.igraph.org/reference/graphlets.candidate.basis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graphlet decomposition of a graph — graphlets.candidate.basis","text":"graph input graph, edge directions ignored. simple graph (.e. graphs without self-loops multiple edges) supported. weights Edge weights. graph weight edge attribute argument NULL (default), weight edge attribute used.","code":""},{"path":"https://r.igraph.org/reference/graphlets.project.html","id":null,"dir":"Reference","previous_headings":"","what":"Graphlet decomposition of a graph — graphlets.project","title":"Graphlet decomposition of a graph — graphlets.project","text":"graphlets.project() renamed graphlet_proj() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graphlets.project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graphlet decomposition of a graph — graphlets.project","text":"","code":"graphlets.project( graph, weights = NULL, cliques, niter = 1000, Mu = rep(1, length(cliques)) )"},{"path":"https://r.igraph.org/reference/graphlets.project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graphlet decomposition of a graph — graphlets.project","text":"graph input graph, edge directions ignored. simple graph (.e. graphs without self-loops multiple edges) supported. weights Edge weights. graph weight edge attribute argument NULL (default), weight edge attribute used. cliques list vertex ids, graphlet basis use projection. niter Integer scalar, number iterations perform. Mu Starting weights projection.","code":""},{"path":"https://r.igraph.org/reference/greedy_vertex_coloring.html","id":null,"dir":"Reference","previous_headings":"","what":"Greedy vertex coloring — greedy_vertex_coloring","title":"Greedy vertex coloring — greedy_vertex_coloring","text":"greedy_vertex_coloring() finds coloring vertices graph based simple greedy algorithm.","code":""},{"path":"https://r.igraph.org/reference/greedy_vertex_coloring.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Greedy vertex coloring — greedy_vertex_coloring","text":"","code":"greedy_vertex_coloring(graph, heuristic = c(\"colored_neighbors\", \"dsatur\"))"},{"path":"https://r.igraph.org/reference/greedy_vertex_coloring.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Greedy vertex coloring — greedy_vertex_coloring","text":"graph graph object color. heuristic selection heuristic next vertex consider. Possible values : “colored_neighbors” selects vertex largest number already colored neighbors. “dsatur” selects vertex largest number unique colors neighborhood, .e. \"saturation degree\"; several maximum saturation degree vertices, one uncolored neighbors selected.","code":""},{"path":"https://r.igraph.org/reference/greedy_vertex_coloring.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Greedy vertex coloring — greedy_vertex_coloring","text":"numeric vector item contains color index associated vertex .","code":""},{"path":"https://r.igraph.org/reference/greedy_vertex_coloring.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Greedy vertex coloring — greedy_vertex_coloring","text":"goal vertex coloring assign \"color\" (represented positive integer) vertex graph neighboring vertices never color. function solves problem considering vertices one one according heuristic, always choosing smallest color differs already colored neighbors. coloring obtained way necessarily minimum can calculated linear time.","code":""},{"path":"https://r.igraph.org/reference/greedy_vertex_coloring.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Greedy vertex coloring — greedy_vertex_coloring","text":"igraph_vertex_coloring_greedy().","code":""},{"path":"https://r.igraph.org/reference/greedy_vertex_coloring.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Greedy vertex coloring — greedy_vertex_coloring","text":"","code":"g <- make_graph(\"petersen\") col <- greedy_vertex_coloring(g) plot(g, vertex.color = col)"},{"path":"https://r.igraph.org/reference/grg.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Geometric random graphs — grg.game","title":"Geometric random graphs — grg.game","text":"grg.game() renamed sample_grg() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/grg.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Geometric random graphs — grg.game","text":"","code":"grg.game(nodes, radius, torus = FALSE, coords = FALSE)"},{"path":"https://r.igraph.org/reference/grg.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Geometric random graphs — grg.game","text":"nodes number vertices graph. radius radius within vertices connected edge. torus Logical constant, whether use torus instead square. coords Logical scalar, whether add positions vertices vertex attributes called ‘x’ ‘y’.","code":""},{"path":"https://r.igraph.org/reference/groups.html","id":null,"dir":"Reference","previous_headings":"","what":"Groups of a vertex partitioning — groups","title":"Groups of a vertex partitioning — groups","text":"Create list vertex groups graph clustering community structure.","code":""},{"path":"https://r.igraph.org/reference/groups.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Groups of a vertex partitioning — groups","text":"","code":"groups(x)"},{"path":"https://r.igraph.org/reference/groups.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Groups of a vertex partitioning — groups","text":"x object represents grouping vertices. See details .","code":""},{"path":"https://r.igraph.org/reference/groups.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Groups of a vertex partitioning — groups","text":"named list numeric character vectors. names just numbers refer groups. vectors numeric symbolic vertex ids.","code":""},{"path":"https://r.igraph.org/reference/groups.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Groups of a vertex partitioning — groups","text":"Currently two methods defined function. default method works output components(). (fact works object list entry called membership.) second method works communities() objects.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/groups.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Groups of a vertex partitioning — groups","text":"","code":"g <- make_graph(\"Zachary\") fgc <- cluster_fast_greedy(g) groups(fgc) #> $`1` #> [1] 1 5 6 7 11 12 17 20 #> #> $`2` #> [1] 9 15 16 19 21 23 24 25 26 27 28 29 30 31 32 33 34 #> #> $`3` #> [1] 2 3 4 8 10 13 14 18 22 #> g2 <- make_ring(10) + make_full_graph(5) groups(components(g2)) #> $`1` #> [1] 1 2 3 4 5 6 7 8 9 10 #> #> $`2` #> [1] 11 12 13 14 15 #>"},{"path":"https://r.igraph.org/reference/growing.random.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Growing random graph generation — growing.random.game","title":"Growing random graph generation — growing.random.game","text":"growing.random.game() renamed sample_growing() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/growing.random.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Growing random graph generation — growing.random.game","text":"","code":"growing.random.game(n, m = 1, directed = TRUE, citation = FALSE)"},{"path":"https://r.igraph.org/reference/growing.random.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Growing random graph generation — growing.random.game","text":"n Numeric constant, number vertices graph. m Numeric constant, number edges added time step. directed Logical, whether create directed graph. citation Logical. TRUE citation graph created, .e. time step added edges originating new vertex.","code":""},{"path":"https://r.igraph.org/reference/gsize.html","id":null,"dir":"Reference","previous_headings":"","what":"The size of the graph (number of edges) — gsize","title":"The size of the graph (number of edges) — gsize","text":"ecount() gsize() aliases.","code":""},{"path":"https://r.igraph.org/reference/gsize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The size of the graph (number of edges) — gsize","text":"","code":"gsize(graph) ecount(graph)"},{"path":"https://r.igraph.org/reference/gsize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The size of the graph (number of edges) — gsize","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/gsize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The size of the graph (number of edges) — gsize","text":"Numeric scalar, number edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/gsize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The size of the graph (number of edges) — gsize","text":"","code":"g <- sample_gnp(100, 2 / 100) gsize(g) #> [1] 102 ecount(g) #> [1] 102 # Number of edges in a G(n,p) graph replicate(100, sample_gnp(10, 1 / 2), simplify = FALSE) %>% vapply(gsize, 0) %>% hist()"},{"path":"https://r.igraph.org/reference/handle_vertex_type_arg.html","id":null,"dir":"Reference","previous_headings":"","what":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","title":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","text":"function takes types graph arguments public igraph function call validates vertex type vector.","code":""},{"path":"https://r.igraph.org/reference/handle_vertex_type_arg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","text":"","code":"handle_vertex_type_arg(types, graph, required = T)"},{"path":"https://r.igraph.org/reference/handle_vertex_type_arg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","text":"types vertex types graph graph required whether graph bipartite","code":""},{"path":"https://r.igraph.org/reference/handle_vertex_type_arg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","text":"logical vector representing resolved vertex type vertex graph","code":""},{"path":"https://r.igraph.org/reference/handle_vertex_type_arg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","text":"provided vertex types NULL graph types vertex attribute, value vertex attribute used vertex types. Non-logical vertex type vectors coerced logical vectors printing warning.","code":""},{"path":"https://r.igraph.org/reference/handle_vertex_type_arg.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Harmonic centrality of vertices — harmonic_centrality","title":"Harmonic centrality of vertices — harmonic_centrality","text":"harmonic centrality vertex mean inverse distance vertices. inverse distance unreachable vertex considered zero.","code":""},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Harmonic centrality of vertices — harmonic_centrality","text":"","code":"harmonic_centrality( graph, vids = V(graph), mode = c(\"out\", \"in\", \"all\", \"total\"), weights = NULL, normalized = FALSE, cutoff = -1 )"},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Harmonic centrality of vertices — harmonic_centrality","text":"graph graph analyze. vids vertices harmonic centrality calculated. mode Character string, defining types paths used measuring distance directed graphs. “” follows paths along edge directions , “” traverses edges reverse, “” ignores edge directions. argument ignored undirected graphs. weights Optional positive weight vector calculating weighted harmonic centrality. graph weight edge attribute, used default. Weights used calculating weighted shortest paths, interpreted distances. normalized Logical scalar, whether calculate normalized harmonic centrality. true, result mean inverse path length vertices, .e. normalized number vertices minus one. false, result sum inverse path lengths vertices. cutoff maximum path length consider calculating harmonic centrality. limit cutoff negative. Note zero cutoff means paths length 0 considered.","code":""},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Harmonic centrality of vertices — harmonic_centrality","text":"Numeric vector harmonic centrality scores vertices v.","code":""},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Harmonic centrality of vertices — harmonic_centrality","text":"cutoff argument can used restrict calculation paths length cutoff smaller ; can used larger graphs speed calculation. cutoff negative (default), function calculates exact harmonic centrality scores.","code":""},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Harmonic centrality of vertices — harmonic_centrality","text":"M. Marchiori V. Latora, Harmony small-world, Physica 285, pp. 539-546 (2000).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Harmonic centrality of vertices — harmonic_centrality","text":"igraph_harmonic_centrality_cutoff().","code":""},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Harmonic centrality of vertices — harmonic_centrality","text":"","code":"g <- make_ring(10) g2 <- make_star(10) harmonic_centrality(g) #> [1] 4.366667 4.366667 4.366667 4.366667 4.366667 4.366667 4.366667 4.366667 #> [9] 4.366667 4.366667 harmonic_centrality(g2, mode = \"in\") #> [1] 9 0 0 0 0 0 0 0 0 0 harmonic_centrality(g2, mode = \"out\") #> [1] 0 1 1 1 1 1 1 1 1 1 harmonic_centrality(g %du% make_full_graph(5), mode = \"all\") #> [1] 4.366667 4.366667 4.366667 4.366667 4.366667 4.366667 4.366667 4.366667 #> [9] 4.366667 4.366667 4.000000 4.000000 4.000000 4.000000 4.000000"},{"path":"https://r.igraph.org/reference/has.multiple.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the multiple or loop edges in a graph — has.multiple","title":"Find the multiple or loop edges in a graph — has.multiple","text":".multiple() renamed any_multiple() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/has.multiple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the multiple or loop edges in a graph — has.multiple","text":"","code":"has.multiple(graph)"},{"path":"https://r.igraph.org/reference/has.multiple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the multiple or loop edges in a graph — has.multiple","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/has_eulerian_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Eulerian paths or cycles in a graph — has_eulerian_path","title":"Find Eulerian paths or cycles in a graph — has_eulerian_path","text":"has_eulerian_path() has_eulerian_cycle() checks whether Eulerian path cycle input graph. eulerian_path() eulerian_cycle() return path cycle exists, throws error otherwise.","code":""},{"path":"https://r.igraph.org/reference/has_eulerian_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Eulerian paths or cycles in a graph — has_eulerian_path","text":"","code":"has_eulerian_path(graph) has_eulerian_cycle(graph) eulerian_path(graph) eulerian_cycle(graph)"},{"path":"https://r.igraph.org/reference/has_eulerian_path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Eulerian paths or cycles in a graph — has_eulerian_path","text":"graph igraph graph object","code":""},{"path":"https://r.igraph.org/reference/has_eulerian_path.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find Eulerian paths or cycles in a graph — has_eulerian_path","text":"has_eulerian_path() has_eulerian_cycle(), logical value indicates whether graph contains Eulerian path cycle. eulerian_path() eulerian_cycle(), named list two entries: epath vector containing edge ids along Eulerian path cycle. vpath vector containing vertex ids along Eulerian path cycle.","code":""},{"path":"https://r.igraph.org/reference/has_eulerian_path.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find Eulerian paths or cycles in a graph — has_eulerian_path","text":"has_eulerian_path() decides whether input graph Eulerian path, .e. path passes every edge graph exactly , returns logical value result. eulerian_path() returns possible Eulerian path, described edge vertex sequence, throws error path exists. has_eulerian_cycle() decides whether input graph Eulerian cycle, .e. path passes every edge graph exactly returns starting point, returns logical value result. eulerian_cycle() returns possible Eulerian cycle, described edge vertex sequence, throws error cycle exists.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/has_eulerian_path.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Find Eulerian paths or cycles in a graph — has_eulerian_path","text":"igraph_is_eulerian(), igraph_eulerian_path(), igraph_eulerian_cycle().","code":""},{"path":"https://r.igraph.org/reference/has_eulerian_path.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find Eulerian paths or cycles in a graph — has_eulerian_path","text":"","code":"g <- make_graph(~ A - B - C - D - E - A - F - D - B - F - E) has_eulerian_path(g) #> [1] TRUE eulerian_path(g) #> $epath #> + 10/10 edges from 17655ba (vertex names): #> [1] A--B B--C C--D B--D B--F A--F A--E D--E D--F E--F #> #> $vpath #> + 11/6 vertices, named, from 17655ba: #> [1] A B C D B F A E D F E #> has_eulerian_cycle(g) #> [1] FALSE try(eulerian_cycle(g)) #> Error in eulerian_cycle(g) : #> At vendor/cigraph/src/paths/eulerian.c:615 : The graph does not have an Eulerian cycle. Input problem has no solution"},{"path":"https://r.igraph.org/reference/head_of.html","id":null,"dir":"Reference","previous_headings":"","what":"Head of the edge(s) in a graph — head_of","title":"Head of the edge(s) in a graph — head_of","text":"undirected graphs, head tail defined. case head_of() returns vertices incident supplied edges, tail_of() returns end(s) edge(s).","code":""},{"path":"https://r.igraph.org/reference/head_of.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Head of the edge(s) in a graph — head_of","text":"","code":"head_of(graph, es)"},{"path":"https://r.igraph.org/reference/head_of.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Head of the edge(s) in a graph — head_of","text":"graph input graph. es edges query.","code":""},{"path":"https://r.igraph.org/reference/head_of.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Head of the edge(s) in a graph — head_of","text":"vertex sequence head(s) edge(s).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/head_print.html","id":null,"dir":"Reference","previous_headings":"","what":"Print the only the head of an R object — head_print","title":"Print the only the head of an R object — head_print","text":"Print head R object","code":""},{"path":"https://r.igraph.org/reference/head_print.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print the only the head of an R object — head_print","text":"","code":"head_print( x, max_lines = 20, header = \"\", footer = \"\", omitted_footer = \"\", ... )"},{"path":"https://r.igraph.org/reference/head_print.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print the only the head of an R object — head_print","text":"x object print, callback function. See printer_callback() details. max_lines Maximum number lines print, including header footer. header header, function, called, otherwise printed using cat. footer footer, function, called, otherwise printed using cat. omitted_footer Footer printed anything omitted printout. function, called, otherwise printed using cat. ... Extra arguments pass print().","code":""},{"path":"https://r.igraph.org/reference/head_print.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print the only the head of an R object — head_print","text":"x, invisibly.","code":""},{"path":"https://r.igraph.org/reference/hits_scores.html","id":null,"dir":"Reference","previous_headings":"","what":"Kleinberg's hub and authority centrality scores. — hits_scores","title":"Kleinberg's hub and authority centrality scores. — hits_scores","text":"hub scores vertices defined principal eigenvector \\(^T\\), \\(\\) adjacency matrix graph.","code":""},{"path":"https://r.igraph.org/reference/hits_scores.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kleinberg's hub and authority centrality scores. — hits_scores","text":"","code":"hits_scores( graph, ..., scale = TRUE, weights = NULL, options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/hits_scores.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kleinberg's hub and authority centrality scores. — hits_scores","text":"graph input graph. ... dots future extensions must empty. scale Logical scalar, whether scale result maximum score one. scaling used result vector unit length Euclidean norm. weights Optional positive weight vector calculating weighted scores. graph weight edge attribute, used default. function interprets edge weights connection strengths. random surfer model, edge larger weight likely selected surfer. options named list, override ARPACK options. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/hits_scores.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Kleinberg's hub and authority centrality scores. — hits_scores","text":"named list members: hub hub score vertices. authority authority score vertices. value corresponding eigenvalue calculated principal eigenvector. options information ARPACK computation, members options member returned arpack(), see documentation.","code":""},{"path":"https://r.igraph.org/reference/hits_scores.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Kleinberg's hub and authority centrality scores. — hits_scores","text":"Similarly, authority scores vertices defined principal eigenvector \\(^T \\), \\(\\) adjacency matrix graph. undirected matrices adjacency matrix symmetric hub scores authority scores.","code":""},{"path":"https://r.igraph.org/reference/hits_scores.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kleinberg's hub and authority centrality scores. — hits_scores","text":"J. Kleinberg. Authoritative sources hyperlinked environment. Proc. 9th ACM-SIAM Symposium Discrete Algorithms, 1998. Extended version Journal ACM 46(1999). Also appears IBM Research Report RJ 10076, May 1997.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/hits_scores.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Kleinberg's hub and authority centrality scores. — hits_scores","text":"igraph_hub_and_authority_scores().","code":""},{"path":"https://r.igraph.org/reference/hits_scores.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kleinberg's hub and authority centrality scores. — hits_scores","text":"","code":"## An in-star g <- make_star(10) hits_scores(g) #> $hub #> [1] 2.602085e-18 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 #> [6] 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 #> #> $authority #> [1] 1 0 0 0 0 0 0 0 0 0 #> #> $value #> [1] 9 #> #> $options #> $options$bmat #> [1] \"I\" #> #> $options$n #> [1] 10 #> #> $options$which #> [1] \"LA\" #> #> $options$nev #> [1] 1 #> #> $options$tol #> [1] 0 #> #> $options$ncv #> [1] 0 #> #> $options$ldv #> [1] 0 #> #> $options$ishift #> [1] 1 #> #> $options$maxiter #> [1] 3000 #> #> $options$nb #> [1] 1 #> #> $options$mode #> [1] 1 #> #> $options$start #> [1] 1 #> #> $options$sigma #> [1] 0 #> #> $options$sigmai #> [1] 0 #> #> $options$info #> [1] 0 #> #> $options$iter #> [1] 1 #> #> $options$nconv #> [1] 1 #> #> $options$numop #> [1] 7 #> #> $options$numopb #> [1] 0 #> #> $options$numreo #> [1] 7 #> #> ## A ring g2 <- make_ring(10) hits_scores(g2) #> $hub #> [1] 1 0 1 0 1 0 1 0 1 0 #> #> $authority #> [1] 0 1 0 1 0 1 0 1 0 1 #> #> $value #> [1] 4 #> #> $options #> $options$bmat #> [1] \"I\" #> #> $options$n #> [1] 10 #> #> $options$which #> [1] \"LA\" #> #> $options$nev #> [1] 1 #> #> $options$tol #> [1] 0 #> #> $options$ncv #> [1] 0 #> #> $options$ldv #> [1] 0 #> #> $options$ishift #> [1] 1 #> #> $options$maxiter #> [1] 3000 #> #> $options$nb #> [1] 1 #> #> $options$mode #> [1] 1 #> #> $options$start #> [1] 1 #> #> $options$sigma #> [1] 0 #> #> $options$sigmai #> [1] 0 #> #> $options$info #> [1] 0 #> #> $options$iter #> [1] 1 #> #> $options$nconv #> [1] 1 #> #> $options$numop #> [1] 7 #> #> $options$numopb #> [1] 0 #> #> $options$numreo #> [1] 5 #> #>"},{"path":"https://r.igraph.org/reference/hrg-methods.html","id":null,"dir":"Reference","previous_headings":"","what":"Hierarchical random graphs — hrg-methods","title":"Hierarchical random graphs — hrg-methods","text":"Fitting sampling hierarchical random graph models.","code":""},{"path":"https://r.igraph.org/reference/hrg-methods.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Hierarchical random graphs — hrg-methods","text":"hierarchical random graph ensemble undirected graphs \\(n\\) vertices. defined via binary tree \\(n\\) leaf \\(n-1\\) internal vertices, internal vertices labeled probabilities. probability two vertices connected random graph given probability label closest common ancestor. Please see references hierarchical random graphs. igraph contains functions fitting HRG models given network (fit_hrg(), generating networks given HRG ensemble (sample_hrg()), converting igraph graph HRG back (hrg(), hrg_tree()), calculating consensus tree set sampled HRGs (consensus_tree()) predicting missing edges network based HRG models (predict_edges()). igraph HRG implementation heavily based code published Aaron Clauset, website (functional ).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/hrg.consensus.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a consensus tree from several hierarchical random graph models — hrg.consensus","title":"Create a consensus tree from several hierarchical random graph models — hrg.consensus","text":"hrg.consensus() renamed consensus_tree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hrg.consensus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a consensus tree from several hierarchical random graph models — hrg.consensus","text":"","code":"hrg.consensus(graph, hrg = NULL, start = FALSE, num.samples = 10000)"},{"path":"https://r.igraph.org/reference/hrg.consensus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a consensus tree from several hierarchical random graph models — hrg.consensus","text":"graph graph models fitted . hrg hierarchical random graph model, form igraphHRG object. consensus_tree() allows NULL well, HRG fitted graph first, random starting point. start Logical, whether start fitting/sampling supplied igraphHRG object, random starting point. num.samples Number samples use consensus generation missing edge prediction.","code":""},{"path":"https://r.igraph.org/reference/hrg.create.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a hierarchical random graph from an igraph graph — hrg.create","title":"Create a hierarchical random graph from an igraph graph — hrg.create","text":"hrg.create() renamed hrg() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hrg.create.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a hierarchical random graph from an igraph graph — hrg.create","text":"","code":"hrg.create(graph, prob)"},{"path":"https://r.igraph.org/reference/hrg.create.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a hierarchical random graph from an igraph graph — hrg.create","text":"graph igraph graph create HRG . prob vector probabilities, one vertex, order vertex ids.","code":""},{"path":"https://r.igraph.org/reference/hrg.dendrogram.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an igraph graph from a hierarchical random graph model — hrg.dendrogram","title":"Create an igraph graph from a hierarchical random graph model — hrg.dendrogram","text":"hrg.dendrogram() renamed hrg_tree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hrg.dendrogram.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an igraph graph from a hierarchical random graph model — hrg.dendrogram","text":"","code":"hrg.dendrogram(hrg)"},{"path":"https://r.igraph.org/reference/hrg.dendrogram.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an igraph graph from a hierarchical random graph model — hrg.dendrogram","text":"hrg hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/hrg.fit.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit a hierarchical random graph model — hrg.fit","title":"Fit a hierarchical random graph model — hrg.fit","text":"hrg.fit() renamed fit_hrg() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hrg.fit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit a hierarchical random graph model — hrg.fit","text":"","code":"hrg.fit(graph, hrg = NULL, start = FALSE, steps = 0)"},{"path":"https://r.igraph.org/reference/hrg.fit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit a hierarchical random graph model — hrg.fit","text":"graph graph fit model . Edge directions ignored directed graphs. hrg hierarchical random graph model, form igraphHRG object. fit_hrg() allows NULL, case random starting point used fitting. start Logical, whether start fitting/sampling supplied igraphHRG object, random starting point. steps number MCMC steps make. zero, MCMC procedure performed convergence.","code":""},{"path":"https://r.igraph.org/reference/hrg.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample from a hierarchical random graph model — hrg.game","title":"Sample from a hierarchical random graph model — hrg.game","text":"hrg.game() renamed sample_hrg() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hrg.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample from a hierarchical random graph model — hrg.game","text":"","code":"hrg.game(hrg)"},{"path":"https://r.igraph.org/reference/hrg.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample from a hierarchical random graph model — hrg.game","text":"hrg hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/hrg.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a hierarchical random graph from an igraph graph — hrg","title":"Create a hierarchical random graph from an igraph graph — hrg","text":"hrg() creates HRG igraph graph. igraph graph must directed binary tree, \\(n-1\\) internal \\(n\\) leaf vertices. prob argument contains HRG probability labels vertex; ignored leaf vertices.","code":""},{"path":"https://r.igraph.org/reference/hrg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a hierarchical random graph from an igraph graph — hrg","text":"","code":"hrg(graph, prob)"},{"path":"https://r.igraph.org/reference/hrg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a hierarchical random graph from an igraph graph — hrg","text":"graph igraph graph create HRG . prob vector probabilities, one vertex, order vertex ids.","code":""},{"path":"https://r.igraph.org/reference/hrg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a hierarchical random graph from an igraph graph — hrg","text":"hrg() returns igraphHRG object.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/hrg.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Create a hierarchical random graph from an igraph graph — hrg","text":"igraph_hrg_create().","code":""},{"path":"https://r.igraph.org/reference/hrg.predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Predict edges based on a hierarchical random graph model — hrg.predict","title":"Predict edges based on a hierarchical random graph model — hrg.predict","text":"hrg.predict() renamed predict_edges() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hrg.predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Predict edges based on a hierarchical random graph model — hrg.predict","text":"","code":"hrg.predict( graph, hrg = NULL, start = FALSE, num.samples = 10000, num.bins = 25 )"},{"path":"https://r.igraph.org/reference/hrg.predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Predict edges based on a hierarchical random graph model — hrg.predict","text":"graph graph fit model . Edge directions ignored directed graphs. hrg hierarchical random graph model, form igraphHRG object. predict_edges() allow NULL well, HRG fitted graph first, random starting point. start Logical, whether start fitting/sampling supplied igraphHRG object, random starting point. num.samples Number samples use consensus generation missing edge prediction. num.bins Number bins edge probabilities. Give higher number accurate prediction.","code":""},{"path":"https://r.igraph.org/reference/hrg_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an igraph graph from a hierarchical random graph model — hrg_tree","title":"Create an igraph graph from a hierarchical random graph model — hrg_tree","text":"hrg_tree() creates corresponsing igraph tree hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/hrg_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an igraph graph from a hierarchical random graph model — hrg_tree","text":"","code":"hrg_tree(hrg)"},{"path":"https://r.igraph.org/reference/hrg_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an igraph graph from a hierarchical random graph model — hrg_tree","text":"hrg hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/hrg_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an igraph graph from a hierarchical random graph model — hrg_tree","text":"igraph graph vertex attribute called \"probability\".","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/hrg_tree.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Create an igraph graph from a hierarchical random graph model — hrg_tree","text":"igraph_from_hrg_dendrogram().","code":""},{"path":"https://r.igraph.org/reference/hub.score.html","id":null,"dir":"Reference","previous_headings":"","what":"Kleinberg's hub and authority centrality scores. — hub.score","title":"Kleinberg's hub and authority centrality scores. — hub.score","text":"hub.score() renamed hub_score() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hub.score.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kleinberg's hub and authority centrality scores. — hub.score","text":"","code":"hub.score(graph, scale = TRUE, weights = NULL, options = arpack_defaults())"},{"path":"https://r.igraph.org/reference/hub.score.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kleinberg's hub and authority centrality scores. — hub.score","text":"graph input graph. scale Logical scalar, whether scale result maximum score one. scaling used result vector unit length Euclidean norm. weights Optional positive weight vector calculating weighted scores. graph weight edge attribute, used default. function interprets edge weights connection strengths. random surfer model, edge larger weight likely selected surfer. options named list, override ARPACK options. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/hub_score.html","id":null,"dir":"Reference","previous_headings":"","what":"Kleinberg's authority centrality scores. — authority_score","title":"Kleinberg's authority centrality scores. — authority_score","text":"Kleinberg's authority centrality scores. Kleinberg's hub centrality scores.","code":""},{"path":"https://r.igraph.org/reference/hub_score.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kleinberg's authority centrality scores. — authority_score","text":"","code":"authority_score( graph, scale = TRUE, weights = NULL, options = arpack_defaults() ) hub_score(graph, scale = TRUE, weights = NULL, options = arpack_defaults())"},{"path":"https://r.igraph.org/reference/hub_score.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kleinberg's authority centrality scores. — authority_score","text":"graph input graph. scale Logical scalar, whether scale result maximum score one. scaling used result vector unit length Euclidean norm. weights Optional positive weight vector calculating weighted scores. graph weight edge attribute, used default. function interprets edge weights connection strengths. random surfer model, edge larger weight likely selected surfer. options named list, override ARPACK options. See arpack() details.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/identical_graphs.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide if two graphs are identical — identical_graphs","title":"Decide if two graphs are identical — identical_graphs","text":"Two graphs considered identical function represented exactly way internal R representation. means two graphs must list vertices edges, exactly order, directedness, two graphs must also identical graph, vertex edge attributes.","code":""},{"path":"https://r.igraph.org/reference/identical_graphs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide if two graphs are identical — identical_graphs","text":"","code":"identical_graphs(g1, g2, attrs = TRUE)"},{"path":"https://r.igraph.org/reference/identical_graphs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide if two graphs are identical — identical_graphs","text":"g1, g2 two graphs attrs Whether compare attributes graphs","code":""},{"path":"https://r.igraph.org/reference/identical_graphs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decide if two graphs are identical — identical_graphs","text":"Logical scalar","code":""},{"path":"https://r.igraph.org/reference/identical_graphs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Decide if two graphs are identical — identical_graphs","text":"similar identical base package, ignores mutable piece igraph objects; might different even two graphs identical. Attribute comparison can turned attrs parameter attributes two graphs allowed different.","code":""},{"path":"https://r.igraph.org/reference/igraph-attribute-combination.html","id":null,"dir":"Reference","previous_headings":"","what":"How igraph functions handle attributes when the graph changes — igraph-attribute-combination","title":"How igraph functions handle attributes when the graph changes — igraph-attribute-combination","text":"Many times, structure graph modified, vertices/edges map original graph map vertices/edges newly created (modified) graph. example simplify() maps multiple edges single edges. igraph provides flexible mechanism specify vertex/edge attributes cases.","code":""},{"path":"https://r.igraph.org/reference/igraph-attribute-combination.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"How igraph functions handle attributes when the graph changes — igraph-attribute-combination","text":"functions support combination attributes one two extra arguments called vertex.attr.comb /edge.attr.comb specify perform mapping attributes. E.g. contract() contracts many vertices single one, attributes vertices can combined stores vertex attributes new graph. specification combination (vertex edge) attributes can given character scalar, function object list character scalars /function objects. character scalar, refers one predefined combinations, see list . function, given function expected perform combination. called new vertex/edge graph, single argument: attribute values vertices map single vertex. third option, list can used specify different combination methods different attributes. named entry list corresponds attribute name. unnamed entry (.e. name empty string) list specifies default combination method. .e. specifies weight new edge sum weights corresponding edges old graph; rest attributes ignored (=dropped).","code":"list(weight=\"sum\", \"ignore\")"},{"path":"https://r.igraph.org/reference/igraph-attribute-combination.html","id":"predefined-combination-functions","dir":"Reference","previous_headings":"","what":"Predefined combination functions","title":"How igraph functions handle attributes when the graph changes — igraph-attribute-combination","text":"following combination behaviors predefined: \"ignore\" attribute ignored dropped. \"sum\" sum attributes calculated. work character attributes works complex attributes sum generic defined. (E.g. works sparse matrices Matrix package, sum method.) \"prod\" product attributes calculated. work character attributes works complex attributes prod function defined. \"min\" minimum attributes calculated returned. character complex attributes standard R min function used. \"max\" maximum attributes calculated returned. character complex attributes standard R max function used. \"random\" Chooses one supplied attribute values, uniformly randomly. character complex attributes implemented calling sample. \"first\" Always chooses first attribute value. implemented calling head function. \"last\" Always chooses last attribute value. implemented calling tail function. \"mean\" mean attributes calculated returned. character complex attributes simply calls mean function. \"median\" median attributes selected. Calls R median function attribute types. \"concat\" Concatenate attributes, using c function. results almost always complex attribute.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-attribute-combination.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"How igraph functions handle attributes when the graph changes — igraph-attribute-combination","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/igraph-attribute-combination.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"How igraph functions handle attributes when the graph changes — igraph-attribute-combination","text":"","code":"g <- make_graph(c(1, 2, 1, 2, 1, 2, 2, 3, 3, 4)) E(g)$weight <- 1:5 ## print attribute values with the graph igraph_options(print.graph.attributes = TRUE) igraph_options(print.vertex.attributes = TRUE) igraph_options(print.edge.attributes = TRUE) ## new attribute is the sum of the old ones simplify(g, edge.attr.comb = \"sum\") #> IGRAPH 128f470 D-W- 4 3 -- #> + attr: weight (e/n) #> + edges from 128f470: #> [1] 1->2 2->3 3->4 ## collect attributes into a string simplify(g, edge.attr.comb = toString) #> IGRAPH ed0ca48 D-W- 4 3 -- #> + attr: weight (e/c) #> + edges from ed0ca48: #> [1] 1->2 2->3 3->4 ## concatenate them into a vector, this creates a complex ## attribute simplify(g, edge.attr.comb = \"concat\") #> IGRAPH dded0aa D-W- 4 3 -- #> + attr: weight (e/x) #> + edges from dded0aa: #> [1] 1->2 2->3 3->4 E(g)$name <- letters[seq_len(ecount(g))] ## both attributes are collected into strings simplify(g, edge.attr.comb = toString) #> IGRAPH 571272d D-W- 4 3 -- #> + attr: weight (e/c), name (e/c) #> + edges from 571272d: #> [1] 1->2 2->3 3->4 ## harmonic average of weights, names are dropped simplify(g, edge.attr.comb = list( weight = function(x) length(x) / sum(1 / x), name = \"ignore\" )) #> IGRAPH b22c28a D-W- 4 3 -- #> + attr: weight (e/n) #> + edges from b22c28a: #> [1] 1->2 2->3 3->4"},{"path":"https://r.igraph.org/reference/igraph-dollar.html","id":null,"dir":"Reference","previous_headings":"","what":"Getting and setting graph attributes, shortcut — igraph-dollar","title":"Getting and setting graph attributes, shortcut — igraph-dollar","text":"$ operator shortcut get set graph attributes. shorter just readable graph_attr() set_graph_attr().","code":""},{"path":"https://r.igraph.org/reference/igraph-dollar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Getting and setting graph attributes, shortcut — igraph-dollar","text":"","code":"# S3 method for class 'igraph' x$name # S3 method for class 'igraph' x$name <- value"},{"path":"https://r.igraph.org/reference/igraph-dollar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Getting and setting graph attributes, shortcut — igraph-dollar","text":"x igraph graph name Name attribute get/set. value New value graph attribute.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-dollar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Getting and setting graph attributes, shortcut — igraph-dollar","text":"","code":"g <- make_ring(10) g$name #> [1] \"Ring graph\" g$name <- \"10-ring\" g$name #> [1] \"10-ring\""},{"path":"https://r.igraph.org/reference/igraph-es-attributes.html","id":null,"dir":"Reference","previous_headings":"","what":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","title":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","text":"$ operator syntactic sugar query set edge attributes, edges edge sequence.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-attributes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","text":"","code":"# S3 method for class 'igraph.es' x[[i]] <- value # S3 method for class 'igraph.es' x[i] <- value # S3 method for class 'igraph.es' x$name # S3 method for class 'igraph.es' x$name <- value E(x, path = NULL, P = NULL, directed = NULL) <- value"},{"path":"https://r.igraph.org/reference/igraph-es-attributes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","text":"x edge sequence. E<- graph. Index. value New value attribute, edges edge sequence. name Name edge attribute query set. path Select edges along path, given vertex sequence See E(). P Select edges via pairs vertices. See E(). directed Whether use edge directions path P arguments.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-attributes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","text":"vector list, containing values attribute name edges sequence. numeric, character logical attributes, vector appropriate type, otherwise list.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-attributes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","text":"query form $ shortcut edge_attr(), e.g. E(g)[idx]$attr equivalent edge_attr(g, attr, E(g)[idx]). assignment form $ shortcut set_edge_attr(), e.g. E(g)[idx]$attr <- value equivalent g <- set_edge_attr(g, attr, E(g)[idx], value).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-es-attributes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","text":"","code":"# color edges of the largest component largest_comp <- function(graph) { cl <- components(graph) V(graph)[which.max(cl$csize) == cl$membership] } g <- sample_( gnp(100, 1 / 100), with_vertex_(size = 3, label = \"\"), with_graph_(layout = layout_with_fr) ) giant_v <- largest_comp(g) E(g)$color <- \"orange\" E(g)[giant_v %--% giant_v]$color <- \"blue\" plot(g)"},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":null,"dir":"Reference","previous_headings":"","what":"Indexing edge sequences — igraph-es-indexing","title":"Indexing edge sequences — igraph-es-indexing","text":"Edge sequences can indexed much like plain numeric R vector, extras.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indexing edge sequences — igraph-es-indexing","text":"","code":"# S3 method for class 'igraph.es' x[...]"},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indexing edge sequences — igraph-es-indexing","text":"x edge sequence ... Indices, see details .","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indexing edge sequences — igraph-es-indexing","text":"Another edge sequence, referring graph.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"multiple-indices","dir":"Reference","previous_headings":"","what":"Multiple indices","title":"Indexing edge sequences — igraph-es-indexing","text":"using multiple indices within bracket, evaluated independently, results concatenated using c() function. E.g. E(g)[1, 2, .inc(1)] equivalent c(E(g)[1], E(g)[2], E(g)[.inc(1)]).","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"index-types","dir":"Reference","previous_headings":"","what":"Index types","title":"Indexing edge sequences — igraph-es-indexing","text":"Edge sequences can indexed positive numeric vectors, negative numeric vectors, logical vectors, character vectors: indexed positive numeric vectors, edges given positions sequence selected. indexing regular R atomic vector positive numeric vectors. indexed negative numeric vectors, edges given positions sequence omitted. , indexing regular R atomic vector. indexed logical vector, lengths edge sequence index must match, edges index TRUE selected. Named graphs can indexed character vectors, select edges given names. Note graph may edge names vertex names, can used select edges. Edge names simply used names numeric edge id vector. Vertex names effectively work graphs without multiple edges, must separated | bar character select edges incident two given vertices. See examples .","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"edge-attributes","dir":"Reference","previous_headings":"","what":"Edge attributes","title":"Indexing edge sequences — igraph-es-indexing","text":"indexing edge sequences, edge attributes can referred simply using names. E.g. graph weight edge attribute, E(G)[weight > 1] selects edges weight larger one. See examples . Note attribute names mask names variables present calling environment; need look variable want similarly named edge attribute mask , use .env pronoun perform name lookup calling environment. words, use E(g)[.env$weight > 1] make sure weight looked calling environment even edge attribute name. Similarly, can use .data match attribute names .","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"special-functions","dir":"Reference","previous_headings":"","what":"Special functions","title":"Indexing edge sequences — igraph-es-indexing","text":"special igraph functions can used expressions indexing edge sequences: .inc takes vertex sequence, selects edges least one incident vertex vertex sequence. .similar .inc(), tails edges considered. .similar .inc(), heads edges considered. \\%--\\% special operator can used select edges two sets vertices. ignores edge directions directed graphs. \\%->\\% similar \\%--\\%, edges left hand side argument, pointing right hand side argument, selected, directed graphs. \\%<-\\% similar \\%--\\%, edges left hand side argument, pointing right hand side argument, selected, directed graphs. Note multiple special functions can used together, regular indices, results concatenated. See examples .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Indexing edge sequences — igraph-es-indexing","text":"","code":"# ----------------------------------------------------------------- # Special operators for indexing based on graph structure g <- sample_pa(100, power = 0.3) E(g)[1:3 %--% 2:6] #> + 4/99 edges from 8d46c9e: #> [1] 2->1 3->1 4->1 6->1 E(g)[1:5 %->% 1:6] #> + 4/99 edges from 8d46c9e: #> [1] 2->1 3->1 4->1 5->4 E(g)[1:3 %<-% 2:6] #> + 4/99 edges from 8d46c9e: #> [1] 2->1 3->1 4->1 6->1 # ----------------------------------------------------------------- # The edges along the diameter g <- sample_pa(100, directed = FALSE) d <- get_diameter(g) E(g, path = d) #> + 11/99 edges from 5af0089: #> [1] 53--81 49--53 43--49 4--43 2-- 4 2-- 5 5-- 9 9--14 14--36 36--58 #> [11] 58--85 # ----------------------------------------------------------------- # Select edges based on attributes g <- sample_gnp(20, 3 / 20) %>% set_edge_attr(\"weight\", value = rnorm(gsize(.))) E(g)[[weight < 0]] #> + 19/32 edges from 99e655c: #> tail head tid hid weight #> 2 1 6 1 6 -1.0667237 #> 3 5 6 5 6 -2.7731724 #> 4 5 8 5 8 -0.9282885 #> 5 7 8 7 8 -0.8125421 #> 6 6 9 6 9 -0.0905942 #> 8 5 10 5 10 -0.3038333 #> 9 1 11 1 11 -0.8376515 #> 11 10 11 10 11 -0.9128455 #> 12 11 12 11 12 -0.9000012 #> 14 2 14 2 14 -0.3595480 #> 15 5 14 5 14 -0.1509574 #> 16 10 14 10 14 -0.7023497 #> 20 6 15 6 15 -2.1631468 #> 23 5 16 5 16 -1.0824276 #> 24 14 16 14 16 -0.5381563 #> 25 6 17 6 17 -0.3664774 #> 26 7 17 7 17 -0.3298684 #> 29 9 19 9 19 -0.1398074 #> 30 10 20 10 20 -0.6184027 # Indexing with a variable whose name matches the name of an attribute # may fail; use .env to force the name lookup in the parent environment E(g)$x <- E(g)$weight x <- 2 E(g)[.env$x] #> + 1/32 edge from 99e655c: #> [1] 1--6"},{"path":"https://r.igraph.org/reference/igraph-es-indexing2.html","id":null,"dir":"Reference","previous_headings":"","what":"Select edges and show their metadata — igraph-es-indexing2","title":"Select edges and show their metadata — igraph-es-indexing2","text":"double bracket operator can used edge sequences, print meta-data (edge attributes) edges sequence.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select edges and show their metadata — igraph-es-indexing2","text":"","code":"# S3 method for class 'igraph.es' x[[...]]"},{"path":"https://r.igraph.org/reference/igraph-es-indexing2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select edges and show their metadata — igraph-es-indexing2","text":"x edge sequence. ... Additional arguments, passed [.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select edges and show their metadata — igraph-es-indexing2","text":"Another edge sequence, metadata printing turned . See details .","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Select edges and show their metadata — igraph-es-indexing2","text":"Technically, used edge sequences, double bracket operator exactly single bracket operator, resulting edge sequence printed differently: attributes edges sequence printed well. See [.igraph.es indexing edge sequences.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-es-indexing2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Select edges and show their metadata — igraph-es-indexing2","text":"","code":"g <- make_( ring(10), with_vertex_(name = LETTERS[1:10]), with_edge_(weight = 1:10, color = \"green\") ) E(g) #> + 10/10 edges from f85421c (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J E(g)[[]] #> + 10/10 edges from f85421c (vertex names): #> tail head tid hid weight color #> 1 A B 1 2 1 green #> 2 B C 2 3 2 green #> 3 C D 3 4 3 green #> 4 D E 4 5 4 green #> 5 E F 5 6 5 green #> 6 F G 6 7 6 green #> 7 G H 7 8 7 green #> 8 H I 8 9 8 green #> 9 I J 9 10 9 green #> 10 A J 1 10 10 green E(g)[[.inc(\"A\")]] #> + 2/10 edges from f85421c (vertex names): #> tail head tid hid weight color #> 1 A B 1 2 1 green #> 10 A J 1 10 10 green"},{"path":"https://r.igraph.org/reference/igraph-minus.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete vertices or edges from a graph — igraph-minus","title":"Delete vertices or edges from a graph — igraph-minus","text":"Delete vertices edges graph","code":""},{"path":"https://r.igraph.org/reference/igraph-minus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete vertices or edges from a graph — igraph-minus","text":"","code":"# S3 method for class 'igraph' e1 - e2"},{"path":"https://r.igraph.org/reference/igraph-minus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete vertices or edges from a graph — igraph-minus","text":"e1 Left argument, see details . e2 Right argument, see details .","code":""},{"path":"https://r.igraph.org/reference/igraph-minus.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete vertices or edges from a graph — igraph-minus","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/igraph-minus.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Delete vertices or edges from a graph — igraph-minus","text":"minus operator (‘-’) can used remove vertices edges graph. operation performed selected based type right hand side argument: igraph graph object, difference two graphs calculated, see difference(). numeric character vector, interpreted vector vertex ids specified vertices deleted graph. Example: e2 vertex sequence (e.g. created V() function), vertices deleted graph. edge sequence (e.g. created E() function), edges deleted graph. object created vertex() (vertices()) function, arguments vertices() concatenated result interpreted vector vertex ids. vertices removed graph. object created edge() (edges()) function, arguments edges() concatenated interpreted edges removed graph. Example: object created path() function, path() arguments concatenated interpreted path along edges removed graph. Example:","code":"g <- make_ring(10) V(g)$name <- letters[1:10] g <- g - c(\"a\", \"b\") g <- make_ring(10) V(g)$name <- letters[1:10] E(g)$name <- LETTERS[1:10] g <- g - edge(\"e|f\") g <- g - edge(\"H\") g <- make_ring(10) V(g)$name <- letters[1:10] g <- g - path(\"a\", \"b\", \"c\", \"d\")"},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-vs-attributes.html","id":null,"dir":"Reference","previous_headings":"","what":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","title":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","text":"$ operator syntactic sugar query set attributes vertices vertex sequence.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-attributes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","text":"","code":"# S3 method for class 'igraph.vs' x[[i]] <- value # S3 method for class 'igraph.vs' x[i] <- value # S3 method for class 'igraph.vs' x$name # S3 method for class 'igraph.vs' x$name <- value V(x) <- value"},{"path":"https://r.igraph.org/reference/igraph-vs-attributes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","text":"x vertex sequence. V<- graph. Index. value New value attribute, vertices vertex sequence. name Name vertex attribute query set.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-attributes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","text":"vector list, containing values attribute name vertices vertex sequence. numeric, character logical attributes, vector appropriate type, otherwise list.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-attributes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","text":"query form $ shortcut vertex_attr(), e.g. V(g)[idx]$attr equivalent vertex_attr(g, attr, V(g)[idx]). assignment form $ shortcut set_vertex_attr(), e.g. V(g)[idx]$attr <- value equivalent g <- set_vertex_attr(g, attr, V(g)[idx], value).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-vs-attributes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","text":"","code":"g <- make_( ring(10), with_vertex_( name = LETTERS[1:10], color = sample(1:2, 10, replace = TRUE) ) ) V(g)$name #> [1] \"A\" \"B\" \"C\" \"D\" \"E\" \"F\" \"G\" \"H\" \"I\" \"J\" V(g)$color #> [1] 2 2 1 1 1 1 2 1 1 2 V(g)$frame.color <- V(g)$color # color vertices of the largest component largest_comp <- function(graph) { cl <- components(graph) V(graph)[which.max(cl$csize) == cl$membership] } g <- sample_( gnp(100, 2 / 100), with_vertex_(size = 3, label = \"\"), with_graph_(layout = layout_with_fr) ) giant_v <- largest_comp(g) V(g)$color <- \"blue\" V(g)[giant_v]$color <- \"orange\" plot(g)"},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":null,"dir":"Reference","previous_headings":"","what":"Indexing vertex sequences — igraph-vs-indexing","title":"Indexing vertex sequences — igraph-vs-indexing","text":"Vertex sequences can indexed much like plain numeric R vector, extras.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indexing vertex sequences — igraph-vs-indexing","text":"","code":"# S3 method for class 'igraph.vs' x[..., na_ok = FALSE]"},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indexing vertex sequences — igraph-vs-indexing","text":"x vertex sequence. ... Indices, see details . na_ok Whether OK NAs vertex sequence.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indexing vertex sequences — igraph-vs-indexing","text":"Another vertex sequence, referring graph.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Indexing vertex sequences — igraph-vs-indexing","text":"Vertex sequences can indexed using single bracket double bracket operators, work way. difference double bracket operator marks result printing vertex attributes.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"multiple-indices","dir":"Reference","previous_headings":"","what":"Multiple indices","title":"Indexing vertex sequences — igraph-vs-indexing","text":"using multiple indices within bracket, evaluated independently, results concatenated using c() function (except na_ok argument, special must named. E.g. V(g)[1, 2, .nei(1)] equivalent c(V(g)[1], V(g)[2], V(g)[.nei(1)]).","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"index-types","dir":"Reference","previous_headings":"","what":"Index types","title":"Indexing vertex sequences — igraph-vs-indexing","text":"Vertex sequences can indexed positive numeric vectors, negative numeric vectors, logical vectors, character vectors: indexed positive numeric vectors, vertices given positions sequence selected. indexing regular R atomic vector positive numeric vectors. indexed negative numeric vectors, vertices given positions sequence omitted. , indexing regular R atomic vector. indexed logical vector, lengths vertex sequence index must match, vertices index TRUE selected. Named graphs can indexed character vectors, select vertices given names.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"vertex-attributes","dir":"Reference","previous_headings":"","what":"Vertex attributes","title":"Indexing vertex sequences — igraph-vs-indexing","text":"indexing vertex sequences, vertex attributes can referred simply using names. E.g. graph name vertex attribute, V(g)[name == \"foo\"] equivalent V(g)[V(g)$name == \"foo\"]. See examples . Note attribute names mask names variables present calling environment; need look variable want similarly named vertex attribute mask , use .env pronoun perform name lookup calling environment. words, use V(g)[.env$name == \"foo\"] make sure name looked calling environment even vertex attribute name. Similarly, can use .data match attribute names .","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"special-functions","dir":"Reference","previous_headings":"","what":"Special functions","title":"Indexing vertex sequences — igraph-vs-indexing","text":"special igraph functions can used expressions indexing vertex sequences: .nei takes vertex sequence argument selects neighbors vertices. optional mode argument can used select successors (mode=\"\"), predecessors (mode=\"\") directed graphs. .inc Takes edge sequence argument, selects vertices least one incident edge edge sequence. .Similar .inc, considers tails edges. .Similar .inc, considers heads edges. .innei, .outnei .innei(v) shorthand .nei(v, mode = \"\"), .outnei(v) shorthand .nei(v, mode = \"\"). Note multiple special functions can used together, regular indices, results concatenated. See examples .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Indexing vertex sequences — igraph-vs-indexing","text":"","code":"# ----------------------------------------------------------------- # Setting attributes for subsets of vertices largest_comp <- function(graph) { cl <- components(graph) V(graph)[which.max(cl$csize) == cl$membership] } g <- sample_( gnp(100, 2 / 100), with_vertex_(size = 3, label = \"\"), with_graph_(layout = layout_with_fr) ) giant_v <- largest_comp(g) V(g)$color <- \"green\" V(g)[giant_v]$color <- \"red\" plot(g) # ----------------------------------------------------------------- # nei() special function g <- make_graph(c(1, 2, 2, 3, 2, 4, 4, 2)) V(g)[.nei(c(2, 4))] #> + 4/4 vertices, from e32a459: #> [1] 1 2 3 4 V(g)[.nei(c(2, 4), \"in\")] #> + 3/4 vertices, from e32a459: #> [1] 1 2 4 V(g)[.nei(c(2, 4), \"out\")] #> + 3/4 vertices, from e32a459: #> [1] 2 3 4 # ----------------------------------------------------------------- # The same with vertex names g <- make_graph(~ A -+ B, B -+ C:D, D -+ B) V(g)[.nei(c(\"B\", \"D\"))] #> + 4/4 vertices, named, from e332f2b: #> [1] A B C D V(g)[.nei(c(\"B\", \"D\"), \"in\")] #> + 3/4 vertices, named, from e332f2b: #> [1] A B D V(g)[.nei(c(\"B\", \"D\"), \"out\")] #> + 3/4 vertices, named, from e332f2b: #> [1] B C D # ----------------------------------------------------------------- # Resolving attributes g <- make_graph(~ A -+ B, B -+ C:D, D -+ B) V(g)$color <- c(\"red\", \"red\", \"green\", \"green\") V(g)[color == \"red\"] #> + 2/4 vertices, named, from 02b93e4: #> [1] A B # Indexing with a variable whose name matches the name of an attribute # may fail; use .env to force the name lookup in the parent environment V(g)$x <- 10:13 x <- 2 V(g)[.env$x] #> + 1/4 vertex, named, from 02b93e4: #> [1] B"},{"path":"https://r.igraph.org/reference/igraph-vs-indexing2.html","id":null,"dir":"Reference","previous_headings":"","what":"Select vertices and show their metadata — igraph-vs-indexing2","title":"Select vertices and show their metadata — igraph-vs-indexing2","text":"double bracket operator can used vertex sequences, print meta-data (vertex attributes) vertices sequence.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select vertices and show their metadata — igraph-vs-indexing2","text":"","code":"# S3 method for class 'igraph.vs' x[[...]]"},{"path":"https://r.igraph.org/reference/igraph-vs-indexing2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select vertices and show their metadata — igraph-vs-indexing2","text":"x vertex sequence. ... Additional arguments, passed [.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select vertices and show their metadata — igraph-vs-indexing2","text":"double bracket operator returns another vertex sequence, meta-data (attribute) printing turned . See details .","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Select vertices and show their metadata — igraph-vs-indexing2","text":"Technically, used vertex sequences, double bracket operator exactly single bracket operator, resulting vertex sequence printed differently: attributes vertices sequence printed well. See [.igraph.vs indexing vertex sequences.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-vs-indexing2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Select vertices and show their metadata — igraph-vs-indexing2","text":"","code":"g <- make_ring(10) %>% set_vertex_attr(\"color\", value = \"red\") %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) V(g) #> + 10/10 vertices, named, from d823313: #> [1] A B C D E F G H I J V(g)[[]] #> + 10/10 vertices, named, from d823313: #> color name #> 1 red A #> 2 red B #> 3 red C #> 4 red D #> 5 red E #> 6 red F #> 7 red G #> 8 red H #> 9 red I #> 10 red J V(g)[1:5] #> + 5/10 vertices, named, from d823313: #> [1] A B C D E V(g)[[1:5]] #> + 5/10 vertices, named, from d823313: #> color name #> 1 red A #> 2 red B #> 3 red C #> 4 red D #> 5 red E"},{"path":"https://r.igraph.org/reference/igraph.console.html","id":null,"dir":"Reference","previous_headings":"","what":"The igraph console — igraph.console","title":"The igraph console — igraph.console","text":"igraph.console() renamed console() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.console.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The igraph console — igraph.console","text":"","code":"igraph.console()"},{"path":"https://r.igraph.org/reference/igraph.from.graphNEL.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert graphNEL objects from the graph package to igraph — igraph.from.graphNEL","title":"Convert graphNEL objects from the graph package to igraph — igraph.from.graphNEL","text":"igraph..graphNEL() renamed graph_from_graphnel() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.from.graphNEL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert graphNEL objects from the graph package to igraph — igraph.from.graphNEL","text":"","code":"igraph.from.graphNEL(graphNEL, name = TRUE, weight = TRUE, unlist.attrs = TRUE)"},{"path":"https://r.igraph.org/reference/igraph.from.graphNEL.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert graphNEL objects from the graph package to igraph — igraph.from.graphNEL","text":"graphNEL graphNEL graph. name Logical scalar, whether add graphNEL vertex names igraph vertex attribute called ‘name’. weight Logical scalar, whether add graphNEL edge weights igraph edge attribute called ‘weight’. (graphNEL graphs always weighted.) unlist.attrs Logical scalar. graphNEL attribute query functions return values attributes R lists, argument TRUE (default) converted atomic vectors, whenever possible, adding igraph graph.","code":""},{"path":"https://r.igraph.org/reference/igraph.options.html","id":null,"dir":"Reference","previous_headings":"","what":"Parameters for the igraph package — igraph.options","title":"Parameters for the igraph package — igraph.options","text":"igraph.options() renamed igraph_options() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parameters for the igraph package — igraph.options","text":"","code":"igraph.options(...)"},{"path":"https://r.igraph.org/reference/igraph.options.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parameters for the igraph package — igraph.options","text":"... list may given argument, number arguments may name=value form, argument may given. See Value Details sections explanation.","code":""},{"path":"https://r.igraph.org/reference/igraph.sample.html","id":null,"dir":"Reference","previous_headings":"","what":"Sampling a random integer sequence — igraph.sample","title":"Sampling a random integer sequence — igraph.sample","text":"igraph.sample() renamed sample_seq() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.sample.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sampling a random integer sequence — igraph.sample","text":"","code":"igraph.sample(low, high, length)"},{"path":"https://r.igraph.org/reference/igraph.sample.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sampling a random integer sequence — igraph.sample","text":"low lower limit interval (inclusive). high higher limit interval (inclusive). length length sample.","code":""},{"path":"https://r.igraph.org/reference/igraph.shape.noclip.html","id":null,"dir":"Reference","previous_headings":"","what":"Various vertex shapes when plotting igraph graphs — igraph.shape.noclip","title":"Various vertex shapes when plotting igraph graphs — igraph.shape.noclip","text":"igraph.shape.noclip() renamed shape_noclip() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.shape.noclip.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Various vertex shapes when plotting igraph graphs — igraph.shape.noclip","text":"","code":"igraph.shape.noclip(coords, el, params, end = c(\"both\", \"from\", \"to\"))"},{"path":"https://r.igraph.org/reference/igraph.shape.noplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Various vertex shapes when plotting igraph graphs — igraph.shape.noplot","title":"Various vertex shapes when plotting igraph graphs — igraph.shape.noplot","text":"igraph.shape.noplot() renamed shape_noplot() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.shape.noplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Various vertex shapes when plotting igraph graphs — igraph.shape.noplot","text":"","code":"igraph.shape.noplot(coords, v = NULL, params)"},{"path":"https://r.igraph.org/reference/igraph.to.graphNEL.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert igraph graphs to graphNEL objects from the graph package — igraph.to.graphNEL","title":"Convert igraph graphs to graphNEL objects from the graph package — igraph.to.graphNEL","text":"igraph..graphNEL() renamed as_graphnel() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.to.graphNEL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert igraph graphs to graphNEL objects from the graph package — igraph.to.graphNEL","text":"","code":"igraph.to.graphNEL(graph)"},{"path":"https://r.igraph.org/reference/igraph.to.graphNEL.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert igraph graphs to graphNEL objects from the graph package — igraph.to.graphNEL","text":"graph igraph graph object.","code":""},{"path":"https://r.igraph.org/reference/igraph.version.html","id":null,"dir":"Reference","previous_headings":"","what":"Query igraph's version string — igraph.version","title":"Query igraph's version string — igraph.version","text":"igraph.version() renamed igraph_version() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query igraph's version string — igraph.version","text":"","code":"igraph.version()"},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":null,"dir":"Reference","previous_headings":"","what":"Run igraph demos, step by step — igraph_demo","title":"Run igraph demos, step by step — igraph_demo","text":"Run one accompanying igraph demos, somewhat interactively, using Tk window.","code":""},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run igraph demos, step by step — igraph_demo","text":"","code":"igraph_demo(which)"},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run igraph demos, step by step — igraph_demo","text":"given, names available demos listed. Otherwise either filename name igraph demo.","code":""},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run igraph demos, step by step — igraph_demo","text":"Returns NULL, invisibly.","code":""},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run igraph demos, step by step — igraph_demo","text":"function provides somewhat nicer interface igraph demos come package, standard demo() function. igraph demos divided chunks igraph_demo() runs chunk chunk, possibility inspecting workspace two chunks. tcltk package needed igraph_demo().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Run igraph demos, step by step — igraph_demo","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run igraph demos, step by step — igraph_demo","text":"","code":"igraph_demo() #> [1] \"centrality\" \"cohesive\" \"community\" \"crashR\" \"hrg\" #> [6] \"smallworld\" if (interactive() && requireNamespace(\"tcltk\", quietly = TRUE)) { igraph_demo(\"centrality\") }"},{"path":"https://r.igraph.org/reference/igraph_options.html","id":null,"dir":"Reference","previous_headings":"","what":"Parameters for the igraph package — igraph_options","title":"Parameters for the igraph package — igraph_options","text":"igraph parameters (usually) affect behavior many functions. can set whole session via igraph_options().","code":""},{"path":"https://r.igraph.org/reference/igraph_options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parameters for the igraph package — igraph_options","text":"","code":"igraph_options(...) igraph_opt(x, default = NULL)"},{"path":"https://r.igraph.org/reference/igraph_options.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parameters for the igraph package — igraph_options","text":"... list may given argument, number arguments may name=value form, argument may given. See Value Details sections explanation. x character string holding option name. default specified option set options list, value returned. facilitates retrieving option checking whether set setting separately .","code":""},{"path":"https://r.igraph.org/reference/igraph_options.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parameters for the igraph package — igraph_options","text":"igraph_options() returns list old values updated parameters, invisibly. Without arguments, returns values options. igraph_opt(), current value set option x, NULL option unset.","code":""},{"path":"https://r.igraph.org/reference/igraph_options.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Parameters for the igraph package — igraph_options","text":"parameter values set via call igraph_options() function remain effect rest session, affecting subsequent behaviour functions igraph package given parameters relevant. offers possibility customizing functioning igraph package, instance insertions appropriate calls igraph_options() load hook package igraph. currently used parameters alphabetical order: add.params Logical scalar, whether add model parameter graphs created various graph constructors. default TRUE. add.vertex.names Logical scalar, whether add vertex names node level indices, like degree, betweenness scores, etc. default TRUE. annotate.plot Logical scalar, whether annotate igraph plots graph's name (name graph attribute, present) main, number vertices edges xlab. Defaults FALSE. dend.plot.type plotting function use plotting community structure dendrograms via plot_dendrogram() edge.attr.comb Specifies edge attributes graph modified. default value list(weight=\"sum\", name=\"concat\", \"ignore\"). See attribute.combination() details . print.edge.attributes Logical constant, whether print edge attributes printing graphs. Defaults FALSE. print.full Logical scalar, whether print.igraph() show graph structure well, summary graph. print.graph.attributes Logical constant, whether print graph attributes printing graphs. Defaults FALSE. print.vertex.attributes Logical constant, whether print vertex attributes printing graphs. Defaults FALSE. return.vs.es Whether functions return set sequence vertices/edges return formal vertex/edge sequence objects. option introduced igraph version 1.0.0 defaults TRUE. package requires old behavior, can set FALSE .onLoad function package, without affecting packages. sparsematrices Whether use Matrix package (sparse) matrices. recommended, user works larger graphs. verbose Logical constant, whether igraph functions talk minimal. E.g. TRUE functions use progress bars computing. Defaults FALSE. vertex.attr.comb Specifies vertex attributes graph modified. default value list(name=\"concat\", \"ignore\") See attribute.combination() details .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph_options.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Parameters for the igraph package — igraph_options","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/igraph_options.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Parameters for the igraph package — igraph_options","text":"","code":"oldval <- igraph_opt(\"verbose\") igraph_options(verbose = TRUE) layout_with_kk(make_ring(10)) #> Make graph external pointer. #> Materializing 'from' vector. #> Materializing 'to' vector. #> [,1] [,2] #> [1,] 1.1483519 -0.003216317 #> [2,] 0.9291475 0.676715503 #> [3,] 0.3521535 1.097946790 #> [4,] -0.3622379 1.099581508 #> [5,] -0.9411536 0.680995251 #> [6,] -1.1634674 0.002073742 #> [7,] -0.9442631 -0.677858079 #> [8,] -0.3672691 -1.099089365 #> [9,] 0.3471224 -1.100724083 #> [10,] 0.9260381 -0.682137826 igraph_options(verbose = oldval) oldval <- igraph_options(verbose = TRUE, sparsematrices = FALSE) make_ring(10)[] #> Make graph external pointer. #> Materializing 'from' vector. #> Materializing 'to' vector. #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> [1,] 0 1 0 0 0 0 0 0 0 1 #> [2,] 1 0 1 0 0 0 0 0 0 0 #> [3,] 0 1 0 1 0 0 0 0 0 0 #> [4,] 0 0 1 0 1 0 0 0 0 0 #> [5,] 0 0 0 1 0 1 0 0 0 0 #> [6,] 0 0 0 0 1 0 1 0 0 0 #> [7,] 0 0 0 0 0 1 0 1 0 0 #> [8,] 0 0 0 0 0 0 1 0 1 0 #> [9,] 0 0 0 0 0 0 0 1 0 1 #> [10,] 1 0 0 0 0 0 0 0 1 0 igraph_options(oldval) igraph_opt(\"verbose\") #> [1] FALSE"},{"path":"https://r.igraph.org/reference/igraph_version.html","id":null,"dir":"Reference","previous_headings":"","what":"Query igraph's version string — igraph_version","title":"Query igraph's version string — igraph_version","text":"Returns package version.","code":""},{"path":"https://r.igraph.org/reference/igraph_version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query igraph's version string — igraph_version","text":"","code":"igraph_version()"},{"path":"https://r.igraph.org/reference/igraph_version.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query igraph's version string — igraph_version","text":"character scalar, igraph version string.","code":""},{"path":"https://r.igraph.org/reference/igraph_version.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Query igraph's version string — igraph_version","text":"igraph version string always version R package.","code":""},{"path":"https://r.igraph.org/reference/igraph_version.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Query igraph's version string — igraph_version","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/igraph_version.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query igraph's version string — igraph_version","text":"","code":"## Compare to the package version packageDescription(\"igraph\")$Version #> [1] \"2.1.1\" igraph_version() #> [1] \"2.1.1\""},{"path":"https://r.igraph.org/reference/igraphdemo.html","id":null,"dir":"Reference","previous_headings":"","what":"Run igraph demos, step by step — igraphdemo","title":"Run igraph demos, step by step — igraphdemo","text":"igraphdemo() renamed igraph_demo() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraphdemo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run igraph demos, step by step — igraphdemo","text":"","code":"igraphdemo(which)"},{"path":"https://r.igraph.org/reference/igraphdemo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run igraph demos, step by step — igraphdemo","text":"given, names available demos listed. Otherwise either filename name igraph demo.","code":""},{"path":"https://r.igraph.org/reference/incident.html","id":null,"dir":"Reference","previous_headings":"","what":"Incident edges of a vertex in a graph — incident","title":"Incident edges of a vertex in a graph — incident","text":"Incident edges vertex graph","code":""},{"path":"https://r.igraph.org/reference/incident.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Incident edges of a vertex in a graph — incident","text":"","code":"incident(graph, v, mode = c(\"all\", \"out\", \"in\", \"total\"))"},{"path":"https://r.igraph.org/reference/incident.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Incident edges of a vertex in a graph — incident","text":"graph input graph. v vertex incident edges queried. mode Whether query outgoing (‘’), incoming (‘’) edges, types (‘’). ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/incident.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Incident edges of a vertex in a graph — incident","text":"edge sequence containing incident edges input vertex.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/incident.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Incident edges of a vertex in a graph — incident","text":"","code":"g <- make_graph(\"Zachary\") incident(g, 1) #> + 16/78 edges from 7bca401: #> [1] 1-- 2 1-- 3 1-- 4 1-- 5 1-- 6 1-- 7 1-- 8 1-- 9 1--11 1--12 1--13 1--14 #> [13] 1--18 1--20 1--22 1--32 incident(g, 34) #> + 17/78 edges from 7bca401: #> [1] 9--34 10--34 14--34 15--34 16--34 19--34 20--34 21--34 23--34 24--34 #> [11] 27--34 28--34 29--34 30--34 31--34 32--34 33--34"},{"path":"https://r.igraph.org/reference/incident_edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Incident edges of multiple vertices in a graph — incident_edges","title":"Incident edges of multiple vertices in a graph — incident_edges","text":"function similar incident(), queries multiple vertices .","code":""},{"path":"https://r.igraph.org/reference/incident_edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Incident edges of multiple vertices in a graph — incident_edges","text":"","code":"incident_edges(graph, v, mode = c(\"out\", \"in\", \"all\", \"total\"))"},{"path":"https://r.igraph.org/reference/incident_edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Incident edges of multiple vertices in a graph — incident_edges","text":"graph Input graph. v vertices query mode Whether query outgoing (‘’), incoming (‘’) edges, types (‘’). ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/incident_edges.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Incident edges of multiple vertices in a graph — incident_edges","text":"list edge sequences.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/incident_edges.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Incident edges of multiple vertices in a graph — incident_edges","text":"","code":"g <- make_graph(\"Zachary\") incident_edges(g, c(1, 34)) #> [[1]] #> + 16/78 edges from 4c8a521: #> [1] 1-- 2 1-- 3 1-- 4 1-- 5 1-- 6 1-- 7 1-- 8 1-- 9 1--11 1--12 1--13 1--14 #> [13] 1--18 1--20 1--22 1--32 #> #> [[2]] #> + 17/78 edges from 4c8a521: #> [1] 9--34 10--34 14--34 15--34 16--34 19--34 20--34 21--34 23--34 24--34 #> [11] 27--34 28--34 29--34 30--34 31--34 32--34 33--34 #>"},{"path":"https://r.igraph.org/reference/indent_print.html","id":null,"dir":"Reference","previous_headings":"","what":"Indent a printout — indent_print","title":"Indent a printout — indent_print","text":"Indent printout","code":""},{"path":"https://r.igraph.org/reference/indent_print.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indent a printout — indent_print","text":"","code":"indent_print(..., .indent = \" \", .printer = print)"},{"path":"https://r.igraph.org/reference/indent_print.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indent a printout — indent_print","text":"... Passed printing function. .indent Character scalar, indent printout . .printer printing function, defaults print.","code":""},{"path":"https://r.igraph.org/reference/indent_print.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indent a printout — indent_print","text":"first element ..., invisibly.","code":""},{"path":"https://r.igraph.org/reference/independence.number.html","id":null,"dir":"Reference","previous_headings":"","what":"Independent vertex sets — independence.number","title":"Independent vertex sets — independence.number","text":"independence.number() renamed ivs_size() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/independence.number.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Independent vertex sets — independence.number","text":"","code":"independence.number(graph)"},{"path":"https://r.igraph.org/reference/independence.number.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Independent vertex sets — independence.number","text":"graph input graph, directed graphs considered undirected, loop edges multiple edges ignored.","code":""},{"path":"https://r.igraph.org/reference/independent.vertex.sets.html","id":null,"dir":"Reference","previous_headings":"","what":"Independent vertex sets — independent.vertex.sets","title":"Independent vertex sets — independent.vertex.sets","text":"independent.vertex.sets() renamed ivs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/independent.vertex.sets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Independent vertex sets — independent.vertex.sets","text":"","code":"independent.vertex.sets(graph, min = NULL, max = NULL)"},{"path":"https://r.igraph.org/reference/independent.vertex.sets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Independent vertex sets — independent.vertex.sets","text":"graph input graph, directed graphs considered undirected, loop edges multiple edges ignored. min Numeric constant, limit minimum size independent vertex sets find. NULL means limit. max Numeric constant, limit maximum size independent vertex sets find. NULL means limit.","code":""},{"path":"https://r.igraph.org/reference/induced.subgraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Subgraph of a graph — induced.subgraph","title":"Subgraph of a graph — induced.subgraph","text":"induced.subgraph() renamed induced_subgraph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/induced.subgraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subgraph of a graph — induced.subgraph","text":"","code":"induced.subgraph( graph, vids, impl = c(\"auto\", \"copy_and_delete\", \"create_from_scratch\") )"},{"path":"https://r.igraph.org/reference/induced.subgraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subgraph of a graph — induced.subgraph","text":"graph original graph. vids Numeric vector, vertices original graph form subgraph. impl Character scalar, choose two implementation subgraph calculation. ‘copy_and_delete’ copies graph first, deletes vertices edges included result graph. ‘create_from_scratch’ searches vertices edges must kept uses create graph scratch. ‘auto’ chooses two implementations automatically, using heuristics based size original result graph.","code":""},{"path":"https://r.igraph.org/reference/infomap.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Infomap community finding — infomap.community","title":"Infomap community finding — infomap.community","text":"infomap.community() renamed cluster_infomap() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/infomap.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Infomap community finding — infomap.community","text":"","code":"infomap.community( graph, e.weights = NULL, v.weights = NULL, nb.trials = 10, modularity = TRUE )"},{"path":"https://r.igraph.org/reference/infomap.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Infomap community finding — infomap.community","text":"graph input graph. Edge directions taken account. e.weights NULL, numeric vector edge weights. length must match number edges graph. default ‘weight’ edge attribute used weights. present, edges considered weight. Larger edge weights correspond stronger connections. v.weights NULL, numeric vector vertex weights. length must match number vertices graph. default ‘weight’ vertex attribute used weights. present, vertices considered weight. larger vertex weight means larger probability random surfer jumps vertex. nb.trials number attempts partition network (can integer value equal larger 1). modularity Logical scalar, whether calculate modularity score detected community structure.","code":""},{"path":"https://r.igraph.org/reference/inside-square-error.html","id":null,"dir":"Reference","previous_headings":"","what":"Helpers within vertex/index sequences — .nei","title":"Helpers within vertex/index sequences — .nei","text":"Functions used [.igraph.es [.igraph.vs","code":""},{"path":"https://r.igraph.org/reference/inside-square-error.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helpers within vertex/index sequences — .nei","text":"","code":".nei(...) .innei(...) .outnei(...) .inc(...) .from(...) .to(...)"},{"path":"https://r.igraph.org/reference/inside-square-error.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helpers within vertex/index sequences — .nei","text":"... used, compatibility.","code":""},{"path":"https://r.igraph.org/reference/inside-square-error.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helpers within vertex/index sequences — .nei","text":"error","code":""},{"path":"https://r.igraph.org/reference/inside-square-error.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Helpers within vertex/index sequences — .nei","text":"See [.igraph.vs [.igraph.es.","code":""},{"path":"https://r.igraph.org/reference/interconnected.islands.game.html","id":null,"dir":"Reference","previous_headings":"","what":"A graph with subgraphs that are each a random graph. — interconnected.islands.game","title":"A graph with subgraphs that are each a random graph. — interconnected.islands.game","text":"interconnected.islands.game() renamed sample_islands() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/interconnected.islands.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A graph with subgraphs that are each a random graph. — interconnected.islands.game","text":"","code":"interconnected.islands.game(islands.n, islands.size, islands.pin, n.inter)"},{"path":"https://r.igraph.org/reference/interconnected.islands.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A graph with subgraphs that are each a random graph. — interconnected.islands.game","text":"islands.n number islands graph. islands.size size islands graph. islands.pin probability create possible edge island. n.inter number edges create two islands.","code":""},{"path":"https://r.igraph.org/reference/intersection.html","id":null,"dir":"Reference","previous_headings":"","what":"Intersection of two or more sets — intersection","title":"Intersection of two or more sets — intersection","text":"S3 generic function. See methods(\"intersection\") actual implementations various S3 classes. Initially implemented igraph graphs igraph vertex edge sequences. See intersection.igraph(), intersection.igraph.vs().","code":""},{"path":"https://r.igraph.org/reference/intersection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Intersection of two or more sets — intersection","text":"","code":"intersection(...)"},{"path":"https://r.igraph.org/reference/intersection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Intersection of two or more sets — intersection","text":"... Arguments, number interpretation depends function implements intersection().","code":""},{"path":"https://r.igraph.org/reference/intersection.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Intersection of two or more sets — intersection","text":"Depends function implements method.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/intersection.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Intersection of edge sequences — intersection.igraph.es","title":"Intersection of edge sequences — intersection.igraph.es","text":"Intersection edge sequences","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Intersection of edge sequences — intersection.igraph.es","text":"","code":"# S3 method for class 'igraph.es' intersection(...)"},{"path":"https://r.igraph.org/reference/intersection.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Intersection of edge sequences — intersection.igraph.es","text":"... edge sequences take intersection .","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Intersection of edge sequences — intersection.igraph.es","text":"edge sequence contains edges appear given sequences, edge exactly .","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.es.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Intersection of edge sequences — intersection.igraph.es","text":"must belong graph. Note function ‘set’ semantics multiplicity edges lost result.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/intersection.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Intersection of edge sequences — intersection.igraph.es","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) intersection(E(g)[1:6], E(g)[5:9]) #> + 2/10 edges from 4698b30 (vertex names): #> [1] E--F F--G"},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Intersection of graphs — intersection.igraph","title":"Intersection of graphs — intersection.igraph","text":"intersection two graphs created. graphs may identical overlapping vertex sets.","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Intersection of graphs — intersection.igraph","text":"","code":"# S3 method for class 'igraph' intersection(..., byname = \"auto\", keep.all.vertices = TRUE)"},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Intersection of graphs — intersection.igraph","text":"... Graph objects lists graph objects. byname logical scalar, character scalar auto. Whether perform operation based symbolic vertex names. auto, means TRUE graphs named FALSE otherwise. warning generated auto () graphs named. keep..vertices Logical scalar, whether keep vertices appear subset input graphs.","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Intersection of graphs — intersection.igraph","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Intersection of graphs — intersection.igraph","text":"intersection() creates intersection two graphs: edges present graphs included. corresponding operator %s%. byname argument TRUE (auto graphs named), operation performed symbolic vertex names instead internal numeric vertex ids. intersection() keeps attributes graphs. graph, vertex edge attributes copied result. attribute present multiple graphs result name clash, attribute renamed adding suffixes: _1, _2, etc. name vertex attribute treated specially operation performed based symbolic vertex names. case name must present graphs, renamed result graph. error generated input graphs directed others undirected.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Intersection of graphs — intersection.igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Intersection of graphs — intersection.igraph","text":"","code":"## Common part of two social networks net1 <- graph_from_literal( D - A:B:F:G, A - C - F - A, B - E - G - B, A - B, F - G, H - F:G, H - I - J ) net2 <- graph_from_literal(D - A:F:Y, B - A - X - F - H - Z, F - Y) print_all(net1 %s% net2) #> IGRAPH f95472c UN-- 13 4 -- #> + attr: name (v/c) #> + vertex attributes: #> | name #> | [1] D #> | [2] A #> | [3] B #> | [4] F #> | [5] G #> | [6] C #> | [7] E #> | [8] H #> | [9] I #> | [10] J #> | [11] Y #> | [12] X #> | [13] Z #> + edges from f95472c (vertex names): #> [1] F--H A--B D--F D--A"},{"path":"https://r.igraph.org/reference/intersection.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Intersection of vertex sequences — intersection.igraph.vs","title":"Intersection of vertex sequences — intersection.igraph.vs","text":"Intersection vertex sequences","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Intersection of vertex sequences — intersection.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' intersection(...)"},{"path":"https://r.igraph.org/reference/intersection.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Intersection of vertex sequences — intersection.igraph.vs","text":"... vertex sequences take intersection .","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Intersection of vertex sequences — intersection.igraph.vs","text":"vertex sequence contains vertices appear given sequences, vertex exactly .","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.vs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Intersection of vertex sequences — intersection.igraph.vs","text":"must belong graph. Note function ‘set’ semantics multiplicity vertices lost result.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/intersection.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Intersection of vertex sequences — intersection.igraph.vs","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) intersection(E(g)[1:6], E(g)[5:9]) #> + 2/10 edges from 2a93073 (vertex names): #> [1] E--F F--G"},{"path":"https://r.igraph.org/reference/is.bipartite.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether the graph has a vertex attribute called type — is.bipartite","title":"Checks whether the graph has a vertex attribute called type — is.bipartite","text":".bipartite() renamed is_bipartite() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.bipartite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether the graph has a vertex attribute called type — is.bipartite","text":"","code":"is.bipartite(graph)"},{"path":"https://r.igraph.org/reference/is.bipartite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether the graph has a vertex attribute called type — is.bipartite","text":"graph input graph","code":""},{"path":"https://r.igraph.org/reference/is.chordal.html","id":null,"dir":"Reference","previous_headings":"","what":"Chordality of a graph — is.chordal","title":"Chordality of a graph — is.chordal","text":".chordal() renamed is_chordal() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.chordal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Chordality of a graph — is.chordal","text":"","code":"is.chordal( graph, alpha = NULL, alpham1 = NULL, fillin = FALSE, newgraph = FALSE )"},{"path":"https://r.igraph.org/reference/is.chordal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Chordality of a graph — is.chordal","text":"graph input graph. may directed, edge directions ignored, algorithm defined undirected graphs. alpha Numeric vector, maximal chardinality ordering vertices. NULL, automatically calculated calling max_cardinality(), alpham1 given.. alpham1 Numeric vector, inverse alpha. NULL, automatically calculated calling max_cardinality(), alpha. fillin Logical scalar, whether calculate fill-edges. newgraph Logical scalar, whether calculate triangulated graph.","code":""},{"path":"https://r.igraph.org/reference/is.connected.html","id":null,"dir":"Reference","previous_headings":"","what":"Connected components of a graph — is.connected","title":"Connected components of a graph — is.connected","text":".connected() renamed is_connected() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.connected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connected components of a graph — is.connected","text":"","code":"is.connected(graph, mode = c(\"weak\", \"strong\"))"},{"path":"https://r.igraph.org/reference/is.connected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connected components of a graph — is.connected","text":"graph graph analyze. mode Character string, either “weak” “strong”. directed graphs “weak” implies weakly, “strong” strongly connected components search. ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/is.dag.html","id":null,"dir":"Reference","previous_headings":"","what":"Directed acyclic graphs — is.dag","title":"Directed acyclic graphs — is.dag","text":".dag() renamed is_dag() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.dag.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Directed acyclic graphs — is.dag","text":"","code":"is.dag(graph)"},{"path":"https://r.igraph.org/reference/is.dag.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Directed acyclic graphs — is.dag","text":"graph input graph. may undirected, case FALSE reported.","code":""},{"path":"https://r.igraph.org/reference/is.degree.sequence.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a degree sequence is valid for a multi-graph — is.degree.sequence","title":"Check if a degree sequence is valid for a multi-graph — is.degree.sequence","text":".degree.sequence() renamed is_degseq() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.degree.sequence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a degree sequence is valid for a multi-graph — is.degree.sequence","text":"","code":"is.degree.sequence(out.deg, in.deg = NULL)"},{"path":"https://r.igraph.org/reference/is.degree.sequence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a degree sequence is valid for a multi-graph — is.degree.sequence","text":".deg Integer vector, degree sequence undirected graphs, -degree sequence directed graphs. .deg NULL integer vector. undirected graphs, NULL. directed graphs specifies -degrees.","code":""},{"path":"https://r.igraph.org/reference/is.directed.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether a graph is directed — is.directed","title":"Check whether a graph is directed — is.directed","text":".directed() renamed is_directed() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.directed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether a graph is directed — is.directed","text":"","code":"is.directed(graph)"},{"path":"https://r.igraph.org/reference/is.directed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether a graph is directed — is.directed","text":"graph input graph","code":""},{"path":"https://r.igraph.org/reference/is.graphical.degree.sequence.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a degree sequence graphical? — is.graphical.degree.sequence","title":"Is a degree sequence graphical? — is.graphical.degree.sequence","text":".graphical.degree.sequence() renamed is_graphical() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.graphical.degree.sequence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a degree sequence graphical? — is.graphical.degree.sequence","text":"","code":"is.graphical.degree.sequence( out.deg, in.deg = NULL, allowed.edge.types = c(\"simple\", \"loops\", \"multi\", \"all\") )"},{"path":"https://r.igraph.org/reference/is.graphical.degree.sequence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a degree sequence graphical? — is.graphical.degree.sequence","text":".deg Integer vector, degree sequence undirected graphs, -degree sequence directed graphs. .deg NULL integer vector. undirected graphs, NULL. directed graphs specifies -degrees. allowed.edge.types allowed edge types graph. ‘simple’ means neither loop multiple edges allowed (.e. graph must simple). ‘loops’ means loop edges allowed mutiple edges . ‘multi’ means multiple edges allowed loop edges . ‘’ means loop edges multiple edges allowed.","code":""},{"path":"https://r.igraph.org/reference/is.hierarchical.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to deal with the result of network community detection — is.hierarchical","title":"Functions to deal with the result of network community detection — is.hierarchical","text":".hierarchical() renamed is_hierarchical() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.hierarchical.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to deal with the result of network community detection — is.hierarchical","text":"","code":"is.hierarchical(communities)"},{"path":"https://r.igraph.org/reference/is.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Is this object an igraph graph? — is.igraph","title":"Is this object an igraph graph? — is.igraph","text":".igraph() renamed is_igraph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is this object an igraph graph? — is.igraph","text":"","code":"is.igraph(graph)"},{"path":"https://r.igraph.org/reference/is.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is this object an igraph graph? — is.igraph","text":"graph R object.","code":""},{"path":"https://r.igraph.org/reference/is.loop.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the multiple or loop edges in a graph — is.loop","title":"Find the multiple or loop edges in a graph — is.loop","text":".loop() renamed which_loop() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.loop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the multiple or loop edges in a graph — is.loop","text":"","code":"is.loop(graph, eids = E(graph))"},{"path":"https://r.igraph.org/reference/is.loop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the multiple or loop edges in a graph — is.loop","text":"graph input graph. eids edges query restricted. default edges graph.","code":""},{"path":"https://r.igraph.org/reference/is.matching.html","id":null,"dir":"Reference","previous_headings":"","what":"Matching — is.matching","title":"Matching — is.matching","text":".matching() renamed is_matching() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.matching.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Matching — is.matching","text":"","code":"is.matching(graph, matching, types = NULL)"},{"path":"https://r.igraph.org/reference/is.matching.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Matching — is.matching","text":"graph input graph. might directed, edge directions ignored. matching potential matching. integer vector gives pair matching vertex. vertices without pair, supply NA . types Vertex types, graph bipartite. default taken ‘type’ vertex attribute, present.","code":""},{"path":"https://r.igraph.org/reference/is.maximal.matching.html","id":null,"dir":"Reference","previous_headings":"","what":"Matching — is.maximal.matching","title":"Matching — is.maximal.matching","text":".maximal.matching() renamed is_max_matching() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.maximal.matching.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Matching — is.maximal.matching","text":"","code":"is.maximal.matching(graph, matching, types = NULL)"},{"path":"https://r.igraph.org/reference/is.maximal.matching.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Matching — is.maximal.matching","text":"graph input graph. might directed, edge directions ignored. matching potential matching. integer vector gives pair matching vertex. vertices without pair, supply NA . types Vertex types, graph bipartite. default taken ‘type’ vertex attribute, present.","code":""},{"path":"https://r.igraph.org/reference/is.minimal.separator.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimal vertex separators — is.minimal.separator","title":"Minimal vertex separators — is.minimal.separator","text":".minimal.separator() renamed is_min_separator() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.minimal.separator.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimal vertex separators — is.minimal.separator","text":"","code":"is.minimal.separator(graph, candidate)"},{"path":"https://r.igraph.org/reference/is.minimal.separator.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimal vertex separators — is.minimal.separator","text":"graph input graph. may directed, edge directions ignored. candidate numeric vector giving vertex ids candidate separator.","code":""},{"path":"https://r.igraph.org/reference/is.multiple.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the multiple or loop edges in a graph — is.multiple","title":"Find the multiple or loop edges in a graph — is.multiple","text":".multiple() renamed which_multiple() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.multiple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the multiple or loop edges in a graph — is.multiple","text":"","code":"is.multiple(graph, eids = E(graph))"},{"path":"https://r.igraph.org/reference/is.multiple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the multiple or loop edges in a graph — is.multiple","text":"graph input graph. eids edges query restricted. default edges graph.","code":""},{"path":"https://r.igraph.org/reference/is.mutual.html","id":null,"dir":"Reference","previous_headings":"","what":"Find mutual edges in a directed graph — is.mutual","title":"Find mutual edges in a directed graph — is.mutual","text":".mutual() renamed which_mutual() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.mutual.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find mutual edges in a directed graph — is.mutual","text":"","code":"is.mutual(graph, eids = E(graph), loops = TRUE)"},{"path":"https://r.igraph.org/reference/is.mutual.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find mutual edges in a directed graph — is.mutual","text":"graph input graph. eids Edge sequence, edges probed. default includes edges order ids. loops Logical, whether consider directed self-loops mutual.","code":""},{"path":"https://r.igraph.org/reference/is.named.html","id":null,"dir":"Reference","previous_headings":"","what":"Named graphs — is.named","title":"Named graphs — is.named","text":".named() renamed is_named() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.named.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Named graphs — is.named","text":"","code":"is.named(graph)"},{"path":"https://r.igraph.org/reference/is.named.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Named graphs — is.named","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/is.separator.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex separators — is.separator","title":"Vertex separators — is.separator","text":".separator() renamed is_separator() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.separator.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex separators — is.separator","text":"","code":"is.separator(graph, candidate)"},{"path":"https://r.igraph.org/reference/is.separator.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex separators — is.separator","text":"graph input graph. may directed, edge directions ignored. candidate numeric vector giving vertex ids candidate separator.","code":""},{"path":"https://r.igraph.org/reference/is.simple.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple graphs — is.simple","title":"Simple graphs — is.simple","text":".simple() renamed is_simple() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.simple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple graphs — is.simple","text":"","code":"is.simple(graph)"},{"path":"https://r.igraph.org/reference/is.simple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple graphs — is.simple","text":"graph graph work .","code":""},{"path":"https://r.igraph.org/reference/is.weighted.html","id":null,"dir":"Reference","previous_headings":"","what":"Weighted graphs — is.weighted","title":"Weighted graphs — is.weighted","text":".weighted() renamed is_weighted() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.weighted.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Weighted graphs — is.weighted","text":"","code":"is.weighted(graph)"},{"path":"https://r.igraph.org/reference/is.weighted.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Weighted graphs — is.weighted","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/is_acyclic.html","id":null,"dir":"Reference","previous_headings":"","what":"Acyclic graphs — is_acyclic","title":"Acyclic graphs — is_acyclic","text":"function tests whether given graph free cycles.","code":""},{"path":"https://r.igraph.org/reference/is_acyclic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acyclic graphs — is_acyclic","text":"","code":"is_acyclic(graph)"},{"path":"https://r.igraph.org/reference/is_acyclic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acyclic graphs — is_acyclic","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/is_acyclic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Acyclic graphs — is_acyclic","text":"logical vector length one.","code":""},{"path":"https://r.igraph.org/reference/is_acyclic.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Acyclic graphs — is_acyclic","text":"function looks directed cycles directed graphs undirected cycles undirected graphs.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_acyclic.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Acyclic graphs — is_acyclic","text":"igraph_is_acyclic().","code":""},{"path":"https://r.igraph.org/reference/is_acyclic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acyclic graphs — is_acyclic","text":"","code":"g <- make_graph(c(1,2, 1,3, 2,4, 3,4), directed = TRUE) is_acyclic(g) #> [1] TRUE is_acyclic(as_undirected(g)) #> [1] FALSE"},{"path":"https://r.igraph.org/reference/is_biconnected.html","id":null,"dir":"Reference","previous_headings":"","what":"Check biconnectedness — is_biconnected","title":"Check biconnectedness — is_biconnected","text":"Tests whether graph biconnected.","code":""},{"path":"https://r.igraph.org/reference/is_biconnected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check biconnectedness — is_biconnected","text":"","code":"is_biconnected(graph)"},{"path":"https://r.igraph.org/reference/is_biconnected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check biconnectedness — is_biconnected","text":"graph input graph. Edge directions ignored.","code":""},{"path":"https://r.igraph.org/reference/is_biconnected.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check biconnectedness — is_biconnected","text":"Logical, TRUE graph biconnected.","code":""},{"path":"https://r.igraph.org/reference/is_biconnected.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check biconnectedness — is_biconnected","text":"graph biconnected removal single vertex (adjacent edges) disconnect . igraph consider single-vertex graphs biconnected. Note authors consider graph consisting two connected vertices biconnected, however, igraph .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_biconnected.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Check biconnectedness — is_biconnected","text":"igraph_is_biconnected().","code":""},{"path":"https://r.igraph.org/reference/is_biconnected.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check biconnectedness — is_biconnected","text":"","code":"is_biconnected(make_graph(\"bull\")) #> [1] FALSE is_biconnected(make_graph(\"dodecahedron\")) #> [1] TRUE is_biconnected(make_full_graph(1)) #> [1] FALSE is_biconnected(make_full_graph(2)) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/is_bipartite.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether the graph has a vertex attribute called type. — is_bipartite","title":"Checks whether the graph has a vertex attribute called type. — is_bipartite","text":"check whether graph bipartite mathematical sense. Use bipartite_mapping() .","code":""},{"path":"https://r.igraph.org/reference/is_bipartite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether the graph has a vertex attribute called type. — is_bipartite","text":"","code":"is_bipartite(graph)"},{"path":"https://r.igraph.org/reference/is_bipartite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether the graph has a vertex attribute called type. — is_bipartite","text":"graph input graph","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_chordal.html","id":null,"dir":"Reference","previous_headings":"","what":"Chordality of a graph — is_chordal","title":"Chordality of a graph — is_chordal","text":"graph chordal (triangulated) cycles four nodes chord, edge joining two nodes adjacent cycle. equivalent definition chordless cycles three nodes.","code":""},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Chordality of a graph — is_chordal","text":"","code":"is_chordal( graph, alpha = NULL, alpham1 = NULL, fillin = FALSE, newgraph = FALSE )"},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Chordality of a graph — is_chordal","text":"graph input graph. may directed, edge directions ignored, algorithm defined undirected graphs. alpha Numeric vector, maximal chardinality ordering vertices. NULL, automatically calculated calling max_cardinality(), alpham1 given.. alpham1 Numeric vector, inverse alpha. NULL, automatically calculated calling max_cardinality(), alpha. fillin Logical scalar, whether calculate fill-edges. newgraph Logical scalar, whether calculate triangulated graph.","code":""},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Chordality of a graph — is_chordal","text":"list three members: chordal Logical scalar, TRUE iff input graph chordal. fillin requested, numeric vector giving fill-edges. NULL otherwise. newgraph requested, triangulated graph, igraph object. NULL otherwise.","code":""},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Chordality of a graph — is_chordal","text":"chordality graph decided first performing maximum cardinality search (alpha alpham1 arguments NULL), calculating set fill-edges. set fill-edges empty graph chordal. also true adding fill-edges graph makes chordal.","code":""},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Chordality of a graph — is_chordal","text":"Robert E Tarjan Mihalis Yannakakis. (1984). Simple linear-time algorithms test chordality graphs, test acyclicity hypergraphs, selectively reduce acyclic hypergraphs. SIAM Journal Computation 13, 566–579.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Chordality of a graph — is_chordal","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Chordality of a graph — is_chordal","text":"","code":"## The examples from the Tarjan-Yannakakis paper g1 <- graph_from_literal( A - B:C:I, B - A:C:D, C - A:B:E:H, D - B:E:F, E - C:D:F:H, F - D:E:G, G - F:H, H - C:E:G:I, I - A:H ) max_cardinality(g1) #> $alpha #> [1] 9 4 6 8 3 5 7 2 1 #> #> $alpham1 #> + 9/9 vertices, named, from 7a86c3e: #> [1] G F D B E C H I A #> is_chordal(g1, fillin = TRUE) #> $chordal #> [1] FALSE #> #> $fillin #> [1] 2 6 8 7 5 7 2 7 6 1 7 1 #> #> $newgraph #> NULL #> g2 <- graph_from_literal( A - B:E, B - A:E:F:D, C - E:D:G, D - B:F:E:C:G, E - A:B:C:D:F, F - B:D:E, G - C:D:H:I, H - G:I:J, I - G:H:J, J - H:I ) max_cardinality(g2) #> $alpha #> [1] 10 8 9 6 7 5 4 2 3 1 #> #> $alpham1 #> + 10/10 vertices, named, from 94175cb: #> [1] J H I G C F D B E A #> is_chordal(g2, fillin = TRUE) #> $chordal #> [1] TRUE #> #> $fillin #> numeric(0) #> #> $newgraph #> NULL #>"},{"path":"https://r.igraph.org/reference/is_dag.html","id":null,"dir":"Reference","previous_headings":"","what":"Directed acyclic graphs — is_dag","title":"Directed acyclic graphs — is_dag","text":"function tests whether given graph DAG, directed acyclic graph.","code":""},{"path":"https://r.igraph.org/reference/is_dag.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Directed acyclic graphs — is_dag","text":"","code":"is_dag(graph)"},{"path":"https://r.igraph.org/reference/is_dag.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Directed acyclic graphs — is_dag","text":"graph input graph. may undirected, case FALSE reported.","code":""},{"path":"https://r.igraph.org/reference/is_dag.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Directed acyclic graphs — is_dag","text":"logical vector length one.","code":""},{"path":"https://r.igraph.org/reference/is_dag.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Directed acyclic graphs — is_dag","text":"is_dag() checks whether directed cycle graph. , graph DAG.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_dag.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Directed acyclic graphs — is_dag","text":"Tamas Nepusz ntamas@gmail.com C code, Gabor Csardi csardi.gabor@gmail.com R interface.","code":""},{"path":"https://r.igraph.org/reference/is_dag.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Directed acyclic graphs — is_dag","text":"igraph_is_dag().","code":""},{"path":"https://r.igraph.org/reference/is_dag.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Directed acyclic graphs — is_dag","text":"","code":"g <- make_tree(10) is_dag(g) #> [1] TRUE g2 <- g + edge(5, 1) is_dag(g2) #> [1] FALSE"},{"path":"https://r.igraph.org/reference/is_degseq.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a degree sequence is valid for a multi-graph — is_degseq","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":"is_degseq() checks whether given vertex degrees (- -degrees directed graphs) can realized graph. Note graph simple, may contain loop multiple edges. undirected graphs, also checks whether sum degrees even. directed graphs, function checks whether lengths two degree vectors equal whether sums also equal. known sufficient necessary conditions degree sequence valid.","code":""},{"path":"https://r.igraph.org/reference/is_degseq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":"","code":"is_degseq(out.deg, in.deg = NULL)"},{"path":"https://r.igraph.org/reference/is_degseq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":".deg Integer vector, degree sequence undirected graphs, -degree sequence directed graphs. .deg NULL integer vector. undirected graphs, NULL. directed graphs specifies -degrees.","code":""},{"path":"https://r.igraph.org/reference/is_degseq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":"logical scalar.","code":""},{"path":"https://r.igraph.org/reference/is_degseq.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":"Z Király, Recognizing graphic degree sequences generating realizations. TR-2011-11, Egerváry Research Group, H-1117, Budapest, Hungary. ISSN 1587-4451 (2012). B. Cloteaux, Real? Fast Graphicality Testing, Comput. Sci. Eng. 17, 91 (2015). . Berger, note characterization digraphic sequences, Discrete Math. 314, 38 (2014). G. Cairns S. Mendan, Degree Sequence Graphs Loops (2013).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_degseq.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":"Tamás Nepusz ntamas@gmail.com Szabolcs Horvát szhorvat@gmail.com","code":""},{"path":"https://r.igraph.org/reference/is_degseq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":"","code":"g <- sample_gnp(100, 2 / 100) is_degseq(degree(g)) #> [1] TRUE is_graphical(degree(g)) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/is_directed.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether a graph is directed — is_directed","title":"Check whether a graph is directed — is_directed","text":"Check whether graph directed","code":""},{"path":"https://r.igraph.org/reference/is_directed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether a graph is directed — is_directed","text":"","code":"is_directed(graph)"},{"path":"https://r.igraph.org/reference/is_directed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether a graph is directed — is_directed","text":"graph input graph","code":""},{"path":"https://r.igraph.org/reference/is_directed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check whether a graph is directed — is_directed","text":"Logical scalar, whether graph directed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_directed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check whether a graph is directed — is_directed","text":"","code":"g <- make_ring(10) is_directed(g) #> [1] FALSE g2 <- make_ring(10, directed = TRUE) is_directed(g2) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/is_forest.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide whether a graph is a forest. — is_forest","title":"Decide whether a graph is a forest. — is_forest","text":"is_forest() decides whether graph forest, optionally returns set possible root vertices components.","code":""},{"path":"https://r.igraph.org/reference/is_forest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide whether a graph is a forest. — is_forest","text":"","code":"is_forest(graph, mode = c(\"out\", \"in\", \"all\", \"total\"), details = FALSE)"},{"path":"https://r.igraph.org/reference/is_forest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide whether a graph is a forest. — is_forest","text":"graph igraph graph object mode Whether consider edge directions directed graph. ‘’ ignores edge directions; ‘’ requires edges oriented outwards root, ‘’ requires edges oriented towards root. details Whether return whether graph tree (FALSE) also possible root (TRUE)","code":""},{"path":"https://r.igraph.org/reference/is_forest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decide whether a graph is a forest. — is_forest","text":"details FALSE, logical value indicates whether graph tree. details TRUE, named list two entries: res Logical value indicates whether graph tree. root root vertex tree; undefined graph tree.","code":""},{"path":"https://r.igraph.org/reference/is_forest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Decide whether a graph is a forest. — is_forest","text":"undirected graph forest cycles. directed case, possible additional requirement edges tree oriented away root (-trees arborescences) edges oriented towards root (-trees anti-arborescences). test can controlled using mode parameter. convention, null graph (.e. graph vertices) considered forest.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_forest.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Decide whether a graph is a forest. — is_forest","text":"igraph_is_forest().","code":""},{"path":"https://r.igraph.org/reference/is_forest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decide whether a graph is a forest. — is_forest","text":"","code":"g <- make_tree(3) + make_tree(5,3) is_forest(g) #> [1] TRUE is_forest(g, details = TRUE) #> $res #> [1] TRUE #> #> $roots #> + 2/8 vertices, from 1316867: #> [1] 1 4 #>"},{"path":"https://r.igraph.org/reference/is_graphical.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a degree sequence graphical? — is_graphical","title":"Is a degree sequence graphical? — is_graphical","text":"Determine whether given vertex degrees (- -degrees directed graphs) can realized graph.","code":""},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a degree sequence graphical? — is_graphical","text":"","code":"is_graphical( out.deg, in.deg = NULL, allowed.edge.types = c(\"simple\", \"loops\", \"multi\", \"all\") )"},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a degree sequence graphical? — is_graphical","text":".deg Integer vector, degree sequence undirected graphs, -degree sequence directed graphs. .deg NULL integer vector. undirected graphs, NULL. directed graphs specifies -degrees. allowed.edge.types allowed edge types graph. ‘simple’ means neither loop multiple edges allowed (.e. graph must simple). ‘loops’ means loop edges allowed mutiple edges . ‘multi’ means multiple edges allowed loop edges . ‘’ means loop edges multiple edges allowed.","code":""},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a degree sequence graphical? — is_graphical","text":"logical scalar.","code":""},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Is a degree sequence graphical? — is_graphical","text":"classical concept graphicality assumes simple graphs. function can perform check also self-loops, multi-edges, allowed graph.","code":""},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Is a degree sequence graphical? — is_graphical","text":"Hakimi SL: realizability set integers degrees vertices simple graph. J SIAM Appl Math 10:496-506, 1962. PL Erdős, Miklós Z Toroczkai: simple Havel-Hakimi type algorithm realize graphical degree sequences directed graphs. Electronic Journal Combinatorics 17(1):R66, 2010.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Is a degree sequence graphical? — is_graphical","text":"Tamás Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Is a degree sequence graphical? — is_graphical","text":"igraph_is_graphical().","code":""},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is a degree sequence graphical? — is_graphical","text":"","code":"g <- sample_gnp(100, 2 / 100) is_degseq(degree(g)) #> [1] TRUE is_graphical(degree(g)) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/is_igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Is this object an igraph graph? — is_igraph","title":"Is this object an igraph graph? — is_igraph","text":"object igraph graph?","code":""},{"path":"https://r.igraph.org/reference/is_igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is this object an igraph graph? — is_igraph","text":"","code":"is_igraph(graph)"},{"path":"https://r.igraph.org/reference/is_igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is this object an igraph graph? — is_igraph","text":"graph R object.","code":""},{"path":"https://r.igraph.org/reference/is_igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is this object an igraph graph? — is_igraph","text":"logical constant, TRUE argument graph graph object.","code":""},{"path":"https://r.igraph.org/reference/is_igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Is this object an igraph graph? — is_igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/is_igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is this object an igraph graph? — is_igraph","text":"","code":"g <- make_ring(10) is_igraph(g) #> [1] TRUE is_igraph(numeric(10)) #> [1] FALSE"},{"path":"https://r.igraph.org/reference/is_min_separator.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimal vertex separators — is_min_separator","title":"Minimal vertex separators — is_min_separator","text":"Check whether given set vertices minimal vertex separator.","code":""},{"path":"https://r.igraph.org/reference/is_min_separator.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimal vertex separators — is_min_separator","text":"","code":"is_min_separator(graph, candidate)"},{"path":"https://r.igraph.org/reference/is_min_separator.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimal vertex separators — is_min_separator","text":"graph input graph. may directed, edge directions ignored. candidate numeric vector giving vertex ids candidate separator.","code":""},{"path":"https://r.igraph.org/reference/is_min_separator.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimal vertex separators — is_min_separator","text":"logical scalar, whether supplied vertex set (minimal) vertex separator .","code":""},{"path":"https://r.igraph.org/reference/is_min_separator.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minimal vertex separators — is_min_separator","text":"is_min_separator() decides whether supplied vertex set minimal vertex separator. minimal vertex separator vertex separator, none proper subsets vertex separator.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_min_separator.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Minimal vertex separators — is_min_separator","text":"igraph_is_minimal_separator().","code":""},{"path":"https://r.igraph.org/reference/is_min_separator.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimal vertex separators — is_min_separator","text":"","code":"# The graph from the Moody-White paper mw <- graph_from_literal( 1 - 2:3:4:5:6, 2 - 3:4:5:7, 3 - 4:6:7, 4 - 5:6:7, 5 - 6:7:21, 6 - 7, 7 - 8:11:14:19, 8 - 9:11:14, 9 - 10, 10 - 12:13, 11 - 12:14, 12 - 16, 13 - 16, 14 - 15, 15 - 16, 17 - 18:19:20, 18 - 20:21, 19 - 20:22:23, 20 - 21, 21 - 22:23, 22 - 23 ) # Cohesive subgraphs mw1 <- induced_subgraph(mw, as.character(c(1:7, 17:23))) mw2 <- induced_subgraph(mw, as.character(7:16)) mw3 <- induced_subgraph(mw, as.character(17:23)) mw4 <- induced_subgraph(mw, as.character(c(7, 8, 11, 14))) mw5 <- induced_subgraph(mw, as.character(1:7)) check.sep <- function(G) { sep <- min_separators(G) sapply(sep, is_min_separator, graph = G) } check.sep(mw) #> [1] TRUE check.sep(mw1) #> [1] TRUE TRUE TRUE TRUE check.sep(mw2) #> [1] TRUE TRUE TRUE check.sep(mw3) #> [1] TRUE check.sep(mw4) #> [1] FALSE FALSE FALSE FALSE check.sep(mw5) #> [1] TRUE TRUE TRUE"},{"path":"https://r.igraph.org/reference/is_named.html","id":null,"dir":"Reference","previous_headings":"","what":"Named graphs — is_named","title":"Named graphs — is_named","text":"igraph graph named, symbolic name associated vertices.","code":""},{"path":"https://r.igraph.org/reference/is_named.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Named graphs — is_named","text":"","code":"is_named(graph)"},{"path":"https://r.igraph.org/reference/is_named.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Named graphs — is_named","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/is_named.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Named graphs — is_named","text":"logical scalar.","code":""},{"path":"https://r.igraph.org/reference/is_named.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Named graphs — is_named","text":"igraph vertices can always identified specified via numeric vertex ids. , however, always convenient, many cases exist symbolic ids correspond vertices. allow flexible identification vertices, one can assign vertex attribute called ‘name’ igraph graph. , symbolic vertex names can used igraph functions, instead numeric ids. Note uniqueness vertex names currently enforced igraph, check , assigning vertex names.","code":""},{"path":"https://r.igraph.org/reference/is_named.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Named graphs — is_named","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/is_named.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Named graphs — is_named","text":"","code":"g <- make_ring(10) is_named(g) #> [1] FALSE V(g)$name <- letters[1:10] is_named(g) #> [1] TRUE neighbors(g, \"a\") #> + 2/10 vertices, named, from 129a779: #> [1] b j"},{"path":"https://r.igraph.org/reference/is_printer_callback.html","id":null,"dir":"Reference","previous_headings":"","what":"Is this a printer callback? — is_printer_callback","title":"Is this a printer callback? — is_printer_callback","text":"printer callback?","code":""},{"path":"https://r.igraph.org/reference/is_printer_callback.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is this a printer callback? — is_printer_callback","text":"","code":"is_printer_callback(x)"},{"path":"https://r.igraph.org/reference/is_printer_callback.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is this a printer callback? — is_printer_callback","text":"x R object.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_separator.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether removing this set of vertices would disconnect the graph. — is_separator","title":"Check whether removing this set of vertices would disconnect the graph. — is_separator","text":"is_separator() determines whether supplied vertex set vertex separator: vertex set \\(S\\) separator vertices \\(u\\) \\(v\\) graph paths \\(u\\) \\(v\\) pass vertices \\(S\\).","code":""},{"path":"https://r.igraph.org/reference/is_separator.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether removing this set of vertices would disconnect the graph. — is_separator","text":"","code":"is_separator(graph, candidate)"},{"path":"https://r.igraph.org/reference/is_separator.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether removing this set of vertices would disconnect the graph. — is_separator","text":"graph input graph. may directed, edge directions ignored. candidate numeric vector giving vertex ids candidate separator.","code":""},{"path":"https://r.igraph.org/reference/is_separator.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check whether removing this set of vertices would disconnect the graph. — is_separator","text":"logical scalar, whether supplied vertex set (minimal) vertex separator . lists vertex separator minimum size.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_separator.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Check whether removing this set of vertices would disconnect the graph. — is_separator","text":"igraph_is_separator().","code":""},{"path":"https://r.igraph.org/reference/is_separator.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check whether removing this set of vertices would disconnect the graph. — is_separator","text":"","code":"ring <- make_ring(4) min_st_separators(ring) #> [[1]] #> + 2/4 vertices, from e96bcfe: #> [1] 2 4 #> #> [[2]] #> + 2/4 vertices, from e96bcfe: #> [1] 1 3 #> is_separator(ring, 1) #> [1] FALSE is_separator(ring, c(1, 3)) #> [1] TRUE is_separator(ring, c(2, 4)) #> [1] TRUE is_separator(ring, c(2, 3)) #> [1] FALSE"},{"path":"https://r.igraph.org/reference/is_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide whether a graph is a tree. — is_tree","title":"Decide whether a graph is a tree. — is_tree","text":"is_tree() decides whether graph tree, optionally returns possible root vertex graph tree.","code":""},{"path":"https://r.igraph.org/reference/is_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide whether a graph is a tree. — is_tree","text":"","code":"is_tree(graph, mode = c(\"out\", \"in\", \"all\", \"total\"), details = FALSE)"},{"path":"https://r.igraph.org/reference/is_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide whether a graph is a tree. — is_tree","text":"graph igraph graph object mode Whether consider edge directions directed graph. ‘’ ignores edge directions; ‘’ requires edges oriented outwards root, ‘’ requires edges oriented towards root. details Whether return whether graph tree (FALSE) also possible root (TRUE)","code":""},{"path":"https://r.igraph.org/reference/is_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decide whether a graph is a tree. — is_tree","text":"details FALSE, logical value indicates whether graph tree. details TRUE, named list two entries: res Logical value indicates whether graph tree. root root vertex tree; undefined graph tree.","code":""},{"path":"https://r.igraph.org/reference/is_tree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Decide whether a graph is a tree. — is_tree","text":"undirected graph tree connected cycles. directed case, possible additional requirement edges oriented away root (-tree arborescence) edges oriented towards root (-tree anti-arborescence). test can controlled using mode parameter. convention, null graph (.e. graph vertices) considered tree.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_tree.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Decide whether a graph is a tree. — is_tree","text":"igraph_is_tree().","code":""},{"path":"https://r.igraph.org/reference/is_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decide whether a graph is a tree. — is_tree","text":"","code":"g <- make_tree(7, 2) is_tree(g) #> [1] TRUE is_tree(g, details = TRUE) #> $res #> [1] TRUE #> #> $root #> + 1/7 vertex, from be2624c: #> [1] 1 #>"},{"path":"https://r.igraph.org/reference/is_weighted.html","id":null,"dir":"Reference","previous_headings":"","what":"Weighted graphs — is_weighted","title":"Weighted graphs — is_weighted","text":"weighted graphs, real number assigned (directed undirected) edge.","code":""},{"path":"https://r.igraph.org/reference/is_weighted.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Weighted graphs — is_weighted","text":"","code":"is_weighted(graph)"},{"path":"https://r.igraph.org/reference/is_weighted.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Weighted graphs — is_weighted","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/is_weighted.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Weighted graphs — is_weighted","text":"logical scalar.","code":""},{"path":"https://r.igraph.org/reference/is_weighted.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Weighted graphs — is_weighted","text":"igraph edge weights represented via edge attribute, called ‘weight’. is_weighted() function checks attribute exists. (even checks numeric edge attribute.) Edge weights used different purposes different functions. E.g. shortest path functions use cost path; community finding methods use strength relationship two vertices, etc. Check manual pages functions working weighted graphs details.","code":""},{"path":"https://r.igraph.org/reference/is_weighted.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Weighted graphs — is_weighted","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/is_weighted.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Weighted graphs — is_weighted","text":"","code":"g <- make_ring(10) shortest_paths(g, 8, 2) #> $vpath #> $vpath[[1]] #> + 5/10 vertices, from 758378b: #> [1] 8 9 10 1 2 #> #> #> $epath #> NULL #> #> $predecessors #> NULL #> #> $inbound_edges #> NULL #> E(g)$weight <- seq_len(ecount(g)) shortest_paths(g, 8, 2) #> $vpath #> $vpath[[1]] #> + 7/10 vertices, from 758378b: #> [1] 8 7 6 5 4 3 2 #> #> #> $epath #> NULL #> #> $predecessors #> NULL #> #> $inbound_edges #> NULL #>"},{"path":"https://r.igraph.org/reference/isomorphic.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide if two graphs are isomorphic — isomorphic","title":"Decide if two graphs are isomorphic — isomorphic","text":"Decide two graphs isomorphic","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide if two graphs are isomorphic — isomorphic","text":"","code":"isomorphic(graph1, graph2, method = c(\"auto\", \"direct\", \"vf2\", \"bliss\"), ...) is_isomorphic_to( graph1, graph2, method = c(\"auto\", \"direct\", \"vf2\", \"bliss\"), ... )"},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide if two graphs are isomorphic — isomorphic","text":"graph1 first graph. graph2 second graph. method method use. Possible values: ‘auto’, ‘direct’, ‘vf2’, ‘bliss’. See details . ... Additional arguments, passed various methods.","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decide if two graphs are isomorphic — isomorphic","text":"Logical scalar, TRUE graphs isomorphic.","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"-auto-method","dir":"Reference","previous_headings":"","what":"‘auto’ method","title":"Decide if two graphs are isomorphic — isomorphic","text":"tries select appropriate method based two graphs. algorithm uses: two graphs agree order size (.e. number vertices edges), return FALSE. graphs three four vertices, ‘direct’ method used. graphs directed, ‘vf2’ method used. Otherwise ‘bliss’ method used.","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"-direct-method","dir":"Reference","previous_headings":"","what":"‘direct’ method","title":"Decide if two graphs are isomorphic — isomorphic","text":"method works graphs three four vertices, based pre-calculated stored table. extra arguments.","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"-vf-method","dir":"Reference","previous_headings":"","what":"‘vf2’ method","title":"Decide if two graphs are isomorphic — isomorphic","text":"method uses VF2 algorithm Cordella, Foggia et al., see references . supports vertex edge colors following extra arguments: vertex.color1, vertex.color2 Optional integer vectors giving colors vertices colored graph isomorphism. given, graph “color” vertex attribute, used. want ignore attributes, supply NULL arguments. See also examples . edge.color1, edge.color2 Optional integer vectors giving colors edges edge-colored (sub)graph isomorphism. given, graph “color” edge attribute, used. want ignore attributes, supply NULL arguments.","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"-bliss-method","dir":"Reference","previous_headings":"","what":"‘bliss’ method","title":"Decide if two graphs are isomorphic — isomorphic","text":"Uses BLISS algorithm Junttila Kaski, works undirected graphs. graphs canonical_permutation() permute() function called transfer canonical form; finally canonical forms compared. Extra arguments: sh Character constant, heuristics use BLISS algorithm graph1 graph2. See sh argument canonical_permutation() possible values. sh defaults ‘fm’.","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Decide if two graphs are isomorphic — isomorphic","text":"Tommi Junttila Petteri Kaski: Engineering Efficient Canonical Labeling Tool Large Sparse Graphs, Proceedings Ninth Workshop Algorithm Engineering Experiments Fourth Workshop Analytic Algorithms Combinatorics. 2007. LP Cordella, P Foggia, C Sansone, M Vento: improved algorithm matching large graphs, Proc. 3rd IAPR TC-15 Workshop Graphbased Representations Pattern Recognition, 149–159, 2001.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decide if two graphs are isomorphic — isomorphic","text":"","code":"# create some non-isomorphic graphs g1 <- graph_from_isomorphism_class(3, 10) g2 <- graph_from_isomorphism_class(3, 11) isomorphic(g1, g2) #> [1] FALSE # create two isomorphic graphs, by permuting the vertices of the first g1 <- sample_pa(30, m = 2, directed = FALSE) g2 <- permute(g1, sample(vcount(g1))) # should be TRUE isomorphic(g1, g2) #> [1] TRUE isomorphic(g1, g2, method = \"bliss\") #> [1] TRUE isomorphic(g1, g2, method = \"vf2\") #> [1] TRUE # colored graph isomorphism g1 <- make_ring(10) g2 <- make_ring(10) isomorphic(g1, g2) #> [1] TRUE V(g1)$color <- rep(1:2, length = vcount(g1)) V(g2)$color <- rep(2:1, length = vcount(g2)) # consider colors by default count_isomorphisms(g1, g2) #> [1] 10 # ignore colors count_isomorphisms(g1, g2, vertex.color1 = NULL, vertex.color2 = NULL ) #> [1] 20"},{"path":"https://r.igraph.org/reference/isomorphism_class.html","id":null,"dir":"Reference","previous_headings":"","what":"Isomorphism class of a graph — isomorphism_class","title":"Isomorphism class of a graph — isomorphism_class","text":"isomorphism class non-negative integer number. Graphs (number vertices) isomorphism class isomorphic isomorphic graphs always isomorphism class. Currently can handle directed graphs 3 4 vertices undirected graphs 3 6 vertices.","code":""},{"path":"https://r.igraph.org/reference/isomorphism_class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Isomorphism class of a graph — isomorphism_class","text":"","code":"isomorphism_class(graph, v)"},{"path":"https://r.igraph.org/reference/isomorphism_class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Isomorphism class of a graph — isomorphism_class","text":"graph input graph. v Optionally vertex sequence. missing, induced subgraph input graph, consisting vertices, used.","code":""},{"path":"https://r.igraph.org/reference/isomorphism_class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Isomorphism class of a graph — isomorphism_class","text":"integer number.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/isomorphism_class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Isomorphism class of a graph — isomorphism_class","text":"","code":"# create some non-isomorphic graphs g1 <- graph_from_isomorphism_class(3, 10) g2 <- graph_from_isomorphism_class(3, 11) isomorphism_class(g1) #> [1] 10 isomorphism_class(g2) #> [1] 11 isomorphic(g1, g2) #> [1] FALSE"},{"path":"https://r.igraph.org/reference/isomorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate all isomorphic mappings between the vertices of two graphs — isomorphisms","title":"Calculate all isomorphic mappings between the vertices of two graphs — isomorphisms","text":"Calculate isomorphic mappings vertices two graphs","code":""},{"path":"https://r.igraph.org/reference/isomorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate all isomorphic mappings between the vertices of two graphs — isomorphisms","text":"","code":"isomorphisms(graph1, graph2, method = \"vf2\", ...)"},{"path":"https://r.igraph.org/reference/isomorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate all isomorphic mappings between the vertices of two graphs — isomorphisms","text":"graph1 first graph. graph2 second graph. method Currently ‘vf2’ supported, see isomorphic() details extra arguments. ... Extra arguments, passed various methods.","code":""},{"path":"https://r.igraph.org/reference/isomorphisms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate all isomorphic mappings between the vertices of two graphs — isomorphisms","text":"list vertex sequences, corresponding mappings first graph second.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/ivs.html","id":null,"dir":"Reference","previous_headings":"","what":"Independent vertex sets — ivs","title":"Independent vertex sets — ivs","text":"vertex set called independent edges two vertices . functions find independent vertex sets undirected graphs","code":""},{"path":"https://r.igraph.org/reference/ivs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Independent vertex sets — ivs","text":"","code":"ivs(graph, min = NULL, max = NULL) largest_ivs(graph) max_ivs(graph) ivs_size(graph) independence_number(graph)"},{"path":"https://r.igraph.org/reference/ivs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Independent vertex sets — ivs","text":"graph input graph, directed graphs considered undirected, loop edges multiple edges ignored. min Numeric constant, limit minimum size independent vertex sets find. NULL means limit. max Numeric constant, limit maximum size independent vertex sets find. NULL means limit.","code":""},{"path":"https://r.igraph.org/reference/ivs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Independent vertex sets — ivs","text":"ivs(), largest_ivs() max_ivs() return list containing numeric vertex ids, list element independent vertex set. ivs_size() returns integer constant.","code":""},{"path":"https://r.igraph.org/reference/ivs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Independent vertex sets — ivs","text":"ivs() finds independent vertex sets network, obeying size limitations given min max arguments. largest_ivs() finds largest independent vertex sets graph. independent vertex set largest independent vertex set vertices. max_ivs() finds maximal independent vertex sets graph. independent vertex set maximal extended larger independent vertex set. largest independent vertex sets maximal, opposite always true. ivs_size() calculate size largest independent vertex set(s). independence_number() alias ivs_size(). functions use algorithm described Tsukiyama et al., see reference .","code":""},{"path":"https://r.igraph.org/reference/ivs.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Independent vertex sets — ivs","text":"S. Tsukiyama, M. Ide, H. Ariyoshi . Shirawaka. new algorithm generating maximal independent sets. SIAM J Computing, 6:505–517, 1977.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/ivs.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Independent vertex sets — ivs","text":"Tamas Nepusz ntamas@gmail.com ported Nauty Graph Library Keith Briggs (http://keithbriggs.info/) Gabor Csardi csardi.gabor@gmail.com wrote R interface manual page.","code":""},{"path":"https://r.igraph.org/reference/ivs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Independent vertex sets — ivs","text":"","code":"# Do not run, takes a couple of seconds # A quite dense graph set.seed(42) g <- sample_gnp(100, 0.9) ivs_size(g) #> [1] 4 ivs(g, min = ivs_size(g)) #> [[1]] #> + 4/100 vertices, from 00db2c5: #> [1] 7 37 55 56 #> #> [[2]] #> + 4/100 vertices, from 00db2c5: #> [1] 7 55 56 69 #> #> [[3]] #> + 4/100 vertices, from 00db2c5: #> [1] 7 56 69 74 #> #> [[4]] #> + 4/100 vertices, from 00db2c5: #> [1] 8 15 73 80 #> #> [[5]] #> + 4/100 vertices, from 00db2c5: #> [1] 8 15 73 84 #> #> [[6]] #> + 4/100 vertices, from 00db2c5: #> [1] 13 16 37 40 #> #> [[7]] #> + 4/100 vertices, from 00db2c5: #> [1] 21 32 45 61 #> #> [[8]] #> + 4/100 vertices, from 00db2c5: #> [1] 22 55 56 64 #> #> [[9]] #> + 4/100 vertices, from 00db2c5: #> [1] 23 69 75 90 #> largest_ivs(g) #> [[1]] #> + 4/100 vertices, from 00db2c5: #> [1] 21 32 45 61 #> #> [[2]] #> + 4/100 vertices, from 00db2c5: #> [1] 7 37 55 56 #> #> [[3]] #> + 4/100 vertices, from 00db2c5: #> [1] 7 55 56 69 #> #> [[4]] #> + 4/100 vertices, from 00db2c5: #> [1] 7 56 69 74 #> #> [[5]] #> + 4/100 vertices, from 00db2c5: #> [1] 8 15 73 80 #> #> [[6]] #> + 4/100 vertices, from 00db2c5: #> [1] 8 15 73 84 #> #> [[7]] #> + 4/100 vertices, from 00db2c5: #> [1] 22 55 56 64 #> #> [[8]] #> + 4/100 vertices, from 00db2c5: #> [1] 23 69 75 90 #> #> [[9]] #> + 4/100 vertices, from 00db2c5: #> [1] 13 16 37 40 #> # Empty graph induced_subgraph(g, largest_ivs(g)[[1]]) #> IGRAPH e5450ec U--- 4 0 -- Erdos-Renyi (gnp) graph #> + attr: name (g/c), type (g/c), loops (g/l), p (g/n) #> + edges from e5450ec: length(max_ivs(g)) #> [1] 326"},{"path":"https://r.igraph.org/reference/k.regular.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a random regular graph — k.regular.game","title":"Create a random regular graph — k.regular.game","text":"k.regular.game() renamed sample_k_regular() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/k.regular.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a random regular graph — k.regular.game","text":"","code":"k.regular.game(no.of.nodes, k, directed = FALSE, multiple = FALSE)"},{"path":"https://r.igraph.org/reference/k.regular.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a random regular graph — k.regular.game","text":"..nodes Integer scalar, number vertices generated graph. k Integer scalar, degree vertex graph, -degree -degree directed graph. directed Logical scalar, whether create directed graph. multiple Logical scalar, whether multiple edges allowed.","code":""},{"path":"https://r.igraph.org/reference/k_shortest_paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the \\(k\\) shortest paths between two vertices — k_shortest_paths","title":"Find the \\(k\\) shortest paths between two vertices — k_shortest_paths","text":"Finds \\(k\\) shortest paths given source target vertex order increasing length. Currently function uses Yen's algorithm.","code":""},{"path":"https://r.igraph.org/reference/k_shortest_paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the \\(k\\) shortest paths between two vertices — k_shortest_paths","text":"","code":"k_shortest_paths( graph, from, to, ..., k, weights = NULL, mode = c(\"out\", \"in\", \"all\", \"total\") )"},{"path":"https://r.igraph.org/reference/k_shortest_paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the \\(k\\) shortest paths between two vertices — k_shortest_paths","text":"graph input graph. source vertex shortest paths. target vertex shortest paths. ... dots future extensions must empty. k number paths find. returned order increasing length. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). weighted graph, length path sum weights constituent edges. mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, graph treated undirected, .e. edge directions taken account. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/k_shortest_paths.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the \\(k\\) shortest paths between two vertices — k_shortest_paths","text":"named list two components returned: vpaths list \\(k\\) shortest paths terms vertices epaths list \\(k\\) shortest paths terms edges","code":""},{"path":"https://r.igraph.org/reference/k_shortest_paths.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Find the \\(k\\) shortest paths between two vertices — k_shortest_paths","text":"Yen, Jin Y.: algorithm finding shortest routes source nodes given destination general networks. Quarterly Applied Mathematics. 27 (4): 526–530. (1970) doi:10.1090/qam/253822","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/k_shortest_paths.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Find the \\(k\\) shortest paths between two vertices — k_shortest_paths","text":"igraph_get_k_shortest_paths().","code":""},{"path":"https://r.igraph.org/reference/keeping_degseq.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph rewiring while preserving the degree distribution — keeping_degseq","title":"Graph rewiring while preserving the degree distribution — keeping_degseq","text":"function can used together rewire() randomly rewire edges preserving original graph's degree distribution.","code":""},{"path":"https://r.igraph.org/reference/keeping_degseq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph rewiring while preserving the degree distribution — keeping_degseq","text":"","code":"keeping_degseq(loops = FALSE, niter = 100)"},{"path":"https://r.igraph.org/reference/keeping_degseq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph rewiring while preserving the degree distribution — keeping_degseq","text":"loops Whether allow destroying creating loop edges. niter Number rewiring trials perform.","code":""},{"path":"https://r.igraph.org/reference/keeping_degseq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph rewiring while preserving the degree distribution — keeping_degseq","text":"rewiring algorithm chooses two arbitrary edges step ((,b) (c,d)) substitutes (,d) (c,b), already exists graph. algorithm create multiple edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/keeping_degseq.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph rewiring while preserving the degree distribution — keeping_degseq","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/keeping_degseq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph rewiring while preserving the degree distribution — keeping_degseq","text":"","code":"g <- make_ring(10) g %>% rewire(keeping_degseq(niter = 20)) %>% degree() #> [1] 2 2 2 2 2 2 2 2 2 2 print_all(rewire(g, with = keeping_degseq(niter = vcount(g) * 10))) #> IGRAPH 9559920 U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + graph attributes: #> | + name: #> | [1] \"Ring graph\" #> | + mutual: #> | [1] FALSE #> | + circular: #> | [1] TRUE #> + edges from 9559920: #> [1] 2-- 8 3-- 7 6-- 9 4-- 5 5--10 1-- 7 6--10 2-- 3 4-- 9 1-- 8"},{"path":"https://r.igraph.org/reference/knn.html","id":null,"dir":"Reference","previous_headings":"","what":"Average nearest neighbor degree — knn","title":"Average nearest neighbor degree — knn","text":"Calculate average nearest neighbor degree given vertices quantity function vertex degree","code":""},{"path":"https://r.igraph.org/reference/knn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average nearest neighbor degree — knn","text":"","code":"knn( graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), neighbor.degree.mode = c(\"all\", \"out\", \"in\", \"total\"), weights = NULL )"},{"path":"https://r.igraph.org/reference/knn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average nearest neighbor degree — knn","text":"graph input graph. may directed. vids vertices calculation performed. Normally includes vertices. Note, vertices given , ‘knn’ ‘knnk’ calculated based given vertices . mode Character constant indicate type neighbors consider directed graphs. considers -neighbors, considers -neighbors ignores edge directions. neighbor.degree.mode type degree average directed graphs. averages -degrees, averages -degrees ignores edge directions degree calculation. weights Weight vector. graph weight edge attribute, used default. argument given, vertex strength (see strength()) used instead vertex degree. note knnk still given function normal vertex degree. Weights used calculate weighted degree (also called strength()) instead degree.","code":""},{"path":"https://r.igraph.org/reference/knn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average nearest neighbor degree — knn","text":"list two members: knn numeric vector giving average nearest neighbor degree vertices vids. knnk numeric vector, length maximum (total) vertex degree graph. first element average nearest neighbor degree vertices degree one, etc.","code":""},{"path":"https://r.igraph.org/reference/knn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Average nearest neighbor degree — knn","text":"Note zero degree vertices answer ‘knn’ NaN (zero divided zero), true ‘knnk’ given degree never appears network. weighted version computes weighted average neighbor degrees $$k_{nn,u} = \\frac{1}{s_u} \\sum_v w_{uv} k_v,$$ \\(s_u = \\sum_v w_{uv}\\) sum incident edge weights vertex u, .e. strength. sum runs neighbors v vertex u indicated mode. \\(w_{uv}\\) denotes weighted adjacency matrix \\(k_v\\) neighbors' degree, specified neighbor_degree_mode.","code":""},{"path":"https://r.igraph.org/reference/knn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Average nearest neighbor degree — knn","text":"Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras, Alessandro Vespignani: architecture complex weighted networks, Proc. Natl. Acad. Sci. USA 101, 3747 (2004)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/knn.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Average nearest neighbor degree — knn","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/knn.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Average nearest neighbor degree — knn","text":"igraph_avg_nearest_neighbor_degree().","code":""},{"path":"https://r.igraph.org/reference/knn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Average nearest neighbor degree — knn","text":"","code":"# Some trivial ones g <- make_ring(10) knn(g) #> $knn #> [1] 2 2 2 2 2 2 2 2 2 2 #> #> $knnk #> [1] NaN 2 #> g2 <- make_star(10) knn(g2) #> $knn #> [1] 1 9 9 9 9 9 9 9 9 9 #> #> $knnk #> [1] 9 NaN NaN NaN NaN NaN NaN NaN 1 #> # A scale-free one, try to plot 'knnk' g3 <- sample_pa(1000, m = 5) knn(g3) #> $knn #> [1] 14.926154 15.804348 13.437500 15.336700 16.507092 15.849817 #> [7] 25.950000 66.230769 16.280423 19.182432 24.094737 49.942857 #> [13] 190.285714 32.551724 25.250000 16.939394 63.368421 20.520000 #> [19] 69.045455 52.518519 263.400000 49.160000 63.428571 19.065217 #> [25] 88.266667 91.800000 44.638889 151.400000 21.871429 32.865385 #> [31] 57.400000 146.222222 110.666667 16.471429 78.933333 102.166667 #> [37] 29.595745 37.750000 43.633333 47.323529 60.550000 216.500000 #> [43] 76.200000 90.166667 32.964286 39.032258 56.954545 43.655172 #> [49] 40.628571 59.642857 48.965517 54.176471 68.066667 82.875000 #> [55] 107.600000 67.666667 68.428571 33.888889 52.166667 96.400000 #> [61] 101.937500 131.000000 255.400000 206.500000 136.200000 50.258065 #> [67] 51.125000 31.181818 41.526316 30.888889 138.250000 143.333333 #> [73] 42.354839 46.090909 57.800000 55.600000 29.416667 156.875000 #> [79] 187.333333 114.833333 119.714286 80.200000 94.000000 36.250000 #> [85] 59.200000 163.200000 115.583333 237.200000 92.777778 35.037037 #> [91] 63.600000 87.636364 48.900000 111.571429 86.500000 51.071429 #> [97] 251.400000 81.375000 184.000000 144.600000 73.000000 86.153846 #> [103] 45.818182 76.142857 127.888889 204.000000 268.000000 245.500000 #> [109] 109.800000 180.666667 111.000000 202.600000 221.333333 197.600000 #> [115] 88.000000 99.888889 186.666667 177.428571 182.400000 172.800000 #> [121] 172.000000 184.166667 106.153846 101.600000 120.142857 125.666667 #> [127] 170.000000 46.105263 79.666667 28.756757 123.166667 133.800000 #> [133] 77.062500 80.071429 148.750000 224.000000 163.875000 96.833333 #> [139] 64.733333 96.250000 74.214286 80.333333 213.500000 66.647059 #> [145] 30.875000 136.444444 34.444444 67.272727 23.307692 233.000000 #> [151] 113.200000 143.625000 89.272727 64.761905 84.000000 35.066667 #> [157] 94.500000 74.750000 84.000000 107.600000 98.375000 59.421053 #> [163] 185.200000 170.571429 207.666667 45.200000 171.571429 175.500000 #> [169] 60.714286 139.142857 75.714286 120.000000 139.777778 262.800000 #> [175] 59.090909 77.142857 175.800000 155.600000 83.400000 75.111111 #> [181] 116.300000 135.750000 156.125000 134.800000 61.833333 163.833333 #> [187] 82.888889 60.384615 59.700000 163.142857 137.285714 125.000000 #> [193] 105.142857 35.952381 171.400000 165.000000 65.947368 135.333333 #> [199] 57.428571 67.500000 248.200000 19.285714 161.000000 120.600000 #> [205] 151.857143 102.000000 235.000000 117.000000 116.714286 213.666667 #> [211] 127.142857 117.200000 224.400000 214.000000 97.000000 129.666667 #> [217] 40.777778 140.428571 113.222222 258.000000 124.200000 39.222222 #> [223] 156.000000 107.000000 83.100000 244.600000 102.800000 71.000000 #> [229] 176.400000 201.200000 192.400000 182.200000 125.200000 54.600000 #> [235] 44.800000 80.000000 117.000000 61.692308 32.800000 44.307692 #> [241] 135.666667 44.125000 171.000000 112.555556 83.000000 86.222222 #> [247] 135.000000 38.750000 52.600000 156.800000 65.000000 107.500000 #> [253] 84.090909 34.000000 113.833333 59.454545 125.500000 91.750000 #> [259] 90.800000 145.600000 128.000000 108.125000 57.400000 94.250000 #> [265] 99.875000 57.909091 54.142857 62.500000 55.555556 72.333333 #> [271] 95.285714 213.000000 128.625000 257.600000 125.666667 198.400000 #> [277] 76.625000 48.428571 105.200000 118.875000 78.400000 114.428571 #> [283] 121.000000 116.400000 96.142857 189.400000 170.000000 60.375000 #> [289] 254.000000 150.600000 162.000000 194.800000 122.666667 134.200000 #> [295] 115.833333 110.714286 217.800000 100.000000 134.714286 12.562500 #> [301] 159.000000 81.090909 66.285714 142.600000 113.400000 43.272727 #> [307] 143.000000 161.000000 64.166667 202.000000 60.166667 63.125000 #> [313] 123.500000 52.000000 177.000000 69.200000 138.800000 102.666667 #> [319] 153.333333 259.000000 64.750000 144.000000 52.000000 25.571429 #> [325] 91.000000 58.133333 110.800000 68.888889 158.400000 175.800000 #> [331] 104.875000 171.600000 155.857143 202.200000 151.200000 86.625000 #> [337] 99.285714 131.833333 190.800000 74.111111 136.166667 135.000000 #> [343] 88.857143 67.500000 168.285714 108.166667 70.857143 34.000000 #> [349] 103.600000 58.100000 91.833333 111.000000 57.000000 207.600000 #> [355] 140.200000 164.000000 90.166667 149.600000 87.500000 160.400000 #> [361] 186.000000 137.000000 204.000000 104.571429 121.800000 49.111111 #> [367] 36.714286 129.400000 116.800000 116.714286 51.571429 64.833333 #> [373] 129.400000 259.800000 110.714286 62.545455 248.400000 155.200000 #> [379] 204.666667 175.333333 145.000000 91.500000 151.000000 196.800000 #> [385] 101.400000 148.600000 124.857143 91.142857 200.400000 123.400000 #> [391] 150.200000 107.571429 97.333333 69.428571 105.000000 112.875000 #> [397] 187.500000 47.285714 97.666667 154.200000 143.166667 116.666667 #> [403] 106.400000 61.083333 67.571429 144.142857 101.400000 55.333333 #> [409] 99.000000 95.600000 167.166667 116.800000 43.200000 173.571429 #> [415] 102.200000 127.500000 186.833333 138.000000 87.000000 139.285714 #> [421] 172.800000 167.200000 136.000000 180.200000 131.333333 142.600000 #> [427] 131.800000 77.000000 165.428571 122.000000 138.333333 68.111111 #> [433] 59.600000 244.600000 181.600000 157.800000 75.571429 91.333333 #> [439] 65.875000 122.500000 140.000000 153.600000 150.800000 105.875000 #> [445] 66.000000 202.000000 86.750000 18.166667 129.000000 222.400000 #> [451] 196.600000 87.166667 120.200000 187.714286 87.714286 51.000000 #> [457] 214.000000 170.400000 132.200000 142.200000 121.200000 111.428571 #> [463] 192.000000 62.000000 107.400000 179.000000 118.750000 95.000000 #> [469] 116.400000 107.000000 124.500000 95.400000 204.800000 59.375000 #> [475] 121.800000 125.000000 86.250000 76.000000 144.800000 123.333333 #> [481] 70.615385 89.000000 112.200000 81.000000 232.600000 168.800000 #> [487] 144.285714 110.714286 103.285714 163.333333 179.800000 135.200000 #> [493] 111.333333 129.400000 109.714286 129.285714 226.800000 208.000000 #> [499] 127.833333 200.000000 44.833333 89.666667 157.600000 114.400000 #> [505] 50.333333 105.333333 161.500000 122.833333 143.200000 126.800000 #> [511] 169.800000 176.142857 123.600000 42.000000 75.400000 83.500000 #> [517] 150.800000 155.800000 192.000000 79.000000 92.200000 146.600000 #> [523] 77.200000 88.000000 218.800000 73.000000 165.666667 126.800000 #> [529] 87.800000 92.800000 60.250000 62.000000 151.200000 50.222222 #> [535] 99.857143 177.666667 127.800000 123.800000 192.600000 142.800000 #> [541] 102.400000 194.400000 89.000000 130.800000 150.000000 75.200000 #> [547] 100.600000 142.285714 243.800000 141.000000 143.500000 137.000000 #> [553] 121.600000 162.400000 129.500000 29.500000 78.666667 239.800000 #> [559] 41.428571 103.285714 126.600000 134.714286 178.800000 213.600000 #> [565] 52.888889 147.400000 102.600000 206.714286 124.000000 125.166667 #> [571] 134.200000 108.833333 205.800000 151.000000 139.500000 148.600000 #> [577] 158.000000 152.166667 237.400000 145.428571 110.142857 91.428571 #> [583] 147.000000 53.600000 164.200000 107.800000 147.400000 84.000000 #> [589] 147.666667 104.200000 74.625000 91.333333 183.800000 114.200000 #> [595] 163.500000 87.166667 50.600000 194.800000 31.800000 87.600000 #> [601] 144.000000 177.200000 170.800000 171.166667 252.800000 261.400000 #> [607] 196.600000 94.200000 122.600000 212.800000 113.200000 187.200000 #> [613] 140.000000 43.800000 114.500000 272.400000 160.800000 129.285714 #> [619] 192.166667 118.200000 141.800000 130.000000 217.800000 210.600000 #> [625] 79.333333 54.000000 137.600000 167.000000 122.000000 121.285714 #> [631] 155.000000 175.800000 238.200000 76.200000 98.800000 121.400000 #> [637] 187.600000 137.600000 130.200000 104.166667 106.400000 15.400000 #> [643] 271.800000 217.600000 146.000000 64.142857 79.400000 157.000000 #> [649] 117.400000 234.200000 56.600000 147.200000 115.800000 199.000000 #> [655] 43.800000 95.571429 183.285714 18.833333 147.000000 38.800000 #> [661] 249.400000 75.800000 177.600000 157.666667 159.600000 137.125000 #> [667] 109.285714 74.600000 237.333333 30.000000 147.000000 63.600000 #> [673] 65.800000 118.800000 128.500000 139.600000 215.000000 116.666667 #> [679] 17.800000 204.800000 43.333333 135.500000 118.600000 146.800000 #> [685] 122.625000 102.000000 194.000000 141.400000 220.400000 205.800000 #> [691] 122.000000 201.200000 28.571429 89.800000 207.200000 93.777778 #> [697] 140.000000 118.833333 77.428571 119.800000 189.600000 146.666667 #> [703] 62.000000 45.000000 40.200000 67.600000 148.800000 68.000000 #> [709] 60.500000 201.000000 128.166667 158.000000 87.166667 168.000000 #> [715] 27.400000 13.800000 126.714286 72.833333 94.600000 158.000000 #> [721] 140.800000 205.200000 202.600000 216.200000 113.333333 184.333333 #> [727] 140.200000 64.000000 69.833333 112.500000 74.400000 157.400000 #> [733] 167.000000 85.500000 84.714286 28.000000 106.600000 166.833333 #> [739] 105.000000 14.400000 155.400000 215.000000 72.200000 133.200000 #> [745] 81.800000 117.200000 91.400000 80.000000 117.666667 119.800000 #> [751] 103.200000 145.400000 118.800000 144.200000 245.400000 52.000000 #> [757] 13.600000 143.800000 138.000000 94.600000 158.200000 207.200000 #> [763] 167.000000 104.200000 75.833333 99.800000 150.600000 242.600000 #> [769] 114.000000 114.714286 65.400000 53.000000 111.200000 173.333333 #> [775] 52.000000 74.800000 109.000000 73.500000 145.000000 62.000000 #> [781] 150.600000 245.000000 59.000000 98.000000 169.200000 64.200000 #> [787] 78.333333 167.400000 170.666667 170.200000 174.200000 176.400000 #> [793] 104.000000 126.200000 41.400000 148.800000 147.400000 93.000000 #> [799] 188.800000 105.600000 80.200000 194.200000 85.200000 126.200000 #> [805] 28.800000 160.800000 74.000000 50.800000 54.333333 98.166667 #> [811] 178.000000 42.000000 70.666667 141.200000 252.000000 311.000000 #> [817] 19.800000 11.333333 143.600000 201.000000 175.600000 143.166667 #> [823] 219.800000 248.800000 129.200000 111.200000 219.400000 113.800000 #> [829] 34.200000 85.333333 149.800000 118.200000 186.400000 177.600000 #> [835] 124.200000 172.800000 184.000000 101.200000 114.000000 15.000000 #> [841] 120.600000 93.400000 170.200000 82.200000 99.800000 186.800000 #> [847] 29.000000 53.000000 174.000000 48.600000 87.800000 185.166667 #> [853] 9.857143 174.000000 83.800000 110.800000 166.400000 123.333333 #> [859] 141.600000 71.200000 174.800000 133.600000 149.000000 215.600000 #> [865] 136.166667 128.600000 124.200000 100.800000 254.200000 50.600000 #> [871] 158.600000 97.000000 174.000000 174.200000 143.000000 20.400000 #> [877] 124.400000 32.000000 92.800000 105.400000 80.600000 34.166667 #> [883] 99.400000 61.400000 146.400000 204.000000 71.000000 101.000000 #> [889] 121.000000 20.800000 191.400000 119.600000 35.800000 70.800000 #> [895] 122.200000 126.000000 70.800000 120.200000 85.000000 122.600000 #> [901] 79.800000 221.600000 34.600000 68.666667 157.600000 70.000000 #> [907] 84.400000 28.600000 109.800000 146.800000 64.800000 141.800000 #> [913] 61.000000 246.200000 174.600000 112.200000 103.200000 138.800000 #> [919] 109.600000 83.600000 71.000000 121.000000 156.600000 112.400000 #> [925] 196.600000 136.600000 202.600000 104.833333 131.200000 220.400000 #> [931] 97.400000 151.600000 87.400000 194.000000 174.600000 84.000000 #> [937] 51.800000 194.200000 93.400000 184.600000 117.666667 222.600000 #> [943] 138.800000 99.400000 221.400000 87.000000 134.400000 144.200000 #> [949] 52.000000 189.200000 185.800000 122.200000 109.285714 127.600000 #> [955] 78.600000 27.400000 218.400000 22.400000 119.200000 175.400000 #> [961] 93.800000 80.200000 120.000000 135.400000 89.400000 84.400000 #> [967] 63.600000 80.200000 105.833333 25.400000 212.600000 140.000000 #> [973] 184.000000 270.600000 163.000000 233.600000 183.200000 201.000000 #> [979] 156.200000 16.800000 104.000000 102.800000 158.400000 39.600000 #> [985] 89.600000 65.000000 142.600000 22.166667 65.400000 157.600000 #> [991] 209.800000 135.800000 118.200000 71.200000 122.800000 8.200000 #> [997] 81.200000 53.000000 74.000000 104.600000 #> #> $knnk #> [1] NaN NaN NaN NaN 137.53050 123.76667 108.61516 #> [8] 99.74219 85.68199 85.30000 65.78788 73.07292 65.70192 69.49107 #> [15] 70.68889 60.76250 60.41176 59.91667 55.27368 55.01667 54.71429 #> [22] 50.81818 NaN 51.12500 49.16000 66.23077 38.08333 35.65476 #> [29] 46.31034 50.51667 43.88172 NaN NaN 47.32353 45.28571 #> [36] 44.63889 28.75676 NaN NaN NaN NaN NaN #> [43] NaN NaN NaN NaN 29.59574 NaN NaN #> [50] NaN NaN 32.86538 NaN NaN NaN NaN #> [57] NaN 32.55172 NaN NaN NaN NaN NaN #> [64] NaN NaN NaN NaN NaN NaN 21.87143 #> [71] NaN NaN NaN NaN NaN NaN NaN #> [78] NaN NaN 25.95000 NaN NaN NaN 25.25000 #> [85] NaN NaN NaN NaN NaN NaN NaN #> [92] 19.06522 NaN NaN 24.09474 NaN NaN NaN #> [99] NaN 20.52000 NaN NaN NaN NaN NaN #> [106] NaN NaN NaN NaN NaN NaN NaN #> [113] NaN NaN NaN NaN NaN NaN NaN #> [120] NaN NaN NaN NaN NaN NaN NaN #> [127] NaN NaN NaN NaN NaN 16.93939 NaN #> [134] NaN NaN NaN NaN NaN NaN 16.47143 #> [141] NaN NaN NaN NaN NaN NaN NaN #> [148] 19.18243 NaN NaN NaN NaN NaN NaN #> [155] NaN NaN NaN NaN NaN NaN NaN #> [162] NaN NaN NaN NaN NaN NaN NaN #> [169] NaN NaN NaN NaN NaN NaN NaN #> [176] NaN NaN NaN NaN NaN NaN NaN #> [183] NaN NaN NaN NaN NaN NaN 16.28042 #> [190] NaN NaN NaN NaN NaN NaN NaN #> [197] NaN NaN NaN NaN NaN NaN NaN #> [204] NaN NaN NaN NaN NaN NaN NaN #> [211] NaN NaN NaN NaN NaN NaN NaN #> [218] NaN NaN NaN NaN NaN NaN NaN #> [225] NaN NaN NaN NaN NaN NaN NaN #> [232] NaN NaN NaN NaN NaN NaN NaN #> [239] NaN NaN NaN NaN NaN NaN NaN #> [246] NaN NaN NaN NaN NaN NaN NaN #> [253] NaN NaN NaN NaN NaN NaN NaN #> [260] NaN NaN NaN NaN NaN NaN NaN #> [267] NaN NaN NaN NaN NaN NaN 15.84982 #> [274] NaN NaN 15.80435 NaN NaN NaN NaN #> [281] NaN 16.50709 NaN NaN NaN NaN NaN #> [288] NaN NaN NaN NaN NaN NaN NaN #> [295] NaN NaN 15.33670 NaN NaN NaN NaN #> [302] NaN NaN NaN NaN NaN NaN NaN #> [309] NaN NaN NaN NaN NaN NaN NaN #> [316] NaN NaN NaN NaN NaN NaN NaN #> [323] NaN NaN 14.92615 NaN NaN NaN NaN #> [330] NaN NaN NaN NaN NaN NaN NaN #> [337] NaN NaN NaN NaN NaN NaN NaN #> [344] NaN NaN NaN NaN NaN NaN NaN #> [351] NaN NaN NaN NaN NaN NaN NaN #> [358] NaN NaN NaN NaN NaN NaN NaN #> [365] NaN NaN NaN NaN NaN NaN NaN #> [372] NaN NaN NaN NaN NaN NaN NaN #> [379] NaN NaN NaN NaN NaN 13.43750 #> # A random graph g4 <- sample_gnp(1000, p = 5 / 1000) knn(g4) #> $knn #> [1] 10.000000 4.750000 6.250000 4.600000 5.666667 6.800000 5.888889 #> [8] 4.500000 4.600000 5.166667 6.428571 8.500000 8.000000 6.200000 #> [15] 8.000000 4.000000 5.250000 3.000000 6.500000 6.333333 9.666667 #> [22] 7.833333 6.000000 6.000000 6.444444 6.500000 5.285714 4.250000 #> [29] 9.000000 5.500000 5.454545 5.625000 5.500000 5.000000 7.000000 #> [36] 6.500000 6.666667 6.200000 5.900000 6.000000 6.500000 6.000000 #> [43] 5.000000 7.500000 6.500000 5.625000 7.000000 5.142857 4.333333 #> [50] 3.500000 6.375000 5.500000 7.000000 7.600000 7.750000 5.666667 #> [57] 6.000000 5.833333 7.250000 6.666667 6.000000 6.666667 6.750000 #> [64] 5.700000 6.555556 6.000000 6.333333 6.666667 5.500000 6.222222 #> [71] 7.000000 6.500000 5.500000 5.000000 5.800000 4.625000 6.600000 #> [78] 6.400000 7.400000 7.200000 4.600000 5.571429 7.000000 5.857143 #> [85] 6.250000 4.400000 7.000000 5.500000 6.000000 5.500000 7.000000 #> [92] 7.000000 3.750000 5.000000 6.000000 5.000000 6.714286 7.000000 #> [99] 9.400000 5.857143 7.000000 6.333333 6.000000 6.750000 5.000000 #> [106] 6.833333 6.800000 4.750000 5.500000 5.666667 9.000000 6.428571 #> [113] 5.750000 5.000000 6.000000 5.500000 8.833333 6.000000 3.833333 #> [120] 5.750000 4.250000 6.500000 7.000000 6.250000 5.000000 5.400000 #> [127] 5.800000 9.500000 7.333333 5.714286 6.200000 6.400000 6.333333 #> [134] 5.857143 7.142857 6.666667 5.400000 6.000000 6.714286 4.333333 #> [141] 7.000000 6.142857 5.555556 5.818182 4.600000 6.833333 2.000000 #> [148] 4.600000 3.000000 5.625000 6.000000 4.500000 4.000000 4.750000 #> [155] 6.200000 7.000000 5.000000 5.500000 5.500000 5.400000 6.571429 #> [162] 8.800000 6.000000 6.666667 7.000000 5.000000 9.500000 6.000000 #> [169] 6.500000 7.000000 8.000000 7.200000 5.666667 6.714286 4.666667 #> [176] 4.000000 5.600000 5.666667 4.000000 6.600000 7.600000 5.857143 #> [183] 4.000000 7.000000 6.000000 6.500000 4.857143 10.000000 7.500000 #> [190] 7.500000 6.000000 5.375000 7.000000 7.000000 6.000000 5.666667 #> [197] 5.333333 7.166667 7.000000 5.800000 5.000000 6.000000 5.000000 #> [204] 6.857143 3.666667 5.500000 5.750000 4.250000 6.750000 7.333333 #> [211] 5.000000 4.000000 7.000000 3.500000 5.333333 6.750000 6.500000 #> [218] 5.800000 6.500000 5.714286 5.333333 8.000000 6.272727 6.750000 #> [225] 4.666667 6.833333 6.400000 6.800000 4.500000 6.000000 8.333333 #> [232] 6.777778 5.000000 6.400000 6.000000 5.000000 7.400000 4.500000 #> [239] 5.500000 7.000000 6.666667 6.250000 7.250000 4.833333 6.666667 #> [246] 7.250000 4.500000 6.000000 6.428571 7.000000 6.600000 4.333333 #> [253] 6.750000 6.750000 6.636364 6.600000 6.900000 6.142857 4.500000 #> [260] 5.200000 6.000000 5.142857 5.666667 8.333333 8.250000 6.250000 #> [267] 6.333333 5.857143 5.500000 6.500000 6.000000 6.833333 7.833333 #> [274] 5.100000 7.000000 5.000000 6.250000 6.800000 5.375000 5.500000 #> [281] 6.000000 7.750000 7.500000 6.400000 6.000000 6.666667 6.000000 #> [288] 4.400000 4.800000 4.666667 4.250000 6.500000 5.875000 5.750000 #> [295] 6.666667 8.600000 6.200000 6.333333 5.500000 7.000000 7.000000 #> [302] 6.000000 6.750000 4.666667 6.000000 6.000000 8.000000 7.500000 #> [309] 6.666667 6.000000 7.400000 6.800000 5.166667 5.000000 6.636364 #> [316] 5.714286 6.000000 7.400000 5.800000 7.750000 5.285714 6.900000 #> [323] 5.571429 5.500000 5.600000 4.500000 6.142857 7.833333 7.400000 #> [330] 6.000000 6.375000 4.909091 7.000000 7.285714 7.166667 6.000000 #> [337] 6.142857 5.166667 8.333333 6.400000 5.857143 6.250000 7.000000 #> [344] 6.857143 6.200000 7.400000 6.500000 3.500000 6.200000 5.250000 #> [351] 5.000000 4.166667 4.500000 6.000000 5.333333 4.000000 6.333333 #> [358] 6.200000 6.555556 6.400000 5.166667 6.400000 6.500000 6.200000 #> [365] 5.000000 6.166667 5.750000 9.333333 7.000000 5.666667 6.142857 #> [372] 7.250000 7.166667 6.111111 5.888889 5.857143 3.666667 5.555556 #> [379] 4.000000 5.111111 7.000000 5.375000 6.750000 5.875000 6.285714 #> [386] 6.250000 6.166667 6.888889 5.500000 5.400000 5.333333 4.000000 #> [393] 6.666667 4.600000 3.250000 5.600000 9.000000 3.800000 7.000000 #> [400] 5.333333 6.333333 7.000000 5.857143 6.333333 6.428571 9.000000 #> [407] 6.500000 4.428571 7.111111 5.000000 5.500000 5.875000 5.666667 #> [414] 7.250000 6.000000 5.714286 6.111111 2.666667 5.727273 3.500000 #> [421] 5.833333 6.333333 4.000000 6.666667 7.000000 5.000000 6.500000 #> [428] 4.333333 6.545455 7.000000 3.000000 6.285714 6.333333 7.500000 #> [435] 5.500000 4.200000 4.500000 4.500000 4.400000 6.250000 5.166667 #> [442] 6.000000 5.714286 7.333333 8.500000 7.200000 6.500000 5.666667 #> [449] 5.666667 6.000000 7.500000 5.500000 6.285714 5.666667 7.200000 #> [456] 4.000000 4.000000 5.375000 6.000000 8.333333 5.200000 6.000000 #> [463] 7.666667 5.000000 7.000000 5.125000 5.000000 7.571429 7.000000 #> [470] 5.000000 4.500000 5.250000 6.333333 6.250000 5.875000 6.750000 #> [477] 6.000000 7.333333 7.600000 9.000000 6.142857 5.200000 6.600000 #> [484] 5.000000 6.666667 7.250000 5.500000 4.000000 7.000000 5.600000 #> [491] 7.000000 7.500000 6.555556 4.250000 6.300000 6.750000 5.375000 #> [498] 5.833333 5.142857 5.400000 5.400000 6.571429 4.800000 5.800000 #> [505] 6.800000 6.000000 6.000000 9.000000 7.500000 4.250000 7.000000 #> [512] 6.000000 6.000000 5.400000 4.750000 4.333333 4.666667 4.000000 #> [519] 5.833333 6.500000 6.000000 6.500000 5.833333 6.666667 6.333333 #> [526] 5.333333 6.000000 5.250000 5.636364 6.250000 8.500000 7.500000 #> [533] 6.000000 5.666667 5.800000 3.500000 4.333333 5.900000 6.666667 #> [540] 4.666667 6.666667 8.250000 7.666667 5.200000 4.333333 5.666667 #> [547] 5.500000 5.000000 7.100000 5.083333 3.000000 6.000000 8.250000 #> [554] 7.400000 5.666667 6.250000 5.666667 6.166667 5.900000 NaN #> [561] 4.000000 5.500000 6.000000 6.750000 4.857143 7.500000 NaN #> [568] 5.000000 6.666667 6.900000 6.000000 4.500000 5.750000 5.500000 #> [575] 7.285714 5.200000 6.000000 5.666667 5.500000 7.333333 6.333333 #> [582] 6.500000 8.714286 5.600000 7.250000 5.400000 4.500000 5.666667 #> [589] 6.000000 7.500000 7.666667 5.800000 7.222222 5.166667 6.000000 #> [596] 5.625000 6.125000 5.500000 7.545455 9.000000 4.200000 4.500000 #> [603] 7.200000 4.400000 6.285714 4.500000 5.400000 5.000000 6.333333 #> [610] 6.888889 6.000000 6.250000 4.000000 4.833333 5.500000 4.666667 #> [617] 4.750000 6.500000 6.333333 4.250000 6.200000 7.166667 5.500000 #> [624] 6.333333 4.875000 5.500000 5.285714 5.833333 7.250000 5.833333 #> [631] 5.900000 5.750000 5.083333 5.500000 6.750000 4.666667 4.500000 #> [638] 6.750000 6.000000 8.200000 6.200000 5.200000 7.833333 4.333333 #> [645] 6.714286 6.125000 6.400000 6.000000 6.666667 6.800000 4.857143 #> [652] 6.800000 5.333333 6.600000 5.166667 5.666667 4.000000 8.000000 #> [659] 6.250000 3.000000 6.333333 5.000000 5.500000 5.166667 4.833333 #> [666] 12.000000 6.125000 5.818182 4.500000 7.166667 5.000000 6.500000 #> [673] 6.600000 6.142857 4.000000 4.000000 8.333333 6.250000 6.125000 #> [680] 7.166667 7.000000 5.400000 5.800000 5.800000 6.000000 5.333333 #> [687] 7.750000 4.500000 8.500000 5.666667 5.000000 4.800000 5.800000 #> [694] 7.500000 8.333333 5.500000 6.500000 7.666667 5.000000 6.125000 #> [701] 7.500000 5.800000 4.800000 5.833333 7.000000 5.600000 6.600000 #> [708] 6.571429 7.142857 7.375000 8.000000 5.666667 6.000000 5.666667 #> [715] 5.166667 6.875000 6.500000 6.571429 6.600000 5.500000 5.000000 #> [722] 7.333333 5.375000 5.500000 5.600000 5.857143 7.142857 7.200000 #> [729] 6.500000 5.600000 6.600000 3.666667 6.250000 5.333333 5.928571 #> [736] 6.571429 8.200000 6.400000 4.500000 8.000000 5.111111 6.400000 #> [743] 7.166667 9.000000 4.250000 5.166667 4.500000 6.600000 5.625000 #> [750] 5.500000 5.333333 5.500000 5.428571 5.100000 5.600000 7.000000 #> [757] 7.750000 4.000000 7.500000 6.200000 8.000000 5.000000 6.000000 #> [764] 6.000000 6.750000 3.600000 4.571429 5.500000 5.000000 6.333333 #> [771] 4.333333 6.666667 5.600000 4.250000 6.000000 6.777778 7.000000 #> [778] 6.000000 5.000000 6.200000 6.400000 5.111111 6.857143 7.750000 #> [785] 5.571429 6.142857 7.666667 6.400000 5.833333 6.500000 5.571429 #> [792] 4.333333 7.750000 8.000000 7.000000 5.666667 5.285714 6.200000 #> [799] 5.800000 5.600000 7.600000 6.600000 8.250000 5.666667 7.666667 #> [806] 8.000000 5.250000 6.000000 5.750000 7.000000 5.750000 4.000000 #> [813] 6.666667 7.000000 5.000000 8.333333 5.250000 5.000000 5.833333 #> [820] 5.666667 6.500000 5.250000 7.666667 4.600000 5.500000 6.250000 #> [827] 5.666667 6.500000 7.000000 5.750000 6.285714 7.000000 5.000000 #> [834] 8.333333 6.166667 8.714286 6.375000 4.375000 5.500000 6.714286 #> [841] 4.333333 7.250000 6.750000 6.750000 7.222222 6.833333 8.000000 #> [848] 8.500000 6.333333 4.500000 5.200000 5.200000 5.666667 5.666667 #> [855] 7.000000 4.200000 6.111111 6.000000 7.750000 5.400000 4.000000 #> [862] 6.750000 9.000000 4.000000 5.000000 6.000000 5.833333 4.375000 #> [869] 6.000000 4.500000 5.857143 4.200000 6.500000 5.666667 5.857143 #> [876] 6.000000 5.500000 5.400000 7.000000 5.500000 6.857143 6.142857 #> [883] 7.285714 4.750000 5.600000 5.250000 5.750000 6.000000 6.333333 #> [890] 5.200000 5.500000 8.400000 5.800000 5.400000 5.333333 8.400000 #> [897] 4.500000 6.166667 6.750000 6.111111 6.750000 6.500000 6.333333 #> [904] 6.500000 9.000000 5.600000 7.500000 5.833333 6.000000 5.000000 #> [911] 6.125000 6.250000 6.333333 6.750000 6.333333 6.166667 7.000000 #> [918] 5.625000 5.400000 6.400000 5.500000 6.000000 5.857143 6.000000 #> [925] 7.333333 4.500000 6.000000 5.000000 6.428571 6.000000 6.500000 #> [932] 5.222222 7.600000 6.875000 6.875000 6.333333 7.750000 3.333333 #> [939] 6.666667 4.750000 4.800000 5.250000 8.500000 6.125000 6.285714 #> [946] 7.000000 5.000000 3.000000 8.333333 6.500000 5.750000 6.333333 #> [953] 4.600000 5.333333 4.000000 5.333333 6.000000 6.166667 3.000000 #> [960] 8.400000 4.571429 6.200000 5.000000 5.800000 6.500000 5.000000 #> [967] 5.600000 5.800000 7.000000 6.166667 7.750000 5.833333 5.444444 #> [974] 4.600000 7.600000 5.833333 5.857143 7.250000 8.000000 4.750000 #> [981] 7.000000 6.333333 6.200000 6.571429 4.500000 6.000000 5.571429 #> [988] 5.000000 4.500000 5.666667 5.000000 2.500000 6.400000 6.500000 #> [995] 6.800000 3.000000 7.250000 6.625000 6.500000 7.500000 #> #> $knnk #> [1] 5.625000 6.064706 5.994792 6.056452 6.114754 6.103571 6.128571 5.971429 #> [9] 6.033951 5.977273 6.000000 5.666667 NaN 5.928571 #> # A weighted graph g5 <- make_star(10) E(g5)$weight <- seq(ecount(g5)) knn(g5) #> $knn #> [1] 1 9 9 9 9 9 9 9 9 9 #> #> $knnk #> [1] 9 NaN NaN NaN NaN NaN NaN NaN 1 #>"},{"path":"https://r.igraph.org/reference/label.propagation.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding communities based on propagating labels — label.propagation.community","title":"Finding communities based on propagating labels — label.propagation.community","text":"label.propagation.community() renamed cluster_label_prop() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/label.propagation.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding communities based on propagating labels — label.propagation.community","text":"","code":"label.propagation.community( graph, weights = NULL, ..., mode = c(\"out\", \"in\", \"all\"), initial = NULL, fixed = NULL )"},{"path":"https://r.igraph.org/reference/label.propagation.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding communities based on propagating labels — label.propagation.community","text":"graph input graph. Note algorithm wsa originally defined undirected graphs. advised set ‘mode’ pass directed graph treat undirected. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. ... dots future extensions must empty. mode Logical, whether consider edge directions label propagation, , direction labels propagate. Ignored undirected graphs. \"\" means ignore edge directions (even directed graphs). \"\" means propagate labels along natural direction edges. \"\" means propagate labels backwards (.e. head tail). initial initial state. NULL, every vertex different label beginning. Otherwise must vector entry vertex. Non-negative values denote different labels, negative entries denote vertices without labels. fixed Logical vector denoting labels fixed. course makes sense provided initial state, otherwise element ignored. Also note vertices without labels fixed.","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph Laplacian — laplacian_matrix","title":"Graph Laplacian — laplacian_matrix","text":"Laplacian graph.","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph Laplacian — laplacian_matrix","text":"","code":"laplacian_matrix( graph, weights = NULL, sparse = igraph_opt(\"sparsematrices\"), normalization = c(\"unnormalized\", \"symmetric\", \"left\", \"right\"), normalized )"},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph Laplacian — laplacian_matrix","text":"graph input graph. weights optional vector giving edge weights weighted Laplacian matrix. NULL graph edge attribute called weight, used automatically. Set NA want unweighted Laplacian graph weight edge attribute. sparse Logical scalar, whether return result sparse matrix. Matrix package required sparse matrices. normalization normalization method use calculating Laplacian matrix. See \"Normalization methods\" section page. normalized Deprecated, use normalization instead.","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph Laplacian — laplacian_matrix","text":"numeric matrix.","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph Laplacian — laplacian_matrix","text":"Laplacian Matrix graph symmetric matrix number rows columns number vertices graph element (,j) d[], degree vertex ==j, -1 !=j edge vertices j 0 otherwise. Laplacian matrix can also normalized, several conventional normalization methods. See \"Normalization methods\" section page. weighted version Laplacian simply works weighted degree instead plain degree. .e. (,j) d[], weighted degree vertex ==j, -w !=j edge vertices j weight w, 0 otherwise. weighted degree vertex sum weights adjacent edges.","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"normalization-methods","dir":"Reference","previous_headings":"","what":"Normalization methods","title":"Graph Laplacian — laplacian_matrix","text":"Laplacian matrix \\(L\\) defined terms adjacency matrix \\(\\) diagonal matrix \\(D\\) containing degrees follows: \"unnormalized\": Unnormalized Laplacian, \\(L = D - \\). \"symmetric\": Symmetrically normalized Laplacian, \\(L = - D^{-\\frac{1}{2}} D^{-\\frac{1}{2}}\\). \"left\": Left-stochastic normalized Laplacian, \\({L = - D^{-1} }\\). \"rigth\": Right-stochastic normalized Laplacian, \\(L = - D^{-1}\\).","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph Laplacian — laplacian_matrix","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Graph Laplacian — laplacian_matrix","text":"igraph_get_laplacian_sparse(), igraph_get_laplacian().","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph Laplacian — laplacian_matrix","text":"","code":"g <- make_ring(10) laplacian_matrix(g) #> 10 x 10 sparse Matrix of class \"dgCMatrix\" #> #> [1,] 2 -1 . . . . . . . -1 #> [2,] -1 2 -1 . . . . . . . #> [3,] . -1 2 -1 . . . . . . #> [4,] . . -1 2 -1 . . . . . #> [5,] . . . -1 2 -1 . . . . #> [6,] . . . . -1 2 -1 . . . #> [7,] . . . . . -1 2 -1 . . #> [8,] . . . . . . -1 2 -1 . #> [9,] . . . . . . . -1 2 -1 #> [10,] -1 . . . . . . . -1 2 laplacian_matrix(g, normalization = \"unnormalized\") #> 10 x 10 sparse Matrix of class \"dgCMatrix\" #> #> [1,] 2 -1 . . . . . . . -1 #> [2,] -1 2 -1 . . . . . . . #> [3,] . -1 2 -1 . . . . . . #> [4,] . . -1 2 -1 . . . . . #> [5,] . . . -1 2 -1 . . . . #> [6,] . . . . -1 2 -1 . . . #> [7,] . . . . . -1 2 -1 . . #> [8,] . . . . . . -1 2 -1 . #> [9,] . . . . . . . -1 2 -1 #> [10,] -1 . . . . . . . -1 2 laplacian_matrix(g, normalization = \"unnormalized\", sparse = FALSE) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> [1,] 2 -1 0 0 0 0 0 0 0 -1 #> [2,] -1 2 -1 0 0 0 0 0 0 0 #> [3,] 0 -1 2 -1 0 0 0 0 0 0 #> [4,] 0 0 -1 2 -1 0 0 0 0 0 #> [5,] 0 0 0 -1 2 -1 0 0 0 0 #> [6,] 0 0 0 0 -1 2 -1 0 0 0 #> [7,] 0 0 0 0 0 -1 2 -1 0 0 #> [8,] 0 0 0 0 0 0 -1 2 -1 0 #> [9,] 0 0 0 0 0 0 0 -1 2 -1 #> [10,] -1 0 0 0 0 0 0 0 -1 2"},{"path":"https://r.igraph.org/reference/largest.cliques.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to find cliques, i.e. complete subgraphs in a graph — largest.cliques","title":"Functions to find cliques, i.e. complete subgraphs in a graph — largest.cliques","text":"largest.cliques() renamed largest_cliques() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/largest.cliques.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to find cliques, i.e. complete subgraphs in a graph — largest.cliques","text":"","code":"largest.cliques(graph)"},{"path":"https://r.igraph.org/reference/largest.cliques.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to find cliques, i.e. complete subgraphs in a graph — largest.cliques","text":"graph input graph, directed graphs considered undirected ones, multiple edges loops ignored.","code":""},{"path":"https://r.igraph.org/reference/largest.independent.vertex.sets.html","id":null,"dir":"Reference","previous_headings":"","what":"Independent vertex sets — largest.independent.vertex.sets","title":"Independent vertex sets — largest.independent.vertex.sets","text":"largest.independent.vertex.sets() renamed largest_ivs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/largest.independent.vertex.sets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Independent vertex sets — largest.independent.vertex.sets","text":"","code":"largest.independent.vertex.sets(graph)"},{"path":"https://r.igraph.org/reference/largest.independent.vertex.sets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Independent vertex sets — largest.independent.vertex.sets","text":"graph input graph, directed graphs considered undirected, loop edges multiple edges ignored.","code":""},{"path":"https://r.igraph.org/reference/lastcit.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Random citation graphs — lastcit.game","title":"Random citation graphs — lastcit.game","text":"lastcit.game() renamed sample_last_cit() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/lastcit.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random citation graphs — lastcit.game","text":"","code":"lastcit.game( n, edges = 1, agebins = n/7100, pref = (1:(agebins + 1))^-3, directed = TRUE )"},{"path":"https://r.igraph.org/reference/lastcit.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random citation graphs — lastcit.game","text":"n Number vertices. edges Number edges per step. agebins Number aging bins. pref Vector (sample_last_cit() sample_cit_types() matrix (sample_cit_cit_types()) giving (unnormalized) citation probabilities different vertex types. directed Logical scalar, whether generate directed networks.","code":""},{"path":"https://r.igraph.org/reference/layout.auto.html","id":null,"dir":"Reference","previous_headings":"","what":"Choose an appropriate graph layout algorithm automatically — layout.auto","title":"Choose an appropriate graph layout algorithm automatically — layout.auto","text":"layout.auto() renamed layout_nicely() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.auto.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Choose an appropriate graph layout algorithm automatically — layout.auto","text":"","code":"layout.auto(graph, dim = 2, ...)"},{"path":"https://r.igraph.org/reference/layout.auto.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Choose an appropriate graph layout algorithm automatically — layout.auto","text":"graph input graph dim Dimensions, 2 3. ... layout_nicely() extra arguments passed real layout function. nicely() argument passed layout_nicely().","code":""},{"path":"https://r.igraph.org/reference/layout.bipartite.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple two-row layout for bipartite graphs — layout.bipartite","title":"Simple two-row layout for bipartite graphs — layout.bipartite","text":"layout.bipartite() renamed layout_as_bipartite() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.bipartite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple two-row layout for bipartite graphs — layout.bipartite","text":"","code":"layout.bipartite(graph, types = NULL, hgap = 1, vgap = 1, maxiter = 100)"},{"path":"https://r.igraph.org/reference/layout.bipartite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple two-row layout for bipartite graphs — layout.bipartite","text":"graph bipartite input graph. logical ‘type’ vertex attribute, types argument must given. types logical vector, vertex types. argument NULL (default), ‘type’ vertex attribute used. hgap Real scalar, minimum horizontal gap vertices layer. vgap Real scalar, distance two layers. maxiter Integer scalar, maximum number iterations crossing minimization stage. 100 reasonable default; feel many edge crossings, increase .","code":""},{"path":"https://r.igraph.org/reference/layout.circle.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph layout with vertices on a circle — layout.circle","title":"Graph layout with vertices on a circle — layout.circle","text":"layout.circle() renamed layout_in_circle() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.circle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph layout with vertices on a circle — layout.circle","text":"","code":"layout.circle(..., params = list())"},{"path":"https://r.igraph.org/reference/layout.circle.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph layout with vertices on a circle — layout.circle","text":"... Passed new layout functions. params Passed new layout functions arguments.","code":""},{"path":"https://r.igraph.org/reference/layout.davidson.harel.html","id":null,"dir":"Reference","previous_headings":"","what":"The Davidson-Harel layout algorithm — layout.davidson.harel","title":"The Davidson-Harel layout algorithm — layout.davidson.harel","text":"layout.davidson.harel() renamed layout_with_dh() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.davidson.harel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Davidson-Harel layout algorithm — layout.davidson.harel","text":"","code":"layout.davidson.harel( graph, coords = NULL, maxiter = 10, fineiter = max(10, log2(vcount(graph))), cool.fact = 0.75, weight.node.dist = 1, weight.border = 0, weight.edge.lengths = edge_density(graph)/10, weight.edge.crossings = 1 - sqrt(edge_density(graph)), weight.node.edge.dist = 0.2 * (1 - edge_density(graph)) )"},{"path":"https://r.igraph.org/reference/layout.davidson.harel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Davidson-Harel layout algorithm — layout.davidson.harel","text":"graph graph lay . Edge directions ignored. coords Optional starting positions vertices. argument NULL appropriate matrix starting coordinates. maxiter Number iterations perform first phase. fineiter Number iterations fine tuning phase. cool.fact Cooling factor. weight.node.dist Weight node-node distances component energy function. weight.border Weight distance border component energy function. can set zero, vertices allowed sit border. weight.edge.lengths Weight edge length component energy function. weight.edge.crossings Weight edge crossing component energy function. weight.node.edge.dist Weight node-edge distance component energy function.","code":""},{"path":"https://r.igraph.org/reference/layout.drl.html","id":null,"dir":"Reference","previous_headings":"","what":"The DrL graph layout generator — layout.drl","title":"The DrL graph layout generator — layout.drl","text":"layout.drl() renamed layout_with_drl() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.drl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The DrL graph layout generator — layout.drl","text":"","code":"layout.drl( graph, use.seed = FALSE, seed = matrix(runif(vcount(graph) * 2), ncol = 2), options = drl_defaults$default, weights = NULL, dim = 2 )"},{"path":"https://r.igraph.org/reference/layout.drl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The DrL graph layout generator — layout.drl","text":"graph input graph, can directed undirected. use.seed Logical scalar, whether use coordinates given seed argument starting point. seed matrix two columns, starting coordinates vertices use.seed TRUE. ignored otherwise. options Options layout generator, named list. See details . weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use layout. Larger edge weights correspond stronger connections. dim Either ‘2’ ‘3’, specifies whether want two dimensional three dimensional layout. Note nature DrL algorithm, three dimensional layout takes significantly longer compute.","code":""},{"path":"https://r.igraph.org/reference/layout.fruchterman.reingold.grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Grid Fruchterman-Reingold layout, this was removed from igraph — layout.fruchterman.reingold.grid","title":"Grid Fruchterman-Reingold layout, this was removed from igraph — layout.fruchterman.reingold.grid","text":"Now calls Fruchterman-Reingold layout layout_with_fr().","code":""},{"path":"https://r.igraph.org/reference/layout.fruchterman.reingold.grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Grid Fruchterman-Reingold layout, this was removed from igraph — layout.fruchterman.reingold.grid","text":"","code":"layout.fruchterman.reingold.grid(graph, ...)"},{"path":"https://r.igraph.org/reference/layout.fruchterman.reingold.grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Grid Fruchterman-Reingold layout, this was removed from igraph — layout.fruchterman.reingold.grid","text":"graph Input graph. ... Extra arguments ignored.","code":""},{"path":"https://r.igraph.org/reference/layout.fruchterman.reingold.grid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Grid Fruchterman-Reingold layout, this was removed from igraph — layout.fruchterman.reingold.grid","text":"Layout coordinates, two column matrix.","code":""},{"path":"https://r.igraph.org/reference/layout.fruchterman.reingold.html","id":null,"dir":"Reference","previous_headings":"","what":"The Fruchterman-Reingold layout algorithm — layout.fruchterman.reingold","title":"The Fruchterman-Reingold layout algorithm — layout.fruchterman.reingold","text":"layout.fruchterman.reingold() renamed layout_with_fr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.fruchterman.reingold.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Fruchterman-Reingold layout algorithm — layout.fruchterman.reingold","text":"","code":"layout.fruchterman.reingold(..., params = list())"},{"path":"https://r.igraph.org/reference/layout.fruchterman.reingold.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Fruchterman-Reingold layout algorithm — layout.fruchterman.reingold","text":"... Passed new layout functions. params Passed new layout functions arguments.","code":""},{"path":"https://r.igraph.org/reference/layout.gem.html","id":null,"dir":"Reference","previous_headings":"","what":"The GEM layout algorithm — layout.gem","title":"The GEM layout algorithm — layout.gem","text":"layout.gem() renamed layout_with_gem() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.gem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The GEM layout algorithm — layout.gem","text":"","code":"layout.gem( graph, coords = NULL, maxiter = 40 * vcount(graph)^2, temp.max = max(vcount(graph), 1), temp.min = 1/10, temp.init = sqrt(max(vcount(graph), 1)) )"},{"path":"https://r.igraph.org/reference/layout.gem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The GEM layout algorithm — layout.gem","text":"graph input graph. Edge directions ignored. coords NULL, starting coordinates given , two three column matrix, depending dim argument. maxiter maximum number iterations perform. Updating single vertex counts iteration. reasonable default 40 * n * n, n number vertices. original paper suggests 4 * n * n, usually works parameters set carefully. temp.max maximum allowed local temperature. reasonable default number vertices. temp.min global temperature algorithm terminates (even reaching maxiter iterations). reasonable default 1/10. temp.init Initial local temperature vertices. reasonable default square root number vertices.","code":""},{"path":"https://r.igraph.org/reference/layout.graphopt.html","id":null,"dir":"Reference","previous_headings":"","what":"The graphopt layout algorithm — layout.graphopt","title":"The graphopt layout algorithm — layout.graphopt","text":"layout.graphopt() renamed layout_with_graphopt() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.graphopt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The graphopt layout algorithm — layout.graphopt","text":"","code":"layout.graphopt( graph, start = NULL, niter = 500, charge = 0.001, mass = 30, spring.length = 0, spring.constant = 1, max.sa.movement = 5 )"},{"path":"https://r.igraph.org/reference/layout.graphopt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The graphopt layout algorithm — layout.graphopt","text":"graph input graph. start given, matrix two columns one line vertex. matrix used starting positions algorithm. given, random starting matrix used. niter Integer scalar, number iterations perform. couple hundred general. large graph might want iterations check result. good enough can feed start argument. default value 500. charge charge vertices, used calculate electric repulsion. default 0.001. mass mass vertices, used spring forces. default 30. spring.length length springs, integer number. default value zero. spring.constant spring constant, default value one. max.sa.movement Real constant, gives maximum amount movement allowed single step along single axis. default value 5.","code":""},{"path":"https://r.igraph.org/reference/layout.grid.3d.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple grid layout — layout.grid.3d","title":"Simple grid layout — layout.grid.3d","text":"Use layout_on_grid().","code":""},{"path":"https://r.igraph.org/reference/layout.grid.3d.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple grid layout — layout.grid.3d","text":"","code":"layout.grid.3d(graph, width = 0, height = 0)"},{"path":"https://r.igraph.org/reference/layout.grid.3d.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple grid layout — layout.grid.3d","text":"graph input graph. width number vertices single row grid. zero negative, 2d layouts width grid square root number vertices graph, rounded next integer. Similarly, cube root 3d layouts. height number vertices single column grid, three dimensional layouts. zero negative, determinted automatically.","code":""},{"path":"https://r.igraph.org/reference/layout.grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple grid layout — layout.grid","title":"Simple grid layout — layout.grid","text":"layout.grid() renamed layout_on_grid() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple grid layout — layout.grid","text":"","code":"layout.grid(graph, width = 0, height = 0, dim = 2)"},{"path":"https://r.igraph.org/reference/layout.grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple grid layout — layout.grid","text":"graph input graph. width number vertices single row grid. zero negative, 2d layouts width grid square root number vertices graph, rounded next integer. Similarly, cube root 3d layouts. height number vertices single column grid, three dimensional layouts. zero negative, determinted automatically. dim Two three. Whether make 2d 3d layout.","code":""},{"path":"https://r.igraph.org/reference/layout.kamada.kawai.html","id":null,"dir":"Reference","previous_headings":"","what":"The Kamada-Kawai layout algorithm — layout.kamada.kawai","title":"The Kamada-Kawai layout algorithm — layout.kamada.kawai","text":"layout.kamada.kawai() renamed layout_with_kk() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.kamada.kawai.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Kamada-Kawai layout algorithm — layout.kamada.kawai","text":"","code":"layout.kamada.kawai(..., params = list())"},{"path":"https://r.igraph.org/reference/layout.kamada.kawai.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Kamada-Kawai layout algorithm — layout.kamada.kawai","text":"... Passed new layout functions. params Passed new layout functions arguments.","code":""},{"path":"https://r.igraph.org/reference/layout.lgl.html","id":null,"dir":"Reference","previous_headings":"","what":"Large Graph Layout — layout.lgl","title":"Large Graph Layout — layout.lgl","text":"layout.lgl() renamed layout_with_lgl() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.lgl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Large Graph Layout — layout.lgl","text":"","code":"layout.lgl(..., params = list())"},{"path":"https://r.igraph.org/reference/layout.lgl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Large Graph Layout — layout.lgl","text":"... Passed new layout functions. params Passed new layout functions arguments.","code":""},{"path":"https://r.igraph.org/reference/layout.mds.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph layout by multidimensional scaling — layout.mds","title":"Graph layout by multidimensional scaling — layout.mds","text":"layout.mds() renamed layout_with_mds() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.mds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph layout by multidimensional scaling — layout.mds","text":"","code":"layout.mds(graph, dist = NULL, dim = 2, options = arpack_defaults())"},{"path":"https://r.igraph.org/reference/layout.mds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph layout by multidimensional scaling — layout.mds","text":"graph input graph. dist distance matrix multidimensional scaling. NULL (default), unweighted shortest path matrix used. dim layout_with_mds() supports dimensions number nodes minus one, graph connected; unconnected graphs, possible value 2. merge_coords() works 2D. options currently ignored, ARPACK used solving eigenproblem","code":""},{"path":"https://r.igraph.org/reference/layout.merge.html","id":null,"dir":"Reference","previous_headings":"","what":"Merging graph layouts — layout.merge","title":"Merging graph layouts — layout.merge","text":"layout.merge() renamed merge_coords() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.merge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merging graph layouts — layout.merge","text":"","code":"layout.merge(graphs, layouts, method = \"dla\")"},{"path":"https://r.igraph.org/reference/layout.merge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merging graph layouts — layout.merge","text":"graphs list graph objects. layouts list two-column matrices. method Character constant giving method use. Right now dla implemented.","code":""},{"path":"https://r.igraph.org/reference/layout.norm.html","id":null,"dir":"Reference","previous_headings":"","what":"Normalize coordinates for plotting graphs — layout.norm","title":"Normalize coordinates for plotting graphs — layout.norm","text":"layout.norm() renamed norm_coords() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.norm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Normalize coordinates for plotting graphs — layout.norm","text":"","code":"layout.norm( layout, xmin = -1, xmax = 1, ymin = -1, ymax = 1, zmin = -1, zmax = 1 )"},{"path":"https://r.igraph.org/reference/layout.norm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Normalize coordinates for plotting graphs — layout.norm","text":"layout matrix two three columns, layout normalize. xmin, xmax limits first coordinate, one NULL normalization performed along direction. ymin, ymax limits second coordinate, one NULL normalization performed along direction. zmin, zmax limits third coordinate, one NULL normalization performed along direction.","code":""},{"path":"https://r.igraph.org/reference/layout.random.html","id":null,"dir":"Reference","previous_headings":"","what":"Randomly place vertices on a plane or in 3d space — layout.random","title":"Randomly place vertices on a plane or in 3d space — layout.random","text":"layout.random() renamed layout_randomly() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.random.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Randomly place vertices on a plane or in 3d space — layout.random","text":"","code":"layout.random(..., params = list())"},{"path":"https://r.igraph.org/reference/layout.random.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Randomly place vertices on a plane or in 3d space — layout.random","text":"... Passed new layout functions. params Passed new layout functions arguments.","code":""},{"path":"https://r.igraph.org/reference/layout.reingold.tilford.html","id":null,"dir":"Reference","previous_headings":"","what":"The Reingold-Tilford graph layout algorithm — layout.reingold.tilford","title":"The Reingold-Tilford graph layout algorithm — layout.reingold.tilford","text":"layout.reingold.tilford() renamed layout_as_tree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.reingold.tilford.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Reingold-Tilford graph layout algorithm — layout.reingold.tilford","text":"","code":"layout.reingold.tilford(..., params = list())"},{"path":"https://r.igraph.org/reference/layout.reingold.tilford.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Reingold-Tilford graph layout algorithm — layout.reingold.tilford","text":"... Passed new layout functions. params Passed new layout functions arguments.","code":""},{"path":"https://r.igraph.org/reference/layout.sphere.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph layout with vertices on the surface of a sphere — layout.sphere","title":"Graph layout with vertices on the surface of a sphere — layout.sphere","text":"layout.sphere() renamed layout_on_sphere() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.sphere.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph layout with vertices on the surface of a sphere — layout.sphere","text":"","code":"layout.sphere(..., params = list())"},{"path":"https://r.igraph.org/reference/layout.sphere.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph layout with vertices on the surface of a sphere — layout.sphere","text":"... Passed new layout functions. params Passed new layout functions arguments.","code":""},{"path":"https://r.igraph.org/reference/layout.spring.html","id":null,"dir":"Reference","previous_headings":"","what":"Spring layout, this was removed from igraph — layout.spring","title":"Spring layout, this was removed from igraph — layout.spring","text":"Now calls Fruchterman-Reingold layout layout_with_fr().","code":""},{"path":"https://r.igraph.org/reference/layout.spring.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spring layout, this was removed from igraph — layout.spring","text":"","code":"layout.spring(graph, ...)"},{"path":"https://r.igraph.org/reference/layout.spring.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Spring layout, this was removed from igraph — layout.spring","text":"graph Input graph. ... Extra arguments ignored.","code":""},{"path":"https://r.igraph.org/reference/layout.spring.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Spring layout, this was removed from igraph — layout.spring","text":"Layout coordinates, two column matrix.","code":""},{"path":"https://r.igraph.org/reference/layout.star.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate coordinates to place the vertices of a graph in a star-shape — layout.star","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout.star","text":"layout.star() renamed layout_as_star() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.star.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout.star","text":"","code":"layout.star(graph, center = V(graph)[1], order = NULL)"},{"path":"https://r.igraph.org/reference/layout.star.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout.star","text":"graph graph layout. center id vertex put center. default first vertex. order Numeric vector, order vertices along perimeter. default ordering given vertex ids.","code":""},{"path":"https://r.igraph.org/reference/layout.sugiyama.html","id":null,"dir":"Reference","previous_headings":"","what":"The Sugiyama graph layout generator — layout.sugiyama","title":"The Sugiyama graph layout generator — layout.sugiyama","text":"layout.sugiyama() renamed layout_with_sugiyama() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.sugiyama.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Sugiyama graph layout generator — layout.sugiyama","text":"","code":"layout.sugiyama( graph, layers = NULL, hgap = 1, vgap = 1, maxiter = 100, weights = NULL, attributes = c(\"default\", \"all\", \"none\") )"},{"path":"https://r.igraph.org/reference/layout.sugiyama.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Sugiyama graph layout generator — layout.sugiyama","text":"graph input graph. layers numeric vector NULL. NULL, specify layer index vertices. Layers numbered one. NULL, igraph calculates layers automatically. hgap Real scalar, minimum horizontal gap vertices layer. vgap Real scalar, distance layers. maxiter Integer scalar, maximum number iterations crossing minimization stage. 100 reasonable default; feel many edge crossings, increase . weights Optional edge weight vector. NULL, 'weight' edge attribute used, one. Supply NA igraph ignores edge weights. used graph contains cycles; igraph tend reverse edges smaller weights breaking cycles. attributes graph/vertex/edge attributes keep extended graph. ‘default’ keeps ‘size’, ‘size2’, ‘shape’, ‘label’ ‘color’ vertex attributes ‘arrow.mode’ ‘arrow.size’ edge attributes. ‘’ keep graph, vertex edge attributes, ‘none’ keeps none .","code":""},{"path":"https://r.igraph.org/reference/layout.svd.html","id":null,"dir":"Reference","previous_headings":"","what":"SVD layout, this was removed from igraph — layout.svd","title":"SVD layout, this was removed from igraph — layout.svd","text":"Now calls Fruchterman-Reingold layout layout_with_fr().","code":""},{"path":"https://r.igraph.org/reference/layout.svd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"SVD layout, this was removed from igraph — layout.svd","text":"","code":"layout.svd(graph, ...)"},{"path":"https://r.igraph.org/reference/layout.svd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"SVD layout, this was removed from igraph — layout.svd","text":"graph Input graph. ... Extra arguments ignored.","code":""},{"path":"https://r.igraph.org/reference/layout.svd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"SVD layout, this was removed from igraph — layout.svd","text":"Layout coordinates, two column matrix.","code":""},{"path":"https://r.igraph.org/reference/layout_.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph layouts — layout_","title":"Graph layouts — layout_","text":"generic function apply layout function graph.","code":""},{"path":"https://r.igraph.org/reference/layout_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph layouts — layout_","text":"","code":"layout_(graph, layout, ...) # S3 method for class 'igraph_layout_spec' print(x, ...) # S3 method for class 'igraph_layout_modifier' print(x, ...)"},{"path":"https://r.igraph.org/reference/layout_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph layouts — layout_","text":"graph input graph. layout layout specification. must call layout specification function. ... modifiers, see complete list . print() methods, ignored. x layout specification","code":""},{"path":"https://r.igraph.org/reference/layout_.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph layouts — layout_","text":"return value layout function, usually two column matrix. 3D layouts three column matrix.","code":""},{"path":"https://r.igraph.org/reference/layout_.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph layouts — layout_","text":"two ways calculate graph layouts igraph. first way call layout function (prefix layout_() graph, get vertex coordinates. second way (new igraph 0.8.0), two steps, flexible. First call layout specification function (one without layout_() prefix, layout_() (add_layout_()) perform layouting. second way preferred, flexible. allows operations layouting. E.g. using component_wise() argument, layout can calculated separately component, merged get final results.","code":""},{"path":"https://r.igraph.org/reference/layout_.html","id":"modifiers","dir":"Reference","previous_headings":"","what":"Modifiers","title":"Graph layouts — layout_","text":"Modifiers modify layout calculation performed. Currently implemented modifiers: component_wise() calculates layout separately component graph, merges . normalize() scales layout square.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph layouts — layout_","text":"","code":"g <- make_ring(10) + make_full_graph(5) coords <- layout_(g, as_star()) plot(g, layout = coords)"},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple two-row layout for bipartite graphs — layout_as_bipartite","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"Minimize edge-crossings simple two-row (column) layout bipartite graphs.","code":""},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"","code":"layout_as_bipartite(graph, types = NULL, hgap = 1, vgap = 1, maxiter = 100) as_bipartite(...)"},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"graph bipartite input graph. logical ‘type’ vertex attribute, types argument must given. types logical vector, vertex types. argument NULL (default), ‘type’ vertex attribute used. hgap Real scalar, minimum horizontal gap vertices layer. vgap Real scalar, distance two layers. maxiter Integer scalar, maximum number iterations crossing minimization stage. 100 reasonable default; feel many edge crossings, increase . ... Arguments pass layout_as_bipartite().","code":""},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"matrix two columns many rows number vertices input graph.","code":""},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"layout created first placing vertices two rows, according types. positions within rows optimized minimize edge crossings, using Sugiyama algorithm (see layout_with_sugiyama()).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"","code":"# Random bipartite graph inc <- matrix(sample(0:1, 50, replace = TRUE, prob = c(2, 1)), 10, 5) g <- graph_from_biadjacency_matrix(inc) plot(g, layout = layout_as_bipartite, vertex.color = c(\"green\", \"cyan\")[V(g)$type + 1] ) # Two columns g %>% add_layout_(as_bipartite()) %>% plot()"},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"simple layout generator, places one vertex center circle rest vertices equidistantly perimeter.","code":""},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"","code":"layout_as_star(graph, center = V(graph)[1], order = NULL) as_star(...)"},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"graph graph layout. center id vertex put center. default first vertex. order Numeric vector, order vertices along perimeter. default ordering given vertex ids. ... Arguments pass layout_as_star().","code":""},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"matrix two columns many rows number vertices input graph.","code":""},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"possible choose vertex center, order vertices can also given.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"","code":"g <- make_star(10) layout_as_star(g) #> [,1] [,2] #> [1,] 0.0000000 0.0000000 #> [2,] 1.0000000 0.0000000 #> [3,] 0.7660444 0.6427876 #> [4,] 0.1736482 0.9848078 #> [5,] -0.5000000 0.8660254 #> [6,] -0.9396926 0.3420201 #> [7,] -0.9396926 -0.3420201 #> [8,] -0.5000000 -0.8660254 #> [9,] 0.1736482 -0.9848078 #> [10,] 0.7660444 -0.6427876 ## Alternative form layout_(g, as_star()) #> [,1] [,2] #> [1,] 0.0000000 0.0000000 #> [2,] 1.0000000 0.0000000 #> [3,] 0.7660444 0.6427876 #> [4,] 0.1736482 0.9848078 #> [5,] -0.5000000 0.8660254 #> [6,] -0.9396926 0.3420201 #> [7,] -0.9396926 -0.3420201 #> [8,] -0.5000000 -0.8660254 #> [9,] 0.1736482 -0.9848078 #> [10,] 0.7660444 -0.6427876"},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"The Reingold-Tilford graph layout algorithm — layout_as_tree","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"tree-like layout, perfect trees, acceptable graphs many cycles.","code":""},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"","code":"layout_as_tree( graph, root = numeric(), circular = FALSE, rootlevel = numeric(), mode = c(\"out\", \"in\", \"all\"), flip.y = TRUE ) as_tree(...)"},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"graph input graph. root index root vertex root vertices. non-empty vector supplied vertex ids used roots trees (single tree graph connected). empty vector, root vertices automatically calculated based topological sorting, performed opposite mode mode argument. vertices sorted, one selected component. circular Logical scalar, whether plot tree circular fashion. Defaults FALSE, tree branches going bottom-(top-, see flip.y argument. rootlevel argument can useful drawing forests trees (.e. unconnected tree components). specifies level root vertices every tree forest. considered roots argument empty vector. mode Specifies edges consider building tree. ‘’, outgoing, ‘’, incoming edges parent considered. ‘’ edges used (behavior igraph 0.5 ). parameter also influences root vertices calculated, given. See roots parameter. flip.y Logical scalar, whether flip ‘y’ coordinates. default flipping puts root vertex top. ... Passed layout_as_tree().","code":""},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"numeric matrix two columns, one row vertex.","code":""},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"Arranges nodes tree given node used root. tree directed downwards parents centered children. exact algorithm, reference . given graph tree, breadth-first search executed first obtain possible spanning tree.","code":""},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"Reingold, E Tilford, J (1981). Tidier drawing trees. IEEE Trans. Softw. Eng., SE-7(2):223–228.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"","code":"tree <- make_tree(20, 3) plot(tree, layout = layout_as_tree) plot(tree, layout = layout_as_tree(tree, flip.y = FALSE)) plot(tree, layout = layout_as_tree(tree, circular = TRUE)) tree2 <- make_tree(10, 3) + make_tree(10, 2) plot(tree2, layout = layout_as_tree) plot(tree2, layout = layout_as_tree(tree2, root = c(1, 11), rootlevel = c(2, 1) ))"},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph layout with vertices on a circle. — layout_in_circle","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"Place vertices circle, order vertex ids.","code":""},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"","code":"layout_in_circle(graph, order = V(graph)) in_circle(...)"},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"graph input graph. order vertices place circle, order desired placement. Vertices included placed (0,0). ... Passed layout_in_circle().","code":""},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"numeric matrix two columns, one row vertex.","code":""},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"want order vertices differently, permute using permute() function.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"","code":"## Place vertices on a circle, order them according to their ## community library(igraphdata) data(karate) karate_groups <- cluster_optimal(karate) #> This graph was created by an old(er) igraph version. #> ℹ Call `igraph::upgrade_graph()` on it to use with the current igraph version. #> For now we convert it on the fly... coords <- layout_in_circle(karate, order = order(membership(karate_groups)) ) V(karate)$label <- sub(\"Actor \", \"\", V(karate)$name) V(karate)$label.color <- membership(karate_groups) V(karate)$shape <- \"none\" plot(karate, layout = coords)"},{"path":"https://r.igraph.org/reference/layout_nicely.html","id":null,"dir":"Reference","previous_headings":"","what":"Choose an appropriate graph layout algorithm automatically — layout_nicely","title":"Choose an appropriate graph layout algorithm automatically — layout_nicely","text":"function tries choose appropriate graph layout algorithm graph, automatically, based simple algorithm. See details .","code":""},{"path":"https://r.igraph.org/reference/layout_nicely.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Choose an appropriate graph layout algorithm automatically — layout_nicely","text":"","code":"layout_nicely(graph, dim = 2, ...) nicely(...)"},{"path":"https://r.igraph.org/reference/layout_nicely.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Choose an appropriate graph layout algorithm automatically — layout_nicely","text":"graph input graph dim Dimensions, 2 3. ... layout_nicely() extra arguments passed real layout function. nicely() argument passed layout_nicely().","code":""},{"path":"https://r.igraph.org/reference/layout_nicely.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Choose an appropriate graph layout algorithm automatically — layout_nicely","text":"numeric matrix two three columns.","code":""},{"path":"https://r.igraph.org/reference/layout_nicely.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Choose an appropriate graph layout algorithm automatically — layout_nicely","text":"layout_nicely() tries choose appropriate layout function supplied graph, uses generate layout. current implementation works like : graph graph attribute called ‘layout’, used. attribute R function, called, graph extra arguments. Otherwise, graph vertex attributes called ‘x’ ‘y’, used coordinates. graph additional ‘z’ vertex attribute, also used. Otherwise, graph connected less 1000 vertices, Fruchterman-Reingold layout used, calling layout_with_fr(). Otherwise DrL layout used, layout_with_drl() called. layout algorithm implementations, argument named ‘weights’ typically used specify weights edges layout algorithm supports . case, omitting ‘weights’ setting NULL make igraph use 'weight' edge attribute graph present. However, layout algorithms support non-positive weights, layout_nicely() fail simply called graph without specifying explicit weights weights happened include non-positive numbers. strive ensure layout_nicely() works ---box graphs, rule omit ‘weights’ set NULL layout_nicely() end calling layout_with_fr() layout_with_drl(), forward weights functions issue warning . can use weights = NA silence warning.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_nicely.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Choose an appropriate graph layout algorithm automatically — layout_nicely","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple grid layout — layout_on_grid","title":"Simple grid layout — layout_on_grid","text":"layout places vertices rectangular grid, two three dimensions.","code":""},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple grid layout — layout_on_grid","text":"","code":"layout_on_grid(graph, width = 0, height = 0, dim = 2) on_grid(...)"},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple grid layout — layout_on_grid","text":"graph input graph. width number vertices single row grid. zero negative, 2d layouts width grid square root number vertices graph, rounded next integer. Similarly, cube root 3d layouts. height number vertices single column grid, three dimensional layouts. zero negative, determinted automatically. dim Two three. Whether make 2d 3d layout. ... Passed layout_on_grid().","code":""},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simple grid layout — layout_on_grid","text":"two-column three-column matrix.","code":""},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simple grid layout — layout_on_grid","text":"function places vertices simple rectangular grid, one . want change order vertices, see permute() function.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simple grid layout — layout_on_grid","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simple grid layout — layout_on_grid","text":"","code":"g <- make_lattice(c(3, 3)) layout_on_grid(g) #> [,1] [,2] #> [1,] 0 0 #> [2,] 1 0 #> [3,] 2 0 #> [4,] 0 1 #> [5,] 1 1 #> [6,] 2 1 #> [7,] 0 2 #> [8,] 1 2 #> [9,] 2 2 g2 <- make_lattice(c(3, 3, 3)) layout_on_grid(g2, dim = 3) #> [,1] [,2] [,3] #> [1,] 0 0 0 #> [2,] 1 0 0 #> [3,] 2 0 0 #> [4,] 0 1 0 #> [5,] 1 1 0 #> [6,] 2 1 0 #> [7,] 0 2 0 #> [8,] 1 2 0 #> [9,] 2 2 0 #> [10,] 0 0 1 #> [11,] 1 0 1 #> [12,] 2 0 1 #> [13,] 0 1 1 #> [14,] 1 1 1 #> [15,] 2 1 1 #> [16,] 0 2 1 #> [17,] 1 2 1 #> [18,] 2 2 1 #> [19,] 0 0 2 #> [20,] 1 0 2 #> [21,] 2 0 2 #> [22,] 0 1 2 #> [23,] 1 1 2 #> [24,] 2 1 2 #> [25,] 0 2 2 #> [26,] 1 2 2 #> [27,] 2 2 2 plot(g, layout = layout_on_grid) if (interactive() && requireNamespace(\"rgl\", quietly = TRUE)) { rglplot(g, layout = layout_on_grid(g, dim = 3)) }"},{"path":"https://r.igraph.org/reference/layout_on_sphere.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","title":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","text":"Place vertices sphere, approximately uniformly, order vertex ids.","code":""},{"path":"https://r.igraph.org/reference/layout_on_sphere.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","text":"","code":"layout_on_sphere(graph) on_sphere(...)"},{"path":"https://r.igraph.org/reference/layout_on_sphere.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","text":"graph input graph. ... Passed layout_on_sphere().","code":""},{"path":"https://r.igraph.org/reference/layout_on_sphere.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","text":"numeric matrix three columns, one row vertex.","code":""},{"path":"https://r.igraph.org/reference/layout_on_sphere.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","text":"layout_on_sphere() places vertices (approximately) uniformly surface sphere, thus 3d layout. clear however “uniformly sphere” means. want order vertices differently, permute using permute() function.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_on_sphere.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_randomly.html","id":null,"dir":"Reference","previous_headings":"","what":"Randomly place vertices on a plane or in 3d space — layout_randomly","title":"Randomly place vertices on a plane or in 3d space — layout_randomly","text":"function uniformly randomly places vertices graph two three dimensions.","code":""},{"path":"https://r.igraph.org/reference/layout_randomly.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Randomly place vertices on a plane or in 3d space — layout_randomly","text":"","code":"layout_randomly(graph, dim = 2) randomly(...)"},{"path":"https://r.igraph.org/reference/layout_randomly.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Randomly place vertices on a plane or in 3d space — layout_randomly","text":"graph input graph. dim Integer scalar, dimension space use. must 2 3. ... Parameters pass layout_randomly().","code":""},{"path":"https://r.igraph.org/reference/layout_randomly.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Randomly place vertices on a plane or in 3d space — layout_randomly","text":"numeric matrix two three columns.","code":""},{"path":"https://r.igraph.org/reference/layout_randomly.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Randomly place vertices on a plane or in 3d space — layout_randomly","text":"Randomly places vertices [-1,1] square (2d) cube (3d). probably useless layout, can use starting point layout generators.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_randomly.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Randomly place vertices on a plane or in 3d space — layout_randomly","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":null,"dir":"Reference","previous_headings":"","what":"The Davidson-Harel layout algorithm — layout_with_dh","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"Place vertices graph plane, according simulated annealing algorithm Davidson Harel.","code":""},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"","code":"layout_with_dh( graph, coords = NULL, maxiter = 10, fineiter = max(10, log2(vcount(graph))), cool.fact = 0.75, weight.node.dist = 1, weight.border = 0, weight.edge.lengths = edge_density(graph)/10, weight.edge.crossings = 1 - sqrt(edge_density(graph)), weight.node.edge.dist = 0.2 * (1 - edge_density(graph)) ) with_dh(...)"},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"graph graph lay . Edge directions ignored. coords Optional starting positions vertices. argument NULL appropriate matrix starting coordinates. maxiter Number iterations perform first phase. fineiter Number iterations fine tuning phase. cool.fact Cooling factor. weight.node.dist Weight node-node distances component energy function. weight.border Weight distance border component energy function. can set zero, vertices allowed sit border. weight.edge.lengths Weight edge length component energy function. weight.edge.crossings Weight edge crossing component energy function. weight.node.edge.dist Weight node-edge distance component energy function. ... Passed layout_with_dh().","code":""},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"two- three-column matrix, row giving coordinates vertex, according ids vertex ids.","code":""},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"function implements algorithm Davidson Harel, see Ron Davidson, David Harel: Drawing Graphs Nicely Using Simulated Annealing. ACM Transactions Graphics 15(4), pp. 301-331, 1996. algorithm uses simulated annealing sophisticated energy function, unfortunately hard parameterize different graphs. original publication disclose parameter values, ones determined experimentation. algorithm consists two phases, annealing phase, fine-tuning phase. simulated annealing second phase. implementation tries follow original publication, much possible. major difference coordinates explicitly kept within bounds rectangle layout.","code":""},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"Ron Davidson, David Harel: Drawing Graphs Nicely Using Simulated Annealing. ACM Transactions Graphics 15(4), pp. 301-331, 1996.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"","code":"set.seed(42) ## Figures from the paper g_1b <- make_star(19, mode = \"undirected\") + path(c(2:19, 2)) + path(c(seq(2, 18, by = 2), 2)) plot(g_1b, layout = layout_with_dh) g_2 <- make_lattice(c(8, 3)) + edges(1, 8, 9, 16, 17, 24) plot(g_2, layout = layout_with_dh) g_3 <- make_empty_graph(n = 70) plot(g_3, layout = layout_with_dh) g_4 <- make_empty_graph(n = 70, directed = FALSE) + edges(1:70) plot(g_4, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_5a <- make_ring(24) plot(g_5a, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_5b <- make_ring(40) plot(g_5b, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_6 <- make_lattice(c(2, 2, 2)) plot(g_6, layout = layout_with_dh) g_7 <- graph_from_literal(1:3:5 -- 2:4:6) plot(g_7, layout = layout_with_dh, vertex.label = V(g_7)$name) g_8 <- make_ring(5) + make_ring(10) + make_ring(5) + edges( 1, 6, 2, 8, 3, 10, 4, 12, 5, 14, 7, 16, 9, 17, 11, 18, 13, 19, 15, 20 ) plot(g_8, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_9 <- make_lattice(c(3, 2, 2)) plot(g_9, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_10 <- make_lattice(c(6, 6)) plot(g_10, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_11a <- make_tree(31, 2, mode = \"undirected\") plot(g_11a, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_11b <- make_tree(21, 4, mode = \"undirected\") plot(g_11b, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_12 <- make_empty_graph(n = 37, directed = FALSE) + path(1:5, 10, 22, 31, 37:33, 27, 16, 6, 1) + path(6, 7, 11, 9, 10) + path(16:22) + path(27:31) + path(2, 7, 18, 28, 34) + path(3, 8, 11, 19, 29, 32, 35) + path(4, 9, 20, 30, 36) + path(1, 7, 12, 14, 19, 24, 26, 30, 37) + path(5, 9, 13, 15, 19, 23, 25, 28, 33) + path(3, 12, 16, 25, 35, 26, 22, 13, 3) plot(g_12, layout = layout_with_dh, vertex.size = 5, vertex.label = NA)"},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":null,"dir":"Reference","previous_headings":"","what":"The DrL graph layout generator — layout_with_drl","title":"The DrL graph layout generator — layout_with_drl","text":"DrL force-directed graph layout toolbox focused real-world large-scale graphs, developed Shawn Martin colleagues Sandia National Laboratories.","code":""},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The DrL graph layout generator — layout_with_drl","text":"","code":"layout_with_drl( graph, use.seed = FALSE, seed = matrix(runif(vcount(graph) * 2), ncol = 2), options = drl_defaults$default, weights = NULL, dim = 2 ) with_drl(...)"},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The DrL graph layout generator — layout_with_drl","text":"graph input graph, can directed undirected. use.seed Logical scalar, whether use coordinates given seed argument starting point. seed matrix two columns, starting coordinates vertices use.seed TRUE. ignored otherwise. options Options layout generator, named list. See details . weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use layout. Larger edge weights correspond stronger connections. dim Either ‘2’ ‘3’, specifies whether want two dimensional three dimensional layout. Note nature DrL algorithm, three dimensional layout takes significantly longer compute. ... Passed layout_with_drl().","code":""},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The DrL graph layout generator — layout_with_drl","text":"numeric matrix two columns.","code":""},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The DrL graph layout generator — layout_with_drl","text":"function implements force-directed DrL layout generator. generator following parameters: edge.cut Edge cutting done late stages algorithm order achieve less dense layouts. Edges cut lot stress (large value objective function sum). edge cutting parameter value 0 1 0 representing edge cutting 1 representing maximal edge cutting. init.iterations Number iterations first phase. init.temperature Start temperature, first phase. init.attraction Attraction, first phase. init.damping.mult Damping, first phase. liquid.iterations Number iterations, liquid phase. liquid.temperature Start temperature, liquid phase. liquid.attraction Attraction, liquid phase. liquid.damping.mult Damping, liquid phase. expansion.iterations Number iterations, expansion phase. expansion.temperature Start temperature, expansion phase. expansion.attraction Attraction, expansion phase. expansion.damping.mult Damping, expansion phase. cooldown.iterations Number iterations, cooldown phase. cooldown.temperature Start temperature, cooldown phase. cooldown.attraction Attraction, cooldown phase. cooldown.damping.mult Damping, cooldown phase. crunch.iterations Number iterations, crunch phase. crunch.temperature Start temperature, crunch phase. crunch.attraction Attraction, crunch phase. crunch.damping.mult Damping, crunch phase. simmer.iterations Number iterations, simmer phase. simmer.temperature Start temperature, simmer phase. simmer.attraction Attraction, simmer phase. simmer.damping.mult Damping, simmer phase.","code":""},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The DrL graph layout generator — layout_with_drl","text":"See following technical report: Martin, S., Brown, W.M., Klavans, R., Boyack, K.W., DrL: Distributed Recursive (Graph) Layout. SAND Reports, 2008. 2936: p. 1-10.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The DrL graph layout generator — layout_with_drl","text":"Shawn Martin (http://www.cs.otago.ac.nz/homepages/smartin/) Gabor Csardi csardi.gabor@gmail.com R/igraph interface three dimensional version.","code":""},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The DrL graph layout generator — layout_with_drl","text":"","code":"g <- as_undirected(sample_pa(100, m = 1)) l <- layout_with_drl(g, options = list(simmer.attraction = 0)) plot(g, layout = l, vertex.size = 3, vertex.label = NA)"},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":null,"dir":"Reference","previous_headings":"","what":"The Fruchterman-Reingold layout algorithm — layout_with_fr","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"Place vertices plane using force-directed layout algorithm Fruchterman Reingold.","code":""},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"","code":"layout_with_fr( graph, coords = NULL, dim = 2, niter = 500, start.temp = sqrt(vcount(graph)), grid = c(\"auto\", \"grid\", \"nogrid\"), weights = NULL, minx = NULL, maxx = NULL, miny = NULL, maxy = NULL, minz = NULL, maxz = NULL, coolexp = deprecated(), maxdelta = deprecated(), area = deprecated(), repulserad = deprecated(), maxiter = deprecated() ) with_fr(...)"},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"graph graph lay . Edge directions ignored. coords Optional starting positions vertices. argument NULL appropriate matrix starting coordinates. dim Integer scalar, 2 3, dimension layout. Two dimensional layouts places plane, three dimensional ones 3d space. niter Integer scalar, number iterations perform. start.temp Real scalar, start temperature. maximum amount movement alloved along one axis, within one step, vertex. Currently decreased linearly zero iteration. grid Character scalar, whether use faster, less accurate grid based implementation algorithm. default (“auto”), grid-based implementation used graph one thousand vertices. weights vector giving edge weights. weight edge attribute used default, present. weights given, attraction along edges multiplied given edge weights. places vertices connected highly weighted edge closer . Weights must positive. minx NULL, must numeric vector gives lower boundaries ‘x’ coordinates vertices. length vector must match number vertices graph. maxx Similar minx, gives upper boundaries. miny Similar minx, gives lower boundaries ‘y’ coordinates. maxy Similar minx, gives upper boundaries ‘y’ coordinates. minz Similar minx, gives lower boundaries ‘z’ coordinates. maxz Similar minx, gives upper boundaries ‘z’ coordinates. coolexp, maxdelta, area, repulserad arguments supported igraph version 0.8.0 ignored (warning). maxiter deprecated synonym niter, compatibility. ... Passed layout_with_fr().","code":""},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"two- three-column matrix, row giving coordinates vertex, according ids vertex ids.","code":""},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"See referenced paper details algorithm. function rewritten scratch igraph version 0.8.0.","code":""},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"Fruchterman, T.M.J. Reingold, E.M. (1991). Graph Drawing Force-directed Placement. Software - Practice Experience, 21(11):1129-1164.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"","code":"# Fixing ego g <- sample_pa(20, m = 2) minC <- rep(-Inf, vcount(g)) maxC <- rep(Inf, vcount(g)) minC[1] <- maxC[1] <- 0 co <- layout_with_fr(g, minx = minC, maxx = maxC, miny = minC, maxy = maxC ) co[1, ] #> [1] 0 0 plot(g, layout = co, vertex.size = 30, edge.arrow.size = 0.2, vertex.label = c(\"ego\", rep(\"\", vcount(g) - 1)), rescale = FALSE, xlim = range(co[, 1]), ylim = range(co[, 2]), vertex.label.dist = 0, vertex.label.color = \"red\" ) axis(1) axis(2)"},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":null,"dir":"Reference","previous_headings":"","what":"The GEM layout algorithm — layout_with_gem","title":"The GEM layout algorithm — layout_with_gem","text":"Place vertices plane using GEM force-directed layout algorithm.","code":""},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The GEM layout algorithm — layout_with_gem","text":"","code":"layout_with_gem( graph, coords = NULL, maxiter = 40 * vcount(graph)^2, temp.max = max(vcount(graph), 1), temp.min = 1/10, temp.init = sqrt(max(vcount(graph), 1)) ) with_gem(...)"},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The GEM layout algorithm — layout_with_gem","text":"graph input graph. Edge directions ignored. coords NULL, starting coordinates given , two three column matrix, depending dim argument. maxiter maximum number iterations perform. Updating single vertex counts iteration. reasonable default 40 * n * n, n number vertices. original paper suggests 4 * n * n, usually works parameters set carefully. temp.max maximum allowed local temperature. reasonable default number vertices. temp.min global temperature algorithm terminates (even reaching maxiter iterations). reasonable default 1/10. temp.init Initial local temperature vertices. reasonable default square root number vertices. ... Passed layout_with_gem().","code":""},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The GEM layout algorithm — layout_with_gem","text":"numeric matrix two columns, many rows number vertices.","code":""},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The GEM layout algorithm — layout_with_gem","text":"See referenced paper details algorithm.","code":""},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The GEM layout algorithm — layout_with_gem","text":"Arne Frick, Andreas Ludwig, Heiko Mehldau: Fast Adaptive Layout Algorithm Undirected Graphs, Proc. Graph Drawing 1994, LNCS 894, pp. 388-403, 1995.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The GEM layout algorithm — layout_with_gem","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The GEM layout algorithm — layout_with_gem","text":"","code":"set.seed(42) g <- make_ring(10) plot(g, layout = layout_with_gem)"},{"path":"https://r.igraph.org/reference/layout_with_graphopt.html","id":null,"dir":"Reference","previous_headings":"","what":"The graphopt layout algorithm — layout_with_graphopt","title":"The graphopt layout algorithm — layout_with_graphopt","text":"force-directed layout algorithm, scales relatively well large graphs.","code":""},{"path":"https://r.igraph.org/reference/layout_with_graphopt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The graphopt layout algorithm — layout_with_graphopt","text":"","code":"layout_with_graphopt( graph, start = NULL, niter = 500, charge = 0.001, mass = 30, spring.length = 0, spring.constant = 1, max.sa.movement = 5 ) with_graphopt(...)"},{"path":"https://r.igraph.org/reference/layout_with_graphopt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The graphopt layout algorithm — layout_with_graphopt","text":"graph input graph. start given, matrix two columns one line vertex. matrix used starting positions algorithm. given, random starting matrix used. niter Integer scalar, number iterations perform. couple hundred general. large graph might want iterations check result. good enough can feed start argument. default value 500. charge charge vertices, used calculate electric repulsion. default 0.001. mass mass vertices, used spring forces. default 30. spring.length length springs, integer number. default value zero. spring.constant spring constant, default value one. max.sa.movement Real constant, gives maximum amount movement allowed single step along single axis. default value 5. ... Passed layout_with_graphopt().","code":""},{"path":"https://r.igraph.org/reference/layout_with_graphopt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The graphopt layout algorithm — layout_with_graphopt","text":"numeric matrix two columns, row vertex.","code":""},{"path":"https://r.igraph.org/reference/layout_with_graphopt.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The graphopt layout algorithm — layout_with_graphopt","text":"layout_with_graphopt() port graphopt layout algorithm Michael Schmuhl. graphopt version 0.4.1 rewritten C support layers removed (might added later) code bit reorganized avoid unnecessary steps node charge (see ) zero. graphopt uses physical analogies defining attracting repelling forces among vertices physical system simulated reaches equilibrium. (simulated annealing anything like , stable fixed point guaranteed.)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_graphopt.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The graphopt layout algorithm — layout_with_graphopt","text":"Michael Schmuhl original graphopt code, rewritten wrapped Gabor Csardi csardi.gabor@gmail.com.","code":""},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":null,"dir":"Reference","previous_headings":"","what":"The Kamada-Kawai layout algorithm — layout_with_kk","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"Place vertices plane, 3D space, based physical model springs.","code":""},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"","code":"layout_with_kk( graph, coords = NULL, dim = 2, maxiter = 50 * vcount(graph), epsilon = 0, kkconst = max(vcount(graph), 1), weights = NULL, minx = NULL, maxx = NULL, miny = NULL, maxy = NULL, minz = NULL, maxz = NULL, niter = deprecated(), sigma = deprecated(), initemp = deprecated(), coolexp = deprecated(), start = deprecated() ) with_kk(...)"},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"graph input graph. Edge directions ignored. coords NULL, starting coordinates given , two three column matrix, depending dim argument. dim Integer scalar, 2 3, dimension layout. Two dimensional layouts places plane, three dimensional ones 3d space. maxiter maximum number iterations perform. algorithm might terminate earlier, see epsilon argument. epsilon Numeric scalar, algorithm terminates, maximal delta less . (See reference delta means.) set zero, function always performs maxiter iterations. kkconst Numeric scalar, Kamada-Kawai vertex attraction constant. Typical (default) value number vertices. weights Edge weights, larger values result longer edges. Note opposite layout_with_fr(). Weights must positive. minx NULL, must numeric vector gives lower boundaries ‘x’ coordinates vertices. length vector must match number vertices graph. maxx Similar minx, gives upper boundaries. miny Similar minx, gives lower boundaries ‘y’ coordinates. maxy Similar minx, gives upper boundaries ‘y’ coordinates. minz Similar minx, gives lower boundaries ‘z’ coordinates. maxz Similar minx, gives upper boundaries ‘z’ coordinates. niter, sigma, initemp, coolexp arguments supported igraph version 0.8.0 ignored (warning). start Deprecated synonym coords, compatibility. ... Passed layout_with_kk().","code":""},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"numeric matrix two (dim=2) three (dim=3) columns, many rows number vertices, x, y potentially z coordinates vertices.","code":""},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"See referenced paper details algorithm. function rewritten scratch igraph version 0.8.0 follows truthfully original publication Kamada Kawai now.","code":""},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"Kamada, T. Kawai, S.: Algorithm Drawing General Undirected Graphs. Information Processing Letters, 31/1, 7–15, 1989.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"","code":"g <- make_ring(10) E(g)$weight <- rep(1:2, length.out = ecount(g)) plot(g, layout = layout_with_kk, edge.label = E(g)$weight)"},{"path":"https://r.igraph.org/reference/layout_with_lgl.html","id":null,"dir":"Reference","previous_headings":"","what":"Large Graph Layout — layout_with_lgl","title":"Large Graph Layout — layout_with_lgl","text":"layout generator larger graphs.","code":""},{"path":"https://r.igraph.org/reference/layout_with_lgl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Large Graph Layout — layout_with_lgl","text":"","code":"layout_with_lgl( graph, maxiter = 150, maxdelta = vcount(graph), area = vcount(graph)^2, coolexp = 1.5, repulserad = area * vcount(graph), cellsize = sqrt(sqrt(area)), root = NULL ) with_lgl(...)"},{"path":"https://r.igraph.org/reference/layout_with_lgl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Large Graph Layout — layout_with_lgl","text":"graph input graph maxiter maximum number iterations perform (150). maxdelta maximum change vertex iteration (number vertices). area area surface vertices placed (square number vertices). coolexp cooling exponent simulated annealing (1.5). repulserad Cancellation radius repulsion (area times number vertices). cellsize size cells grid. calculating repulsion forces vertices vertices neighboring grid cells taken account (fourth root number area. root id vertex place middle layout. default value -1 means random vertex selected. ... Passed layout_with_lgl().","code":""},{"path":"https://r.igraph.org/reference/layout_with_lgl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Large Graph Layout — layout_with_lgl","text":"numeric matrix two columns many rows vertices.","code":""},{"path":"https://r.igraph.org/reference/layout_with_lgl.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Large Graph Layout — layout_with_lgl","text":"layout_with_lgl() large connected graphs, similar layout generator Large Graph Layout software (https://lgl.sourceforge.net/).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_lgl.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Large Graph Layout — layout_with_lgl","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph layout by multidimensional scaling — layout_with_mds","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"Multidimensional scaling distance matrix defined vertices graph.","code":""},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"","code":"layout_with_mds(graph, dist = NULL, dim = 2, options = arpack_defaults()) with_mds(...)"},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"graph input graph. dist distance matrix multidimensional scaling. NULL (default), unweighted shortest path matrix used. dim layout_with_mds() supports dimensions number nodes minus one, graph connected; unconnected graphs, possible value 2. merge_coords() works 2D. options currently ignored, ARPACK used solving eigenproblem ... Passed layout_with_mds().","code":""},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"numeric matrix dim columns.","code":""},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"layout_with_mds() uses classical multidimensional scaling (Torgerson scaling) generating coordinates. Multidimensional scaling aims place points higher dimensional space (typically) 2 dimensional plane, distances points kept much possible. default igraph uses shortest path matrix distances nodes, user can override via dist argument. Warning: graph symmetric exchange two vertices (case leaves tree connecting parent), classical multidimensional scaling may assign coordinates vertices. function generates layout separately graph component merges via merge_coords().","code":""},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"Cox, T. F. Cox, M. . . (2001) Multidimensional Scaling. Second edition. Chapman Hall.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"","code":"g <- sample_gnp(100, 2 / 100) l <- layout_with_mds(g) plot(g, layout = l, vertex.label = NA, vertex.size = 3)"},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":null,"dir":"Reference","previous_headings":"","what":"The Sugiyama graph layout generator — layout_with_sugiyama","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"Sugiyama layout algorithm layered directed acyclic graphs. algorithm minimized edge crossings.","code":""},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"","code":"layout_with_sugiyama( graph, layers = NULL, hgap = 1, vgap = 1, maxiter = 100, weights = NULL, attributes = c(\"default\", \"all\", \"none\") ) with_sugiyama(...)"},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"graph input graph. layers numeric vector NULL. NULL, specify layer index vertices. Layers numbered one. NULL, igraph calculates layers automatically. hgap Real scalar, minimum horizontal gap vertices layer. vgap Real scalar, distance layers. maxiter Integer scalar, maximum number iterations crossing minimization stage. 100 reasonable default; feel many edge crossings, increase . weights Optional edge weight vector. NULL, 'weight' edge attribute used, one. Supply NA igraph ignores edge weights. used graph contains cycles; igraph tend reverse edges smaller weights breaking cycles. attributes graph/vertex/edge attributes keep extended graph. ‘default’ keeps ‘size’, ‘size2’, ‘shape’, ‘label’ ‘color’ vertex attributes ‘arrow.mode’ ‘arrow.size’ edge attributes. ‘’ keep graph, vertex edge attributes, ‘none’ keeps none . ... Passed layout_with_sugiyama().","code":""},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"list components: layout layout, two-column matrix, original graph vertices. layout.dummy layout dummy vertices, two column matrix. extd_graph original graph, extended dummy vertices. ‘dummy’ vertex attribute set graph, logical attributes, tells whether vertex dummy vertex. ‘layout’ graph attribute also set, layout matrix (original dummy) vertices.","code":""},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"layout algorithm designed directed acyclic graphs vertex assigned layer. Layers indexed zero, vertices layer placed horizontal line. X coordinates vertices within layer decided heuristic proposed Sugiyama et al. minimize edge crossings. can also try lay undirected graphs, graphs containing cycles, graphs without priori layered assignment algorithm. igraph try eliminate cycles assign vertices layers, guarantee quality layout cases. Sugiyama layout may introduce “bends” edges order obtain visually pleasing layout. achieved adding dummy nodes edges spanning one layer. resulting layout assigns coordinates nodes original graph also dummy nodes. layout algorithm also return extended graph dummy nodes. details, see reference .","code":""},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"K. Sugiyama, S. Tagawa M. Toda, \"Methods Visual Understanding Hierarchical Systems\". IEEE Transactions Systems, Man Cybernetics 11(2):109-125, 1981.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"","code":"## Data taken from http://tehnick-8.narod.ru/dc_clients/ DC <- graph_from_literal( \"DC++\" -+ \"LinuxDC++\":\"BCDC++\":\"EiskaltDC++\":\"StrongDC++\":\"DiCe!++\", \"LinuxDC++\" -+ \"FreeDC++\", \"BCDC++\" -+ \"StrongDC++\", \"FreeDC++\" -+ \"BMDC++\":\"EiskaltDC++\", \"StrongDC++\" -+ \"AirDC++\":\"zK++\":\"ApexDC++\":\"TkDC++\", \"StrongDC++\" -+ \"StrongDC++ SQLite\":\"RSX++\", \"ApexDC++\" -+ \"FlylinkDC++ ver <= 4xx\", \"ApexDC++\" -+ \"ApexDC++ Speed-Mod\":\"DiCe!++\", \"StrongDC++ SQLite\" -+ \"FlylinkDC++ ver >= 5xx\", \"ApexDC++ Speed-Mod\" -+ \"FlylinkDC++ ver <= 4xx\", \"ApexDC++ Speed-Mod\" -+ \"GreylinkDC++\", \"FlylinkDC++ ver <= 4xx\" -+ \"FlylinkDC++ ver >= 5xx\", \"FlylinkDC++ ver <= 4xx\" -+ AvaLink, \"GreylinkDC++\" -+ AvaLink:\"RayLinkDC++\":\"SparkDC++\":PeLink ) ## Use edge types E(DC)$lty <- 1 E(DC)[\"BCDC++\" %->% \"StrongDC++\"]$lty <- 2 E(DC)[\"FreeDC++\" %->% \"EiskaltDC++\"]$lty <- 2 E(DC)[\"ApexDC++\" %->% \"FlylinkDC++ ver <= 4xx\"]$lty <- 2 E(DC)[\"ApexDC++\" %->% \"DiCe!++\"]$lty <- 2 E(DC)[\"StrongDC++ SQLite\" %->% \"FlylinkDC++ ver >= 5xx\"]$lty <- 2 E(DC)[\"GreylinkDC++\" %->% \"AvaLink\"]$lty <- 2 ## Layers, as on the plot layers <- list( c(\"DC++\"), c(\"LinuxDC++\", \"BCDC++\"), c(\"FreeDC++\", \"StrongDC++\"), c( \"BMDC++\", \"EiskaltDC++\", \"AirDC++\", \"zK++\", \"ApexDC++\", \"TkDC++\", \"RSX++\" ), c(\"StrongDC++ SQLite\", \"ApexDC++ Speed-Mod\", \"DiCe!++\"), c(\"FlylinkDC++ ver <= 4xx\", \"GreylinkDC++\"), c( \"FlylinkDC++ ver >= 5xx\", \"AvaLink\", \"RayLinkDC++\", \"SparkDC++\", \"PeLink\" ) ) ## Check that we have all nodes all(sort(unlist(layers)) == sort(V(DC)$name)) #> [1] TRUE ## Add some graphical parameters V(DC)$color <- \"white\" V(DC)$shape <- \"rectangle\" V(DC)$size <- 20 V(DC)$size2 <- 10 V(DC)$label <- lapply(V(DC)$name, function(x) { paste(strwrap(x, 12), collapse = \"\\n\") }) E(DC)$arrow.size <- 0.5 ## Create a similar layout using the predefined layers lay1 <- layout_with_sugiyama(DC, layers = apply(sapply( layers, function(x) V(DC)$name %in% x ), 1, which)) ## Simple plot, not very nice par(mar = rep(.1, 4)) plot(DC, layout = lay1$layout, vertex.label.cex = 0.5) ## Sugiyama plot plot(lay1$extd_graph, vertex.label.cex = 0.5) ## The same with automatic layer calculation ## Keep vertex/edge attributes in the extended graph lay2 <- layout_with_sugiyama(DC, attributes = \"all\") plot(lay2$extd_graph, vertex.label.cex = 0.5) ## Another example, from the following paper: ## Markus Eiglsperger, Martin Siebenhaller, Michael Kaufmann: ## An Efficient Implementation of Sugiyama's Algorithm for ## Layered Graph Drawing, Journal of Graph Algorithms and ## Applications 9, 305--325 (2005). ex <- graph_from_literal( 0 -+ 29:6:5:20:4, 1 -+ 12, 2 -+ 23:8, 3 -+ 4, 4, 5 -+ 2:10:14:26:4:3, 6 -+ 9:29:25:21:13, 7, 8 -+ 20:16, 9 -+ 28:4, 10 -+ 27, 11 -+ 9:16, 12 -+ 9:19, 13 -+ 20, 14 -+ 10, 15 -+ 16:27, 16 -+ 27, 17 -+ 3, 18 -+ 13, 19 -+ 9, 20 -+ 4, 21 -+ 22, 22 -+ 8:9, 23 -+ 9:24, 24 -+ 12:15:28, 25 -+ 11, 26 -+ 18, 27 -+ 13:19, 28 -+ 7, 29 -+ 25 ) layers <- list( 0, c(5, 17), c(2, 14, 26, 3), c(23, 10, 18), c(1, 24), 12, 6, c(29, 21), c(25, 22), c(11, 8, 15), 16, 27, c(13, 19), c(9, 20), c(4, 28), 7 ) layex <- layout_with_sugiyama(ex, layers = apply( sapply( layers, function(x) V(ex)$name %in% as.character(x) ), 1, which )) origvert <- c(rep(TRUE, vcount(ex)), rep(FALSE, nrow(layex$layout.dummy))) realedge <- as_edgelist(layex$extd_graph)[, 2] <= vcount(ex) plot(layex$extd_graph, vertex.label.cex = 0.5, edge.arrow.size = .5, vertex.size = ifelse(origvert, 5, 0), vertex.shape = ifelse(origvert, \"square\", \"none\"), vertex.label = ifelse(origvert, V(ex)$name, \"\"), edge.arrow.mode = ifelse(realedge, 2, 0) )"},{"path":"https://r.igraph.org/reference/leading.eigenvector.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure detecting based on the leading eigenvector of the community matrix — leading.eigenvector.community","title":"Community structure detecting based on the leading eigenvector of the community matrix — leading.eigenvector.community","text":"leading.eigenvector.community() renamed cluster_leading_eigen() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/leading.eigenvector.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure detecting based on the leading eigenvector of the community matrix — leading.eigenvector.community","text":"","code":"leading.eigenvector.community( graph, steps = -1, weights = NULL, start = NULL, options = arpack_defaults(), callback = NULL, extra = NULL, env = parent.frame() )"},{"path":"https://r.igraph.org/reference/leading.eigenvector.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure detecting based on the leading eigenvector of the community matrix — leading.eigenvector.community","text":"graph input graph. undirected method needs symmetric matrix. steps number steps take, actually number tries make step. particularly useful parameter. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. start NULL, numeric membership vector, giving start configuration algorithm. options named list override ARPACK options. callback NULL, must callback function. called iteration, calculating leading eigenvector modularity matrix. See details . extra Additional argument supply callback function. env environment callback function evaluated.","code":""},{"path":"https://r.igraph.org/reference/line.graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Line graph of a graph — line.graph","title":"Line graph of a graph — line.graph","text":"line.graph() renamed make_line_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/line.graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Line graph of a graph — line.graph","text":"","code":"line.graph(graph)"},{"path":"https://r.igraph.org/reference/line.graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Line graph of a graph — line.graph","text":"graph input graph, can directed undirected.","code":""},{"path":"https://r.igraph.org/reference/list.edge.attributes.html","id":null,"dir":"Reference","previous_headings":"","what":"List names of edge attributes — list.edge.attributes","title":"List names of edge attributes — list.edge.attributes","text":"list.edge.attributes() renamed edge_attr_names() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/list.edge.attributes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List names of edge attributes — list.edge.attributes","text":"","code":"list.edge.attributes(graph)"},{"path":"https://r.igraph.org/reference/list.edge.attributes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List names of edge attributes — list.edge.attributes","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/list.graph.attributes.html","id":null,"dir":"Reference","previous_headings":"","what":"List names of graph attributes — list.graph.attributes","title":"List names of graph attributes — list.graph.attributes","text":"list.graph.attributes() renamed graph_attr_names() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/list.graph.attributes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List names of graph attributes — list.graph.attributes","text":"","code":"list.graph.attributes(graph)"},{"path":"https://r.igraph.org/reference/list.graph.attributes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List names of graph attributes — list.graph.attributes","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/list.vertex.attributes.html","id":null,"dir":"Reference","previous_headings":"","what":"List names of vertex attributes — list.vertex.attributes","title":"List names of vertex attributes — list.vertex.attributes","text":"list.vertex.attributes() renamed vertex_attr_names() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/list.vertex.attributes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List names of vertex attributes — list.vertex.attributes","text":"","code":"list.vertex.attributes(graph)"},{"path":"https://r.igraph.org/reference/list.vertex.attributes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List names of vertex attributes — list.vertex.attributes","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/local_scan.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute local scan statistics on graphs — local_scan","title":"Compute local scan statistics on graphs — local_scan","text":"scan statistic summary locality statistics computed local neighborhood vertex. local_scan() function computes local statistics vertex given neighborhood size statistic function.","code":""},{"path":"https://r.igraph.org/reference/local_scan.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute local scan statistics on graphs — local_scan","text":"","code":"local_scan( graph.us, graph.them = NULL, k = 1, FUN = NULL, weighted = FALSE, mode = c(\"out\", \"in\", \"all\"), neighborhoods = NULL, ... )"},{"path":"https://r.igraph.org/reference/local_scan.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute local scan statistics on graphs — local_scan","text":"graph.us, graph igraph object, graph scan statistics computed graph.igraph object NULL, NULL, ‘’ statistics computed, .e. neighborhoods calculated graph.us evaluated graph.. k integer scalar, size local neighborhood vertex. non-negative. FUN Character, function name, function object , computing local statistic neighborhood. NULL(default value), ecount() used unweighted graphs (weighted=FALSE) function computes sum edge weights used weighted graphs (weighted=TRUE). argument ignored k zero. weighted Logical scalar, TRUE edge weights used computation scan statistic. TRUE, graph weighted. Note argument ignored FUN NULL, \"ecount\" \"sumweights\". mode Character scalar, kind neighborhoods use calculation. One ‘’, ‘’, ‘’ ‘total’. argument ignored undirected graphs. neighborhoods list neighborhoods, one vertex, NULL. NULL, function evaluated induced subgraphs specified neighborhoods. theory useful graph.us graph used multiple graph.arguments. neighborhoods can calculated graph.us used multiple graphs. practice, currently slower simply using graph.multiple times. ... Arguments passed FUN, function computes local statistics.","code":""},{"path":"https://r.igraph.org/reference/local_scan.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute local scan statistics on graphs — local_scan","text":"local_scan() typically numeric vector containing computed local statistics vertex. general list vector objects, returned FUN.","code":""},{"path":"https://r.igraph.org/reference/local_scan.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute local scan statistics on graphs — local_scan","text":"See given reference details local scan statistics. local_scan() calculates exact local scan statistics. graph.NULL, local_scan() computes ‘us’ variant scan statistics. Otherwise, graph.igraph object ‘’ variant computed using graph.us extract neighborhood information, applying FUN neighborhoods graph..","code":""},{"path":"https://r.igraph.org/reference/local_scan.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compute local scan statistics on graphs — local_scan","text":"Priebe, C. E., Conroy, J. M., Marchette, D. J., Park, Y. (2005). Scan Statistics Enron Graphs. Computational Mathematical Organization Theory.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/local_scan.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute local scan statistics on graphs — local_scan","text":"","code":"pair <- sample_correlated_gnp_pair(n = 10^3, corr = 0.8, p = 0.1) local_0_us <- local_scan(graph.us = pair$graph1, k = 0) local_1_us <- local_scan(graph.us = pair$graph1, k = 1) local_0_them <- local_scan( graph.us = pair$graph1, graph.them = pair$graph2, k = 0 ) local_1_them <- local_scan( graph.us = pair$graph1, graph.them = pair$graph2, k = 1 ) Neigh_1 <- neighborhood(pair$graph1, order = 1) local_1_them_nhood <- local_scan( graph.us = pair$graph1, graph.them = pair$graph2, neighborhoods = Neigh_1 )"},{"path":"https://r.igraph.org/reference/make_.html","id":null,"dir":"Reference","previous_headings":"","what":"Make a new graph — make_","title":"Make a new graph — make_","text":"generic function creating graphs.","code":""},{"path":"https://r.igraph.org/reference/make_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make a new graph — make_","text":"","code":"make_(...)"},{"path":"https://r.igraph.org/reference/make_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make a new graph — make_","text":"... Parameters, see details .","code":""},{"path":"https://r.igraph.org/reference/make_.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Make a new graph — make_","text":"make_() generic function creating graphs. every graph constructor igraph make_ prefix, corresponding function without prefix: e.g. make_ring() also ring(), etc. true random graph samplers, .e. constructor sample_ prefix, corresponding function without prefix. shorter forms can used together make_(). advantage form user can specify constructor modifiers work constructors. E.g. with_vertex_() modifier adds vertex attributes newly created graphs. See examples various constructor modifiers .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make a new graph — make_","text":"","code":"r <- make_(ring(10)) l <- make_(lattice(c(3, 3, 3))) r2 <- make_(ring(10), with_vertex_(color = \"red\", name = LETTERS[1:10])) l2 <- make_(lattice(c(3, 3, 3)), with_edge_(weight = 2)) ran <- sample_(degseq(c(3, 3, 3, 3, 3, 3), method = \"configuration\"), simplified()) degree(ran) #> [1] 3 3 3 1 3 3 is_simple(ran) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a bipartite graph — make_bipartite_graph","title":"Create a bipartite graph — make_bipartite_graph","text":"bipartite graph two kinds vertices connections allowed different kinds.","code":""},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a bipartite graph — make_bipartite_graph","text":"","code":"make_bipartite_graph(types, edges, directed = FALSE) bipartite_graph(...)"},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a bipartite graph — make_bipartite_graph","text":"types vector giving vertex types. coerced boolean. length vector gives number vertices graph. vector named vector, names attached graph name vertex attribute. edges vector giving edges graph, way regular make_graph() function. checked edges indeed connect vertices different kind, according supplied types vector. vector may string vector types named vector. directed Whether create directed graph, boolean constant. Note default undirected graphs created, common bipartite graphs. ... Passed make_bipartite_graph().","code":""},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a bipartite graph — make_bipartite_graph","text":"make_bipartite_graph() returns bipartite igraph graph. words, igraph graph vertex attribute named type. is_bipartite() returns logical scalar.","code":""},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a bipartite graph — make_bipartite_graph","text":"Bipartite graphs type vertex attribute igraph, boolean FALSE vertices first kind TRUE vertices second kind. make_bipartite_graph() basically three things. First checks edges vector vertex types. creates graph using edges vector finally adds types vector vertex attribute called type. edges may contain strings vertex names; case, types must named vector specifies type vertex name occurs edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a bipartite graph — make_bipartite_graph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a bipartite graph — make_bipartite_graph","text":"","code":"g <- make_bipartite_graph(rep(0:1, length.out = 10), c(1:10)) print(g, v = TRUE) #> IGRAPH 33e3259 U--B 10 5 -- #> + attr: type (v/l) #> + edges from 33e3259: #> [1] 1-- 2 3-- 4 5-- 6 7-- 8 9--10"},{"path":"https://r.igraph.org/reference/make_chordal_ring.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an extended chordal ring graph — make_chordal_ring","title":"Create an extended chordal ring graph — make_chordal_ring","text":"make_chordal_ring() creates extended chordal ring. extended chordal ring regular graph, node degree. can obtained simple ring adding extra edges specified matrix. Let p denote number columns ‘W’ matrix. extra edges vertex added according column mod p ‘W’. number extra edges number rows ‘W’: row j edge ->+w[ij] added +w[ij] less number total nodes. See also Kotsis, G: Interconnection Topologies Parallel Processing Systems, PARS Mitteilungen 11, 1-6, 1993.","code":""},{"path":"https://r.igraph.org/reference/make_chordal_ring.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an extended chordal ring graph — make_chordal_ring","text":"","code":"make_chordal_ring(n, w, directed = FALSE) chordal_ring(...)"},{"path":"https://r.igraph.org/reference/make_chordal_ring.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an extended chordal ring graph — make_chordal_ring","text":"n number vertices. w matrix specifies extended chordal ring. See details . directed Logical scalar, whether create directed graph. ... Passed make_chordal_ring().","code":""},{"path":"https://r.igraph.org/reference/make_chordal_ring.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an extended chordal ring graph — make_chordal_ring","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_chordal_ring.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create an extended chordal ring graph — make_chordal_ring","text":"","code":"chord <- make_chordal_ring( 15, matrix(c(3, 12, 4, 7, 8, 11), nr = 2) )"},{"path":"https://r.igraph.org/reference/make_clusters.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a communities object. — make_clusters","title":"Creates a communities object. — make_clusters","text":"useful integrate results community finding algorithms included igraph.","code":""},{"path":"https://r.igraph.org/reference/make_clusters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a communities object. — make_clusters","text":"","code":"make_clusters( graph, membership = NULL, algorithm = NULL, merges = NULL, modularity = TRUE )"},{"path":"https://r.igraph.org/reference/make_clusters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a communities object. — make_clusters","text":"graph graph community structure. membership membership vector community structure, numeric vector denoting id community vertex. might NULL hierarchical community structures. algorithm Character string, algorithm generated community structure, can arbitrary. merges merge matrix, hierarchical community structures (NULL otherwise. modularity Modularity value community structure. TRUE membership vector available, modularity values calculated automatically.","code":""},{"path":"https://r.igraph.org/reference/make_clusters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a communities object. — make_clusters","text":"communities object.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"De Bruijn graphs — make_de_bruijn_graph","title":"De Bruijn graphs — make_de_bruijn_graph","text":"De Bruijn graphs labeled graphs representing overlap strings.","code":""},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"De Bruijn graphs — make_de_bruijn_graph","text":"","code":"make_de_bruijn_graph(m, n) de_bruijn_graph(...)"},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"De Bruijn graphs — make_de_bruijn_graph","text":"m Integer scalar, size alphabet. See details . n Integer scalar, length labels. See details . ... Passed make_de_bruijn_graph().","code":""},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"De Bruijn graphs — make_de_bruijn_graph","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"De Bruijn graphs — make_de_bruijn_graph","text":"de Bruijn graph represents relationships strings. alphabet m letters used strings length n considered. vertex corresponds every possible string directed edge vertex v vertex w string v can transformed string w removing first letter appending letter . Please note graph m power n vertices even edges, probably want supply big numbers m n. De Bruijn graphs interesting properties, please see another source, e.g. Wikipedia details.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"De Bruijn graphs — make_de_bruijn_graph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"De Bruijn graphs — make_de_bruijn_graph","text":"","code":"# de Bruijn graphs can be created recursively by line graphs as well g <- make_de_bruijn_graph(2, 1) make_de_bruijn_graph(2, 2) #> IGRAPH 1f07429 D--- 4 8 -- De-Bruijn graph 2-2 #> + attr: name (g/c), m (g/n), n (g/n) #> + edges from 1f07429: #> [1] 1->1 1->2 2->3 2->4 3->1 3->2 4->3 4->4 make_line_graph(g) #> IGRAPH 3b07b06 D--- 4 8 -- Line graph #> + attr: name (g/c) #> + edges from 3b07b06: #> [1] 1->1 3->1 1->2 3->2 2->3 4->3 2->4 4->4"},{"path":"https://r.igraph.org/reference/make_empty_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"A graph with no edges — make_empty_graph","title":"A graph with no edges — make_empty_graph","text":"graph edges","code":""},{"path":"https://r.igraph.org/reference/make_empty_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A graph with no edges — make_empty_graph","text":"","code":"make_empty_graph(n = 0, directed = TRUE) empty_graph(...)"},{"path":"https://r.igraph.org/reference/make_empty_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A graph with no edges — make_empty_graph","text":"n Number vertices. directed Whether create directed graph. ... Passed make_graph_empty.","code":""},{"path":"https://r.igraph.org/reference/make_empty_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A graph with no edges — make_empty_graph","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_empty_graph.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"A graph with no edges — make_empty_graph","text":"igraph_empty().","code":""},{"path":"https://r.igraph.org/reference/make_empty_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A graph with no edges — make_empty_graph","text":"","code":"make_empty_graph(n = 10) #> IGRAPH 0e13cad D--- 10 0 -- #> + edges from 0e13cad: make_empty_graph(n = 5, directed = FALSE) #> IGRAPH b873515 U--- 5 0 -- #> + edges from b873515:"},{"path":"https://r.igraph.org/reference/make_from_prufer.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","title":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","text":"make_from_prufer() creates undirected tree graph Prüfer sequence.","code":""},{"path":"https://r.igraph.org/reference/make_from_prufer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","text":"","code":"make_from_prufer(prufer) from_prufer(...)"},{"path":"https://r.igraph.org/reference/make_from_prufer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","text":"prufer Prüfer sequence convert graph ... Passed make_from_prufer()","code":""},{"path":"https://r.igraph.org/reference/make_from_prufer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/make_from_prufer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","text":"Prüfer sequence tree graph n labeled vertices sequence n-2 numbers, constructed follows. graph two vertices, find vertex degree one, remove tree add label vertex connected sequence. Repeat two vertices remaining graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_from_prufer.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","text":"igraph_from_prufer().","code":""},{"path":"https://r.igraph.org/reference/make_from_prufer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","text":"","code":"g <- make_tree(13, 3) to_prufer(g) #> [1] 2 2 2 1 3 3 3 1 4 4 4"},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a full bipartite graph — make_full_bipartite_graph","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"Bipartite graphs also called two-mode . function creates bipartite graph every possible edge present.","code":""},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"","code":"make_full_bipartite_graph( n1, n2, directed = FALSE, mode = c(\"all\", \"out\", \"in\") ) full_bipartite_graph(...)"},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"n1 number vertices first kind. n2 number vertices second kind. directed Logical scalar, whether graphs directed. mode Scalar giving kind edges create directed graphs. ‘’ vertices first kind connected others; ‘’ specifies opposite direction; ‘’ creates mutual edges. argument ignored undirected graphs.x ... Passed make_full_bipartite_graph().","code":""},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"igraph graph, ‘type’ vertex attribute set.","code":""},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"Bipartite graphs ‘type’ vertex attribute igraph, boolean FALSE vertices first kind TRUE vertices second kind.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"","code":"g <- make_full_bipartite_graph(2, 3) g2 <- make_full_bipartite_graph(2, 3, directed = TRUE) g3 <- make_full_bipartite_graph(2, 3, directed = TRUE, mode = \"in\") g4 <- make_full_bipartite_graph(2, 3, directed = TRUE, mode = \"all\")"},{"path":"https://r.igraph.org/reference/make_full_citation_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a complete (full) citation graph — make_full_citation_graph","title":"Create a complete (full) citation graph — make_full_citation_graph","text":"make_full_citation_graph() creates full citation graph. directed graph, every ->j edge present \\(j<\\). directed=FALSE graph just full graph.","code":""},{"path":"https://r.igraph.org/reference/make_full_citation_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a complete (full) citation graph — make_full_citation_graph","text":"","code":"make_full_citation_graph(n, directed = TRUE) full_citation_graph(...)"},{"path":"https://r.igraph.org/reference/make_full_citation_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a complete (full) citation graph — make_full_citation_graph","text":"n number vertices. directed Whether create directed graph. ... Passed make_full_citation_graph().","code":""},{"path":"https://r.igraph.org/reference/make_full_citation_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a complete (full) citation graph — make_full_citation_graph","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_full_citation_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a complete (full) citation graph — make_full_citation_graph","text":"","code":"print_all(make_full_citation_graph(10)) #> IGRAPH 29def14 D--- 10 45 -- Full citation graph #> + attr: name (g/c) #> + graph attributes: #> | + name: #> | [1] \"Full citation graph\" #> + edges: #> 1 -> 2 -> 1 3 -> 1 2 #> 4 -> 1 2 3 5 -> 1 2 3 4 6 -> 1 2 3 4 5 #> 7 -> 1 2 3 4 5 6 8 -> 1 2 3 4 5 6 7 9 -> 1 2 3 4 5 6 7 8 #> 10 -> 1 2 3 4 5 6 7 8 9"},{"path":"https://r.igraph.org/reference/make_full_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a full graph — make_full_graph","title":"Create a full graph — make_full_graph","text":"Create full graph","code":""},{"path":"https://r.igraph.org/reference/make_full_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a full graph — make_full_graph","text":"","code":"make_full_graph(n, directed = FALSE, loops = FALSE) full_graph(...)"},{"path":"https://r.igraph.org/reference/make_full_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a full graph — make_full_graph","text":"n Number vertices. directed Whether create directed graph. loops Whether add self-loops graph. ... Passed make_full_graph().","code":""},{"path":"https://r.igraph.org/reference/make_full_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a full graph — make_full_graph","text":"igraph graph","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_full_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a full graph — make_full_graph","text":"","code":"make_full_graph(5) #> IGRAPH 74f31e1 U--- 5 10 -- Full graph #> + attr: name (g/c), loops (g/l) #> + edges from 74f31e1: #> [1] 1--2 1--3 1--4 1--5 2--3 2--4 2--5 3--4 3--5 4--5 print_all(make_full_graph(4, directed = TRUE)) #> IGRAPH d157ff1 D--- 4 12 -- Full graph #> + attr: name (g/c), loops (g/l) #> + graph attributes: #> | + name: #> | [1] \"Full graph\" #> | + loops: #> | [1] FALSE #> + edges: #> 1 -> 2 3 4 2 -> 1 3 4 3 -> 1 2 4 4 -> 1 2 3"},{"path":"https://r.igraph.org/reference/make_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an igraph graph from a list of edges, or a notable graph — make_graph","title":"Create an igraph graph from a list of edges, or a notable graph — make_graph","text":"Create igraph graph list edges, notable graph","code":""},{"path":"https://r.igraph.org/reference/make_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an igraph graph from a list of edges, or a notable graph — make_graph","text":"","code":"make_graph( edges, ..., n = max(edges), isolates = NULL, directed = TRUE, dir = directed, simplify = TRUE ) make_directed_graph(edges, n = max(edges)) make_undirected_graph(edges, n = max(edges)) directed_graph(...) undirected_graph(...)"},{"path":"https://r.igraph.org/reference/make_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an igraph graph from a list of edges, or a notable graph — make_graph","text":"edges vector defining edges, first edge points first element second, second edge third fourth, etc. numeric vector, interpreted internal vertex ids. character vectors, interpreted vertex names. Alternatively, can character scalar, name notable graph. See Notable graphs . name case insensitive. Starting igraph 0.8.0, can also include literals , via igraph's formula notation (see graph_from_literal()). case, first term formula start ‘~’ character, just like regular formulae R. See examples . ... make_graph(): extra arguments case graph given via literal, see graph_from_literal(). directed_graph() undirected_graph(): Passed make_directed_graph() make_undirected_graph(). n number vertices graph. argument ignored (warning) edges symbolic vertex names. also ignored bigger vertex id edges. means function safe supply zero vertex largest id isolate. isolates Character vector, names isolate vertices, symbolic edge lists. ignored numeric edge lists. directed Whether create directed graph. dir directed, compatibility. give . simplify graph literals, whether simplify graph.","code":""},{"path":"https://r.igraph.org/reference/make_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an igraph graph from a list of edges, or a notable graph — make_graph","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/make_graph.html","id":"notable-graphs","dir":"Reference","previous_headings":"","what":"Notable graphs","title":"Create an igraph graph from a list of edges, or a notable graph — make_graph","text":"make_graph() can create notable graphs. name graph (case insensitive), character scalar must supplied edges argument, arguments ignored. (warning given specified.) make_graph() knows following graphs: Bull bull graph, 5 vertices, 5 edges, resembles head bull drawn properly. Chvatal smallest triangle-free graph 4-chromatic 4-regular. According Grunbaum conjecture exists m-regular, m-chromatic graph n vertices every m>1 n>2. Chvatal graph example m=4 n=12. 24 edges. Coxeter non-Hamiltonian cubic symmetric graph 28 vertices 42 edges. Cubical Platonic graph cube. convex regular polyhedron 8 vertices 12 edges. Diamond graph 4 vertices 5 edges, resembles schematic diamond drawn properly. Dodecahedral, Dodecahedron Another Platonic solid 20 vertices 30 edges. Folkman semisymmetric graph minimum number vertices, 20 40 edges. semisymmetric graph regular, edge transitive vertex transitive. Franklin graph whose embedding Klein bottle can colored six colors, counterexample necessity Heawood conjecture Klein bottle. 12 vertices 18 edges. Frucht Frucht Graph smallest cubical graph whose automorphism group consists identity element. 12 vertices 18 edges. Grotzsch Groetzsch graph triangle-free graph 11 vertices, 20 edges, chromatic number 4. named German mathematician Herbert Groetzsch, existence demonstrates assumption planarity necessary Groetzsch's theorem every triangle-free planar graph 3-colorable. Heawood Heawood graph undirected graph 14 vertices 21 edges. graph cubic, cycles graph six edges. Every smaller cubic graph shorter cycles, graph 6-cage, smallest cubic graph girth 6. Herschel Herschel graph smallest nonhamiltonian polyhedral graph. unique graph 11 nodes, 18 edges. House house graph 5-vertex, 6-edge graph, schematic draw house drawn properly, basicly triangle top square. HouseX house graph X square. 5 vertices 8 edges. Icosahedral, Icosahedron Platonic solid 12 vertices 30 edges. Krackhardt kite social network 10 vertices 18 edges. Krackhardt, D. Assessing Political Landscape: Structure, Cognition, Power Organizations. Admin. Sci. Quart. 35, 342-369, 1990. Levi graph 4-arc transitive cubic graph, 30 vertices 45 edges. McGee McGee graph unique 3-regular 7-cage graph, 24 vertices 36 edges. Meredith Meredith graph quartic graph 70 nodes 140 edges counterexample conjecture every 4-regular 4-connected graph Hamiltonian. Noperfectmatching connected graph 16 vertices 27 edges containing perfect matching. matching graph set pairwise non-adjacent edges; , two edges share common vertex. perfect matching matching covers vertices graph. Nonline graph whose connected components 9 graphs whose presence vertex-induced subgraph graph makes nonline graph. 50 vertices 72 edges. Octahedral, Octahedron Platonic solid 6 vertices 12 edges. Petersen 3-regular graph 10 vertices 15 edges. smallest hypohamiltonian graph, .e. non-hamiltonian removing single vertex makes Hamiltonian. Robertson unique (4,5)-cage graph, .e. 4-regular graph girth 5. 19 vertices 38 edges. Smallestcyclicgroup smallest nontrivial graph whose automorphism group cyclic. 9 vertices 15 edges. Tetrahedral, Tetrahedron Platonic solid 4 vertices 6 edges. Thomassen smallest hypotraceable graph, 34 vertices 52 edges. hypotraceable graph contain Hamiltonian path removing single vertex remainder always contains Hamiltonian path. graph containing Hamiltonian path called traceable. Tutte Tait's Hamiltonian graph conjecture states every 3-connected 3-regular planar graph Hamiltonian. graph counterexample. 46 vertices 69 edges. Uniquely3colorable Returns 12-vertex, triangle-free graph chromatic number 3 uniquely 3-colorable. Walther identity graph 25 vertices 31 edges. identity graph single graph automorphism, trivial one. Zachary Social network friendships 34 members karate club US university 1970s. See W. W. Zachary, information flow model conflict fission small groups, Journal Anthropological Research 33, 452-473 (1977).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create an igraph graph from a list of edges, or a notable graph — make_graph","text":"","code":"make_graph(c(1, 2, 2, 3, 3, 4, 5, 6), directed = FALSE) #> IGRAPH 18733f5 U--- 6 4 -- #> + edges from 18733f5: #> [1] 1--2 2--3 3--4 5--6 make_graph(c(\"A\", \"B\", \"B\", \"C\", \"C\", \"D\"), directed = FALSE) #> IGRAPH 1580f91 UN-- 4 3 -- #> + attr: name (v/c) #> + edges from 1580f91 (vertex names): #> [1] A--B B--C C--D solids <- list( make_graph(\"Tetrahedron\"), make_graph(\"Cubical\"), make_graph(\"Octahedron\"), make_graph(\"Dodecahedron\"), make_graph(\"Icosahedron\") ) graph <- make_graph( ~ A - B - C - D - A, E - A:B:C:D, F - G - H - I - F, J - F:G:H:I, K - L - M - N - K, O - K:L:M:N, P - Q - R - S - P, T - P:Q:R:S, B - F, E - J, C - I, L - T, O - T, M - S, C - P, C - L, I - L, I - P )"},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Kautz graphs — make_kautz_graph","title":"Kautz graphs — make_kautz_graph","text":"Kautz graphs labeled graphs representing overlap strings.","code":""},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kautz graphs — make_kautz_graph","text":"","code":"make_kautz_graph(m, n) kautz_graph(...)"},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kautz graphs — make_kautz_graph","text":"m Integer scalar, size alphabet. See details . n Integer scalar, length labels. See details . ... Passed make_kautz_graph().","code":""},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Kautz graphs — make_kautz_graph","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Kautz graphs — make_kautz_graph","text":"Kautz graph labeled graph, vertices labeled strings length n+1 alphabet m+1 letters, restriction every two consecutive letters string must different. directed edge vertex v another vertex w possible transform string v string w removing first letter appending letter . Kautz graphs interesting properties, see e.g. Wikipedia details.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Kautz graphs — make_kautz_graph","text":"Gabor Csardi csardi.gabor@gmail.com, first version R written Vincent Matossian.","code":""},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kautz graphs — make_kautz_graph","text":"","code":"make_line_graph(make_kautz_graph(2, 1)) #> IGRAPH 2facc53 D--- 12 24 -- Line graph #> + attr: name (g/c) #> + edges from 2facc53: #> [1] 5-> 1 9-> 1 5-> 2 9-> 2 6-> 3 10-> 3 6-> 4 10-> 4 1-> 5 11-> 5 #> [11] 1-> 6 11-> 6 2-> 7 12-> 7 2-> 8 12-> 8 3-> 9 7-> 9 3->10 7->10 #> [21] 4->11 8->11 4->12 8->12 make_kautz_graph(2, 2) #> IGRAPH c716acd D--- 12 24 -- Kautz graph 2-2 #> + attr: name (g/c), m (g/n), n (g/n) #> + edges from c716acd: #> [1] 1-> 5 1-> 6 2-> 7 2-> 8 3-> 9 3->10 4->11 4->12 5-> 1 5-> 2 #> [11] 6-> 3 6-> 4 7-> 9 7->10 8->11 8->12 9-> 1 9-> 2 10-> 3 10-> 4 #> [21] 11-> 5 11-> 6 12-> 7 12-> 8"},{"path":"https://r.igraph.org/reference/make_lattice.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a lattice graph — make_lattice","title":"Create a lattice graph — make_lattice","text":"make_lattice() flexible function, can create lattices arbitrary dimensions, periodic aperiodic ones. two forms. first form supply dimvector, length dim. second form omit dimvector supply length dim.","code":""},{"path":"https://r.igraph.org/reference/make_lattice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a lattice graph — make_lattice","text":"","code":"make_lattice( dimvector = NULL, length = NULL, dim = NULL, nei = 1, directed = FALSE, mutual = FALSE, periodic = FALSE, circular = deprecated() ) lattice(...)"},{"path":"https://r.igraph.org/reference/make_lattice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a lattice graph — make_lattice","text":"dimvector vector giving size lattice dimension. length Integer constant, regular lattices, size lattice dimension. dim Integer constant, dimension lattice. nei distance within (inclusive) neighbors lattice connected. parameter used right now. directed Whether create directed lattice. mutual Logical, TRUE directed lattices mutually connected. periodic Logical vector, Boolean vector, defines whether generated lattice periodic along dimension. parameter may also scalar boolen value extended boolean vector dimvector length. circular Deprecated, use periodic instead. ... Passed make_lattice().","code":""},{"path":"https://r.igraph.org/reference/make_lattice.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a lattice graph — make_lattice","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_lattice.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Create a lattice graph — make_lattice","text":"igraph_square_lattice().","code":""},{"path":"https://r.igraph.org/reference/make_lattice.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a lattice graph — make_lattice","text":"","code":"make_lattice(c(5, 5, 5)) #> IGRAPH 9146786 U--- 125 300 -- Lattice graph #> + attr: name (g/c), dimvector (g/n), nei (g/n), mutual (g/l), circular #> | (g/l) #> + edges from 9146786: #> [1] 1-- 2 1-- 6 1--26 2-- 3 2-- 7 2--27 3-- 4 3-- 8 3--28 4-- 5 #> [11] 4-- 9 4--29 5--10 5--30 6-- 7 6--11 6--31 7-- 8 7--12 7--32 #> [21] 8-- 9 8--13 8--33 9--10 9--14 9--34 10--15 10--35 11--12 11--16 #> [31] 11--36 12--13 12--17 12--37 13--14 13--18 13--38 14--15 14--19 14--39 #> [41] 15--20 15--40 16--17 16--21 16--41 17--18 17--22 17--42 18--19 18--23 #> [51] 18--43 19--20 19--24 19--44 20--25 20--45 21--22 21--46 22--23 22--47 #> [61] 23--24 23--48 24--25 24--49 25--50 26--27 26--31 26--51 27--28 27--32 #> + ... omitted several edges make_lattice(length = 5, dim = 3) #> IGRAPH f9a188e U--- 125 300 -- Lattice graph #> + attr: name (g/c), dimvector (g/n), nei (g/n), mutual (g/l), circular #> | (g/l) #> + edges from f9a188e: #> [1] 1-- 2 1-- 6 1--26 2-- 3 2-- 7 2--27 3-- 4 3-- 8 3--28 4-- 5 #> [11] 4-- 9 4--29 5--10 5--30 6-- 7 6--11 6--31 7-- 8 7--12 7--32 #> [21] 8-- 9 8--13 8--33 9--10 9--14 9--34 10--15 10--35 11--12 11--16 #> [31] 11--36 12--13 12--17 12--37 13--14 13--18 13--38 14--15 14--19 14--39 #> [41] 15--20 15--40 16--17 16--21 16--41 17--18 17--22 17--42 18--19 18--23 #> [51] 18--43 19--20 19--24 19--44 20--25 20--45 21--22 21--46 22--23 22--47 #> [61] 23--24 23--48 24--25 24--49 25--50 26--27 26--31 26--51 27--28 27--32 #> + ... omitted several edges"},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Line graph of a graph — make_line_graph","title":"Line graph of a graph — make_line_graph","text":"function calculates line graph another graph.","code":""},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Line graph of a graph — make_line_graph","text":"","code":"make_line_graph(graph) line_graph(...)"},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Line graph of a graph — make_line_graph","text":"graph input graph, can directed undirected. ... Passed make_line_graph().","code":""},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Line graph of a graph — make_line_graph","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Line graph of a graph — make_line_graph","text":"line graph L(G) G undirected graph defined follows. L(G) one vertex edge G two vertices L(G) connected edge corresponding edges share end point. line graph L(G) G directed graph slightly different, L(G) one vertex edge G two vertices L(G) connected directed edge target first vertex's corresponding edge source second vertex's corresponding edge.","code":""},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Line graph of a graph — make_line_graph","text":"Gabor Csardi csardi.gabor@gmail.com, first version C code written Vincent Matossian.","code":""},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Line graph of a graph — make_line_graph","text":"","code":"# generate the first De-Bruijn graphs g <- make_full_graph(2, directed = TRUE, loops = TRUE) make_line_graph(g) #> IGRAPH dbe789b D--- 4 8 -- Line graph #> + attr: name (g/c) #> + edges from dbe789b: #> [1] 1->1 3->1 1->2 3->2 2->3 4->3 2->4 4->4 make_line_graph(make_line_graph(g)) #> IGRAPH 3b15570 D--- 8 16 -- Line graph #> + attr: name (g/c) #> + edges from 3b15570: #> [1] 1->1 2->1 5->2 6->2 1->3 2->3 5->4 6->4 3->5 4->5 7->6 8->6 3->7 4->7 7->8 #> [16] 8->8 make_line_graph(make_line_graph(make_line_graph(g))) #> IGRAPH b011f44 D--- 16 32 -- Line graph #> + attr: name (g/c) #> + edges from b011f44: #> [1] 1-> 1 2-> 1 3-> 2 4-> 2 9-> 3 10-> 3 11-> 4 12-> 4 1-> 5 2-> 5 #> [11] 3-> 6 4-> 6 9-> 7 10-> 7 11-> 8 12-> 8 5-> 9 6-> 9 7->10 8->10 #> [21] 13->11 14->11 15->12 16->12 5->13 6->13 7->14 8->14 13->15 14->15 #> [31] 15->16 16->16"},{"path":"https://r.igraph.org/reference/make_ring.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a ring graph — make_ring","title":"Create a ring graph — make_ring","text":"ring one-dimensional lattice function special case make_lattice().","code":""},{"path":"https://r.igraph.org/reference/make_ring.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a ring graph — make_ring","text":"","code":"make_ring(n, directed = FALSE, mutual = FALSE, circular = TRUE) ring(...)"},{"path":"https://r.igraph.org/reference/make_ring.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a ring graph — make_ring","text":"n Number vertices. directed Whether graph directed. mutual Whether directed edges mutual. ignored undirected graphs. circular Whether create circular ring. non-circular ring essentially “line”: tree every non-leaf vertex one child. ... Passed make_ring().","code":""},{"path":"https://r.igraph.org/reference/make_ring.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a ring graph — make_ring","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_ring.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a ring graph — make_ring","text":"","code":"print_all(make_ring(10)) #> IGRAPH 4dee40c U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + graph attributes: #> | + name: #> | [1] \"Ring graph\" #> | + mutual: #> | [1] FALSE #> | + circular: #> | [1] TRUE #> + edges from 4dee40c: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 print_all(make_ring(10, directed = TRUE, mutual = TRUE)) #> IGRAPH 931350c D--- 10 20 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + graph attributes: #> | + name: #> | [1] \"Ring graph\" #> | + mutual: #> | [1] TRUE #> | + circular: #> | [1] TRUE #> + edges from 931350c: #> [1] 1-> 2 2-> 1 2-> 3 3-> 2 3-> 4 4-> 3 4-> 5 5-> 4 5-> 6 6-> 5 #> [11] 6-> 7 7-> 6 7-> 8 8-> 7 8-> 9 9-> 8 9->10 10-> 9 10-> 1 1->10"},{"path":"https://r.igraph.org/reference/make_star.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a star graph, a tree with n vertices and n - 1 leaves — make_star","title":"Create a star graph, a tree with n vertices and n - 1 leaves — make_star","text":"star() creates star graph, every single vertex connected center vertex nobody else.","code":""},{"path":"https://r.igraph.org/reference/make_star.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a star graph, a tree with n vertices and n - 1 leaves — make_star","text":"","code":"make_star(n, mode = c(\"in\", \"out\", \"mutual\", \"undirected\"), center = 1) star(...)"},{"path":"https://r.igraph.org/reference/make_star.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a star graph, a tree with n vertices and n - 1 leaves — make_star","text":"n Number vertices. mode defines direction edges, : edges point center, : edges point center, mutual: directed star created mutual edges, undirected: edges undirected. center ID center vertex. ... Passed make_star().","code":""},{"path":"https://r.igraph.org/reference/make_star.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a star graph, a tree with n vertices and n - 1 leaves — make_star","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_star.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a star graph, a tree with n vertices and n - 1 leaves — make_star","text":"","code":"make_star(10, mode = \"out\") #> IGRAPH 9970db7 D--- 10 9 -- Out-star #> + attr: name (g/c), mode (g/c), center (g/n) #> + edges from 9970db7: #> [1] 1-> 2 1-> 3 1-> 4 1-> 5 1-> 6 1-> 7 1-> 8 1-> 9 1->10 make_star(5, mode = \"undirected\") #> IGRAPH 608a9d6 U--- 5 4 -- Star #> + attr: name (g/c), mode (g/c), center (g/n) #> + edges from 608a9d6: #> [1] 1--2 1--3 1--4 1--5"},{"path":"https://r.igraph.org/reference/make_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Create tree graphs — make_tree","title":"Create tree graphs — make_tree","text":"Create k-ary tree graph, almost vertices leaves number children.","code":""},{"path":"https://r.igraph.org/reference/make_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create tree graphs — make_tree","text":"","code":"make_tree(n, children = 2, mode = c(\"out\", \"in\", \"undirected\")) tree(...)"},{"path":"https://r.igraph.org/reference/make_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create tree graphs — make_tree","text":"n Number vertices. children Integer scalar, number children vertex (except leafs) mode Defines direction edges. indicates edges point parent children, indicates point children parents, undirected creates undirected graph. ... Passed make_tree() sample_tree().","code":""},{"path":"https://r.igraph.org/reference/make_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create tree graphs — make_tree","text":"igraph graph","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create tree graphs — make_tree","text":"","code":"make_tree(10, 2) #> IGRAPH 2e2426a D--- 10 9 -- Tree #> + attr: name (g/c), children (g/n), mode (g/c) #> + edges from 2e2426a: #> [1] 1-> 2 1-> 3 2-> 4 2-> 5 3-> 6 3-> 7 4-> 8 4-> 9 5->10 make_tree(10, 3, mode = \"undirected\") #> IGRAPH 33ebda5 U--- 10 9 -- Tree #> + attr: name (g/c), children (g/n), mode (g/c) #> + edges from 33ebda5: #> [1] 1-- 2 1-- 3 1-- 4 2-- 5 2-- 6 2-- 7 3-- 8 3-- 9 3--10"},{"path":"https://r.igraph.org/reference/match_vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Match Graphs given a seeding of vertex correspondences — match_vertices","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"Given two adjacency matrices B size, match two graphs help m seed vertex pairs correspond first m rows (columns) adjacency matrices.","code":""},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"","code":"match_vertices(A, B, m, start, iteration)"},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"numeric matrix, adjacency matrix first graph B numeric matrix, adjacency matrix second graph m number seeds. first m vertices graphs matched. start numeric matrix, permutation matrix estimate initialized start iteration number iterations Frank-Wolfe algorithm","code":""},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"numeric matrix permutation matrix determines bijection graphs B","code":""},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"approximate graph matching problem find bijection vertices two graphs , number edge disagreements corresponding vertex pairs minimized. seeded graph matching, part bijection consist known correspondences (seeds) known problem task complete bijection estimating permutation matrix permutes rows columns adjacency matrix second graph. assumed two supplied adjacency matrices B, size \\(n\\times n\\), first \\(m\\) rows(columns) B correspond vertices graphs. , \\(n \\times n\\) permutation matrix defines bijection \\(I_{m} \\bigoplus P\\) \\((n-m)\\times (n-m)\\) permutation matrix \\(P\\) \\(m\\) times \\(m\\) identity matrix \\(I_{m}\\). function match_vertices() estimates permutation matrix \\(P\\) via optimization algorithm based Frank-Wolfe algorithm. See references details.","code":""},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"Vogelstein, J. T., Conroy, J. M., Podrazik, L. J., Kratzer, S. G., Harley, E. T., Fishkind, D. E.,Vogelstein, R. J., Priebe, C. E. (2011). Fast Approximate Quadratic Programming Large (Brain) Graph Matching. Online: https://arxiv.org/abs/1112.5507 Fishkind, D. E., Adali, S., Priebe, C. E. (2012). Seeded Graph Matching Online: https://arxiv.org/abs/1209.0367","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"Vince Lyzinski https://www.ams.jhu.edu/~lyzinski/","code":""},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"","code":"# require(Matrix) g1 <- sample_gnp(10, 0.1) randperm <- c(1:3, 3 + sample(7)) g2 <- sample_correlated_gnp(g1, corr = 1, p = g1$p, permutation = randperm) A <- as_adjacency_matrix(g1) B <- as_adjacency_matrix(g2) P <- match_vertices(A, B, m = 3, start = diag(rep(1, nrow(A) - 3)), 20) P #> $corr #> [,1] [,2] #> [1,] 4 4 #> [2,] 5 5 #> [3,] 6 9 #> [4,] 7 6 #> [5,] 8 8 #> [6,] 9 7 #> [7,] 10 10 #> #> $P #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> [1,] 1 0 0 0 0 0 0 0 0 0 #> [2,] 0 1 0 0 0 0 0 0 0 0 #> [3,] 0 0 1 0 0 0 0 0 0 0 #> [4,] 0 0 0 1 0 0 0 0 0 0 #> [5,] 0 0 0 0 1 0 0 0 0 0 #> [6,] 0 0 0 0 0 0 0 0 1 0 #> [7,] 0 0 0 0 0 1 0 0 0 0 #> [8,] 0 0 0 0 0 0 0 1 0 0 #> [9,] 0 0 0 0 0 0 1 0 0 0 #> [10,] 0 0 0 0 0 0 0 0 0 1 #> #> $D #> 7 x 7 sparse Matrix of class \"dgCMatrix\" #> #> [1,] 1 . . . . . . #> [2,] . 1 . . . . . #> [3,] . . . . . 1 . #> [4,] . . 1 . . . . #> [5,] . . . . 1 . . #> [6,] . . . 1 . . . #> [7,] . . . . . . 1 #>"},{"path":"https://r.igraph.org/reference/matching.html","id":null,"dir":"Reference","previous_headings":"","what":"Matching — is_matching","title":"Matching — is_matching","text":"matching graph means selection set edges pairwise non-adjacent, .e. common incident vertices. matching maximal proper subset matching.","code":""},{"path":"https://r.igraph.org/reference/matching.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Matching — is_matching","text":"","code":"is_matching(graph, matching, types = NULL) is_max_matching(graph, matching, types = NULL) max_bipartite_match( graph, types = NULL, weights = NULL, eps = .Machine$double.eps )"},{"path":"https://r.igraph.org/reference/matching.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Matching — is_matching","text":"graph input graph. might directed, edge directions ignored. matching potential matching. integer vector gives pair matching vertex. vertices without pair, supply NA . types Vertex types, graph bipartite. default taken ‘type’ vertex attribute, present. weights Potential edge weights. graph edge attribute called ‘weight’, argument NULL, edge attribute used automatically. weighted matching, weights edges must match much possible. eps small real number used equality tests weighted bipartite matching algorithm. Two real numbers considered equal algorithm difference smaller eps. required avoid accumulation numerical errors. default set smallest \\(x\\), \\(1+x \\ne 1\\) holds. running algorithm weights, argument ignored.","code":""},{"path":"https://r.igraph.org/reference/matching.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Matching — is_matching","text":"is_matching() is_max_matching() return logical scalar. max_bipartite_match() returns list components: matching_size size matching, .e. number edges connecting matched vertices. matching_weight weights matching, graph weighted. unweighted graphs size matching. matching matching . Numeric vertex id, vertex names graph named. Non-matched vertices denoted NA.","code":""},{"path":"https://r.igraph.org/reference/matching.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Matching — is_matching","text":"is_matching() checks matching vector verifies whether length matches number vertices given graph, values zero (inclusive) number vertices (inclusive), whether exists corresponding edge graph every matched vertex pair. bipartite graphs, also verifies whether matched vertices different parts graph. is_max_matching() checks whether matching maximal. matching maximal exists unmatched vertex graph one neighbors also unmatched. max_bipartite_match() calculates maximum matching bipartite graph. matching bipartite graph partial assignment vertices first kind vertices second kind vertex first kind matched one vertex second kind vice versa, matched vertices must connected edge graph. size (cardinality) matching number edges. matching maximum matching exists matching larger cardinality. weighted graphs, maximum matching matching whose edges largest possible total weight among possible matchings. Maximum matchings bipartite graphs found push-relabel algorithm greedy initialization global relabeling every \\(n/2\\) steps \\(n\\) number vertices graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/matching.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Matching — is_matching","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/matching.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Matching — is_matching","text":"","code":"g <- graph_from_literal(a - b - c - d - e - f) m1 <- c(\"b\", \"a\", \"d\", \"c\", \"f\", \"e\") # maximal matching m2 <- c(\"b\", \"a\", \"d\", \"c\", NA, NA) # non-maximal matching m3 <- c(\"b\", \"c\", \"d\", \"c\", NA, NA) # not a matching is_matching(g, m1) #> [1] TRUE is_matching(g, m2) #> [1] TRUE is_matching(g, m3) #> [1] FALSE is_max_matching(g, m1) #> [1] TRUE is_max_matching(g, m2) #> [1] FALSE is_max_matching(g, m3) #> [1] FALSE V(g)$type <- rep(c(FALSE, TRUE), 3) print_all(g, v = TRUE) #> IGRAPH 10b4395 UN-B 6 5 -- #> + attr: name (v/c), type (v/l) #> + vertex attributes: #> | name type #> | [1] a FALSE #> | [2] b TRUE #> | [3] c FALSE #> | [4] d TRUE #> | [5] e FALSE #> | [6] f TRUE #> + edges from 10b4395 (vertex names): #> [1] a--b b--c c--d d--e e--f max_bipartite_match(g) #> $matching_size #> [1] 3 #> #> $matching_weight #> [1] 3 #> #> $matching #> a b c d e f #> \"b\" \"a\" \"d\" \"c\" \"f\" \"e\" #> g2 <- graph_from_literal(a - b - c - d - e - f - g) V(g2)$type <- rep(c(FALSE, TRUE), length.out = vcount(g2)) print_all(g2, v = TRUE) #> IGRAPH 3f48f3c UN-B 7 6 -- #> + attr: name (v/c), type (v/l) #> + vertex attributes: #> | name type #> | [1] a FALSE #> | [2] b TRUE #> | [3] c FALSE #> | [4] d TRUE #> | [5] e FALSE #> | [6] f TRUE #> | [7] g FALSE #> + edges from 3f48f3c (vertex names): #> [1] a--b b--c c--d d--e e--f f--g max_bipartite_match(g2) #> $matching_size #> [1] 3 #> #> $matching_weight #> [1] 3 #> #> $matching #> a b c d e f g #> \"b\" \"a\" \"d\" \"c\" \"f\" \"e\" NA #> #' @keywords graphs"},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":null,"dir":"Reference","previous_headings":"","what":"Maximum cardinality search — max_cardinality","title":"Maximum cardinality search — max_cardinality","text":"Maximum cardinality search simple ordering vertices useful determining chordality graph.","code":""},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Maximum cardinality search — max_cardinality","text":"","code":"max_cardinality(graph)"},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Maximum cardinality search — max_cardinality","text":"graph input graph. may directed, edge directions ignored, algorithm defined undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Maximum cardinality search — max_cardinality","text":"list two components: alpha Numeric vector. 1-based rank vertex graph vertex rank 1 visited first, vertex rank 2 visited second . alpham1 Numeric vector. inverse alpha. words, elements vector vertices reverse maximum cardinality search order.","code":""},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Maximum cardinality search — max_cardinality","text":"Maximum cardinality search visits vertices order every time vertex already visited neighbors visited. Ties broken randomly. algorithm provides simple basis deciding whether graph chordal, see References , also is_chordal().","code":""},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Maximum cardinality search — max_cardinality","text":"Robert E Tarjan Mihalis Yannakakis. (1984). Simple linear-time algorithms test chordality graphs, test acyclicity hypergraphs, selectively reduce acyclic hypergraphs. SIAM Journal Computation 13, 566–579.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Maximum cardinality search — max_cardinality","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Maximum cardinality search — max_cardinality","text":"igraph_maximum_cardinality_search().","code":""},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Maximum cardinality search — max_cardinality","text":"","code":"## The examples from the Tarjan-Yannakakis paper g1 <- graph_from_literal( A - B:C:I, B - A:C:D, C - A:B:E:H, D - B:E:F, E - C:D:F:H, F - D:E:G, G - F:H, H - C:E:G:I, I - A:H ) max_cardinality(g1) #> $alpha #> [1] 9 4 6 8 3 5 7 2 1 #> #> $alpham1 #> + 9/9 vertices, named, from fca21e2: #> [1] G F D B E C H I A #> is_chordal(g1, fillin = TRUE) #> $chordal #> [1] FALSE #> #> $fillin #> [1] 2 6 8 7 5 7 2 7 6 1 7 1 #> #> $newgraph #> NULL #> g2 <- graph_from_literal( A - B:E, B - A:E:F:D, C - E:D:G, D - B:F:E:C:G, E - A:B:C:D:F, F - B:D:E, G - C:D:H:I, H - G:I:J, I - G:H:J, J - H:I ) max_cardinality(g2) #> $alpha #> [1] 10 8 9 6 7 5 4 2 3 1 #> #> $alpham1 #> + 10/10 vertices, named, from 582d5b5: #> [1] J H I G C F D B E A #> is_chordal(g2, fillin = TRUE) #> $chordal #> [1] TRUE #> #> $fillin #> numeric(0) #> #> $newgraph #> NULL #>"},{"path":"https://r.igraph.org/reference/max_flow.html","id":null,"dir":"Reference","previous_headings":"","what":"Maximum flow in a graph — max_flow","title":"Maximum flow in a graph — max_flow","text":"graph edge given flow capacity maximal flow two vertices calculated.","code":""},{"path":"https://r.igraph.org/reference/max_flow.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Maximum flow in a graph — max_flow","text":"","code":"max_flow(graph, source, target, capacity = NULL)"},{"path":"https://r.igraph.org/reference/max_flow.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Maximum flow in a graph — max_flow","text":"graph input graph. source id source vertex. target id target vertex (sometimes also called sink). capacity Vector giving capacity edges. NULL (default) capacity edge attribute used. Note weight edge attribute used function.","code":""},{"path":"https://r.igraph.org/reference/max_flow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Maximum flow in a graph — max_flow","text":"named list components: value numeric scalar, value maximum flow. flow numeric vector, flow , one entry edge. undirected graphs entry bit trickier, since flow direction predetermined edge direction. graphs elements vector can negative, means flow goes bigger vertex id smaller one. Positive values mean flow goes smaller vertex id bigger one. cut numeric vector edge ids, minimum cut corresponding maximum flow. partition1 numeric vector vertex ids, vertices first partition minimum cut corresponding maximum flow. partition2 numeric vector vertex ids, vertices second partition minimum cut corresponding maximum flow. stats list statistics push-relabel algorithm. Five integer values currently: nopush number push operations, norelabel number relabelings, nogap number times gap heuristics used, nogapnodes total number gap nodes omitted gap heuristics nobfs number times global breadth-first-search update performed assign better height (=distance) values vertices.","code":""},{"path":"https://r.igraph.org/reference/max_flow.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Maximum flow in a graph — max_flow","text":"max_flow() calculates maximum flow two vertices weighted (.e. valued) graph. flow source target assignment non-negative real numbers edges graph, satisfying two properties: (1) edge flow (.e. assigned number) capacity edge (capacity parameter edge attribute), (2) every vertex, except source target incoming flow outgoing flow. value flow incoming flow target vertex. maximum flow flow maximum value.","code":""},{"path":"https://r.igraph.org/reference/max_flow.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Maximum flow in a graph — max_flow","text":". V. Goldberg R. E. Tarjan: New Approach Maximum Flow Problem Journal ACM 35:921-940, 1988.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/max_flow.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Maximum flow in a graph — max_flow","text":"igraph_maxflow().","code":""},{"path":"https://r.igraph.org/reference/max_flow.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Maximum flow in a graph — max_flow","text":"","code":"E <- rbind(c(1, 3, 3), c(3, 4, 1), c(4, 2, 2), c(1, 5, 1), c(5, 6, 2), c(6, 2, 10)) colnames(E) <- c(\"from\", \"to\", \"capacity\") g1 <- graph_from_data_frame(as.data.frame(E)) max_flow(g1, source = V(g1)[\"1\"], target = V(g1)[\"2\"]) #> $value #> [1] 2 #> #> $flow #> [1] 1 1 1 1 1 1 #> #> $cut #> + 2/6 edges from 8d60585 (vertex names): #> [1] 3->4 1->5 #> #> $partition1 #> + 2/6 vertices, named, from 8d60585: #> [1] 1 3 #> #> $partition2 #> + 4/6 vertices, named, from 8d60585: #> [1] 4 5 6 2 #> #> $stats #> $stats$nopush #> [1] 4 #> #> $stats$norelabel #> [1] 1 #> #> $stats$nogap #> [1] 0 #> #> $stats$nogapnodes #> [1] 0 #> #> $stats$nobfs #> [1] 1 #> #>"},{"path":"https://r.igraph.org/reference/maxcohesion.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Cohesive Blocks — maxcohesion","title":"Calculate Cohesive Blocks — maxcohesion","text":"maxcohesion() renamed max_cohesion() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/maxcohesion.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Cohesive Blocks — maxcohesion","text":"","code":"maxcohesion(blocks)"},{"path":"https://r.igraph.org/reference/maximal.cliques.count.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques.count","title":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques.count","text":"maximal.cliques.count() renamed count_max_cliques() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/maximal.cliques.count.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques.count","text":"","code":"maximal.cliques.count(graph, min = NULL, max = NULL, subset = NULL)"},{"path":"https://r.igraph.org/reference/maximal.cliques.count.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques.count","text":"graph input graph, directed graphs considered undirected ones, multiple edges loops ignored. min Numeric constant, lower limit size cliques find. NULL means limit, .e. 0. max Numeric constant, upper limit size cliques find. NULL means limit. subset NULL, must vector vertex ids, numeric symbolic graph named. algorithm run vertices , subset maximal cliques returned. See Eppstein paper details. argument makes possible easily parallelize finding maximal cliques.","code":""},{"path":"https://r.igraph.org/reference/maximal.cliques.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques","title":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques","text":"maximal.cliques() renamed max_cliques() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/maximal.cliques.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques","text":"","code":"maximal.cliques(graph, min = NULL, max = NULL, subset = NULL, file = NULL)"},{"path":"https://r.igraph.org/reference/maximal.cliques.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques","text":"graph input graph, directed graphs considered undirected ones, multiple edges loops ignored. min Numeric constant, lower limit size cliques find. NULL means limit, .e. 0. max Numeric constant, upper limit size cliques find. NULL means limit. subset NULL, must vector vertex ids, numeric symbolic graph named. algorithm run vertices , subset maximal cliques returned. See Eppstein paper details. argument makes possible easily parallelize finding maximal cliques. file NULL, must file name, .e. character scalar. output algorithm written file. (exists, overwritten.) clique separate line file, given numeric ids vertices, separated whitespace.","code":""},{"path":"https://r.igraph.org/reference/maximal.independent.vertex.sets.html","id":null,"dir":"Reference","previous_headings":"","what":"Independent vertex sets — maximal.independent.vertex.sets","title":"Independent vertex sets — maximal.independent.vertex.sets","text":"maximal.independent.vertex.sets() renamed max_ivs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/maximal.independent.vertex.sets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Independent vertex sets — maximal.independent.vertex.sets","text":"","code":"maximal.independent.vertex.sets(graph)"},{"path":"https://r.igraph.org/reference/maximal.independent.vertex.sets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Independent vertex sets — maximal.independent.vertex.sets","text":"graph input graph, directed graphs considered undirected, loop edges multiple edges ignored.","code":""},{"path":"https://r.igraph.org/reference/maximal_ivs.html","id":null,"dir":"Reference","previous_headings":"","what":"Maximal independent vertex sets in the graph — maximal_ivs","title":"Maximal independent vertex sets in the graph — maximal_ivs","text":"maximal_ivs() renamed max_ivs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/maximal_ivs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Maximal independent vertex sets in the graph — maximal_ivs","text":"","code":"maximal_ivs(graph)"},{"path":"https://r.igraph.org/reference/maximal_ivs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Maximal independent vertex sets in the graph — maximal_ivs","text":"graph input graph, directed graphs considered undirected, loop edges multiple edges ignored.","code":""},{"path":"https://r.igraph.org/reference/maximum.bipartite.matching.html","id":null,"dir":"Reference","previous_headings":"","what":"Matching — maximum.bipartite.matching","title":"Matching — maximum.bipartite.matching","text":"maximum.bipartite.matching() renamed max_bipartite_match() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/maximum.bipartite.matching.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Matching — maximum.bipartite.matching","text":"","code":"maximum.bipartite.matching( graph, types = NULL, weights = NULL, eps = .Machine$double.eps )"},{"path":"https://r.igraph.org/reference/maximum.bipartite.matching.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Matching — maximum.bipartite.matching","text":"graph input graph. might directed, edge directions ignored. types Vertex types, graph bipartite. default taken ‘type’ vertex attribute, present. weights Potential edge weights. graph edge attribute called ‘weight’, argument NULL, edge attribute used automatically. weighted matching, weights edges must match much possible. eps small real number used equality tests weighted bipartite matching algorithm. Two real numbers considered equal algorithm difference smaller eps. required avoid accumulation numerical errors. default set smallest \\(x\\), \\(1+x \\ne 1\\) holds. running algorithm weights, argument ignored.","code":""},{"path":"https://r.igraph.org/reference/maximum.cardinality.search.html","id":null,"dir":"Reference","previous_headings":"","what":"Maximum cardinality search — maximum.cardinality.search","title":"Maximum cardinality search — maximum.cardinality.search","text":"maximum.cardinality.search() renamed max_cardinality() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/maximum.cardinality.search.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Maximum cardinality search — maximum.cardinality.search","text":"","code":"maximum.cardinality.search(graph)"},{"path":"https://r.igraph.org/reference/maximum.cardinality.search.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Maximum cardinality search — maximum.cardinality.search","text":"graph input graph. may directed, edge directions ignored, algorithm defined undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/merge_coords.html","id":null,"dir":"Reference","previous_headings":"","what":"Merging graph layouts — merge_coords","title":"Merging graph layouts — merge_coords","text":"Place several graphs layout","code":""},{"path":"https://r.igraph.org/reference/merge_coords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merging graph layouts — merge_coords","text":"","code":"merge_coords(graphs, layouts, method = \"dla\") layout_components(graph, layout = layout_with_kk, ...)"},{"path":"https://r.igraph.org/reference/merge_coords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merging graph layouts — merge_coords","text":"graphs list graph objects. layouts list two-column matrices. method Character constant giving method use. Right now dla implemented. graph input graph. layout function object, layout function use. ... Additional arguments pass layout layout function.","code":""},{"path":"https://r.igraph.org/reference/merge_coords.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Merging graph layouts — merge_coords","text":"matrix two columns many lines total number vertices graphs.","code":""},{"path":"https://r.igraph.org/reference/merge_coords.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Merging graph layouts — merge_coords","text":"merge_coords() takes list graphs list coordinates places graphs common layout. method use chosen via method parameter, although right now dla method implemented. dla method covers graph circles. sorts graphs based number vertices first places largest graph center layout. graphs placed decreasing order via DLA (diffision limited aggregation) algorithm: graph placed randomly circle far away center random walk conducted graph walks larger graphs already placed walks far center layout. layout_components() function disassembles graph first maximal connected components calls supplied layout function component separately. Finally merges layouts via calling merge_coords().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/merge_coords.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Merging graph layouts — merge_coords","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/merge_coords.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Merging graph layouts — merge_coords","text":"","code":"# create 20 scale-free graphs and place them in a common layout graphs <- lapply(sample(5:20, 20, replace = TRUE), barabasi.game, directed = FALSE ) layouts <- lapply(graphs, layout_with_kk) lay <- merge_coords(graphs, layouts) g <- disjoint_union(graphs) plot(g, layout = lay, vertex.size = 3, labels = NA, edge.color = \"black\")"},{"path":"https://r.igraph.org/reference/min_cut.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum cut in a graph — min_cut","title":"Minimum cut in a graph — min_cut","text":"min_cut() calculates minimum st-cut two vertices graph (source target arguments given) minimum cut graph (source target NULL).","code":""},{"path":"https://r.igraph.org/reference/min_cut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum cut in a graph — min_cut","text":"","code":"min_cut( graph, source = NULL, target = NULL, capacity = NULL, value.only = TRUE )"},{"path":"https://r.igraph.org/reference/min_cut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum cut in a graph — min_cut","text":"graph input graph. source id source vertex. target id target vertex (sometimes also called sink). capacity Vector giving capacity edges. NULL (default) capacity edge attribute used. value.Logical scalar, TRUE minimum cut value returned, FALSE edges cut two () partitions also returned.","code":""},{"path":"https://r.igraph.org/reference/min_cut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimum cut in a graph — min_cut","text":"min_cut() nuieric constant, value minimum cut, except value.= FALSE. case named list components: value Numeric scalar, cut value. cut Numeric vector, edges cut. partition1 vertices first partition cut edges removed. Note vertices might actually different components (cut edges removed), graph may fall apart two components. partition2 vertices second partition cut edges removed. Note vertices might actually different components (cut edges removed), graph may fall apart two components.","code":""},{"path":"https://r.igraph.org/reference/min_cut.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minimum cut in a graph — min_cut","text":"minimum st-cut source target minimum total weight edges needed remove eliminate paths source target. minimum cut graph minimum total weight edges needed remove separate graph (least) two components. (make graph strongly connected directed case.) maximum flow two vertices graph minimum st-cut, max_flow() min_cut() essentially calculate quantity, difference min_cut() can invoked without giving source target arguments minimum possible minimum cuts calculated. undirected graphs Stoer-Wagner algorithm (see reference ) used calculate minimum cut.","code":""},{"path":"https://r.igraph.org/reference/min_cut.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Minimum cut in a graph — min_cut","text":"M. Stoer F. Wagner: simple min-cut algorithm, Journal ACM, 44 585-591, 1997.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/min_cut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimum cut in a graph — min_cut","text":"","code":"g <- make_ring(100) min_cut(g, capacity = rep(1, vcount(g))) #> [1] 2 min_cut(g, value.only = FALSE, capacity = rep(1, vcount(g))) #> $value #> [1] 2 #> #> $cut #> + 2/100 edges from 189ba13: #> [1] 1--2 2--3 #> #> $partition1 #> + 1/100 vertex, from 189ba13: #> [1] 2 #> #> $partition2 #> + 99/100 vertices, from 189ba13: #> [1] 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #> [20] 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 #> [39] 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 #> [58] 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 #> [77] 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 #> [96] 97 98 99 100 #> g2 <- make_graph(c(1, 2, 2, 3, 3, 4, 1, 6, 6, 5, 5, 4, 4, 1)) E(g2)$capacity <- c(3, 1, 2, 10, 1, 3, 2) min_cut(g2, value.only = FALSE) #> $value #> [1] 1 #> #> $cut #> + 1/7 edge from 24699ea: #> [1] 2->3 #> #> $partition1 #> + 1/6 vertex, from 24699ea: #> [1] 2 #> #> $partition2 #> + 5/6 vertices, from 24699ea: #> [1] 1 3 4 5 6 #>"},{"path":"https://r.igraph.org/reference/min_separators.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum size vertex separators — min_separators","title":"Minimum size vertex separators — min_separators","text":"Find vertex sets minimal size whose removal separates graph components","code":""},{"path":"https://r.igraph.org/reference/min_separators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum size vertex separators — min_separators","text":"","code":"min_separators(graph)"},{"path":"https://r.igraph.org/reference/min_separators.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum size vertex separators — min_separators","text":"graph input graph. may directed, edge directions ignored.","code":""},{"path":"https://r.igraph.org/reference/min_separators.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimum size vertex separators — min_separators","text":"list numeric vectors. numeric vector vertex separator.","code":""},{"path":"https://r.igraph.org/reference/min_separators.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minimum size vertex separators — min_separators","text":"function implements Kanevsky algorithm finding minimal-size vertex separators undirected graph. See reference details. special case fully connected input graph \\(n\\) vertices, subsets size \\(n-1\\) listed result.","code":""},{"path":"https://r.igraph.org/reference/min_separators.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Minimum size vertex separators — min_separators","text":"Arkady Kanevsky: Finding minimum-size separating vertex sets graph. Networks 23 533–541, 1993. JS Provan DR Shier: Paradigm listing (s,t)-cuts graphs, Algorithmica 15, 351–372, 1996. J. Moody D. R. White. Structural cohesion embeddedness: hierarchical concept social groups. American Sociological Review, 68 103–127, Feb 2003.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/min_separators.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Minimum size vertex separators — min_separators","text":"igraph_minimum_size_separators().","code":""},{"path":"https://r.igraph.org/reference/min_separators.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimum size vertex separators — min_separators","text":"","code":"# The graph from the Moody-White paper mw <- graph_from_literal( 1 - 2:3:4:5:6, 2 - 3:4:5:7, 3 - 4:6:7, 4 - 5:6:7, 5 - 6:7:21, 6 - 7, 7 - 8:11:14:19, 8 - 9:11:14, 9 - 10, 10 - 12:13, 11 - 12:14, 12 - 16, 13 - 16, 14 - 15, 15 - 16, 17 - 18:19:20, 18 - 20:21, 19 - 20:22:23, 20 - 21, 21 - 22:23, 22 - 23 ) # Cohesive subgraphs mw1 <- induced_subgraph(mw, as.character(c(1:7, 17:23))) mw2 <- induced_subgraph(mw, as.character(7:16)) mw3 <- induced_subgraph(mw, as.character(17:23)) mw4 <- induced_subgraph(mw, as.character(c(7, 8, 11, 14))) mw5 <- induced_subgraph(mw, as.character(1:7)) min_separators(mw) #> [[1]] #> + 1/23 vertex, named, from 56acb35: #> [1] 7 #> min_separators(mw1) #> [[1]] #> + 2/14 vertices, named, from fb13bc6: #> [1] 5 19 #> #> [[2]] #> + 2/14 vertices, named, from fb13bc6: #> [1] 5 7 #> #> [[3]] #> + 2/14 vertices, named, from fb13bc6: #> [1] 7 21 #> #> [[4]] #> + 2/14 vertices, named, from fb13bc6: #> [1] 21 19 #> min_separators(mw2) #> [[1]] #> + 2/10 vertices, named, from 2b21183: #> [1] 10 16 #> #> [[2]] #> + 2/10 vertices, named, from 2b21183: #> [1] 14 16 #> #> [[3]] #> + 2/10 vertices, named, from 2b21183: #> [1] 8 10 #> min_separators(mw3) #> [[1]] #> + 2/7 vertices, named, from 92c5e02: #> [1] 21 19 #> min_separators(mw4) #> [[1]] #> + 3/4 vertices, named, from 1097d21: #> [1] 8 11 14 #> #> [[2]] #> + 3/4 vertices, named, from 1097d21: #> [1] 7 11 14 #> #> [[3]] #> + 3/4 vertices, named, from 1097d21: #> [1] 7 8 14 #> #> [[4]] #> + 3/4 vertices, named, from 1097d21: #> [1] 7 8 11 #> min_separators(mw5) #> [[1]] #> + 5/7 vertices, named, from 44a8fdb: #> [1] 2 3 4 5 6 #> #> [[2]] #> + 5/7 vertices, named, from 44a8fdb: #> [1] 1 3 4 5 7 #> #> [[3]] #> + 5/7 vertices, named, from 44a8fdb: #> [1] 1 2 4 6 7 #> # Another example, the science camp network camp <- graph_from_literal( Harry:Steve:Don:Bert - Harry:Steve:Don:Bert, Pam:Brazey:Carol:Pat - Pam:Brazey:Carol:Pat, Holly - Carol:Pat:Pam:Jennie:Bill, Bill - Pauline:Michael:Lee:Holly, Pauline - Bill:Jennie:Ann, Jennie - Holly:Michael:Lee:Ann:Pauline, Michael - Bill:Jennie:Ann:Lee:John, Ann - Michael:Jennie:Pauline, Lee - Michael:Bill:Jennie, Gery - Pat:Steve:Russ:John, Russ - Steve:Bert:Gery:John, John - Gery:Russ:Michael ) min_separators(camp) #> [[1]] #> + 2/18 vertices, named, from c870721: #> [1] Pat Holly #> #> [[2]] #> + 2/18 vertices, named, from c870721: #> [1] Pat Michael #> #> [[3]] #> + 2/18 vertices, named, from c870721: #> [1] Pat John #> #> [[4]] #> + 2/18 vertices, named, from c870721: #> [1] Holly Gery #> #> [[5]] #> + 2/18 vertices, named, from c870721: #> [1] Michael Gery #> #> [[6]] #> + 2/18 vertices, named, from c870721: #> [1] John Gery #> #> [[7]] #> + 2/18 vertices, named, from c870721: #> [1] Gery Russ #> #> [[8]] #> + 2/18 vertices, named, from c870721: #> [1] Holly Michael #> #> [[9]] #> + 2/18 vertices, named, from c870721: #> [1] Holly John #> #> [[10]] #> + 2/18 vertices, named, from c870721: #> [1] Steve Bert #> #> [[11]] #> + 2/18 vertices, named, from c870721: #> [1] Steve Russ #>"},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum size vertex separators — min_st_separators","title":"Minimum size vertex separators — min_st_separators","text":"List vertex sets minimal \\((s,t)\\) separators \\(s\\) \\(t\\), undirected graph.","code":""},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum size vertex separators — min_st_separators","text":"","code":"min_st_separators(graph)"},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum size vertex separators — min_st_separators","text":"graph input graph. may directed, edge directions ignored.","code":""},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimum size vertex separators — min_st_separators","text":"list numeric vectors. vector contains vertex set (defined vertex ids), vector (s,t) separator input graph, \\(s\\) \\(t\\).","code":""},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minimum size vertex separators — min_st_separators","text":"\\((s,t)\\) vertex separator set vertices, removal graph, path \\(s\\) \\(t\\) graph. \\((s,t)\\) vertex separator minimal none proper subsets \\((s,t)\\) vertex separator \\(s\\) \\(t\\).","code":""},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Minimum size vertex separators — min_st_separators","text":"Note code returns {1, 3} despite subset {1} separator well. {1, 3} minimal respect separating vertices 2 4.","code":"g <- make_graph(~ 0-1-2-3-4-1) min_st_separators(g) #> [[1]] #> + 1/5 vertex, named: #> [1] 1 #> #> [[2]] #> + 2/5 vertices, named: #> [1] 2 4 #> #> [[3]] #> + 2/5 vertices, named: #> [1] 1 3"},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Minimum size vertex separators — min_st_separators","text":"Anne Berry, Jean-Paul Bordat Olivier Cogis: Generating Minimal Separators Graph, : Peter Widmayer, Gabriele Neyer Stephan Eidenbenz (editors): Graph-theoretic concepts computer science, 1665, 167–172, 1999. Springer.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Minimum size vertex separators — min_st_separators","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Minimum size vertex separators — min_st_separators","text":"igraph_all_minimal_st_separators().","code":""},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimum size vertex separators — min_st_separators","text":"","code":"ring <- make_ring(4) min_st_separators(ring) #> [[1]] #> + 2/4 vertices, from 30f4e02: #> [1] 2 4 #> #> [[2]] #> + 2/4 vertices, from 30f4e02: #> [1] 1 3 #> chvatal <- make_graph(\"chvatal\") min_st_separators(chvatal) #> [[1]] #> + 4/12 vertices, from 3ccaba9: #> [1] 7 10 11 12 #> #> [[2]] #> + 4/12 vertices, from 3ccaba9: #> [1] 3 6 8 11 #> #> [[3]] #> + 4/12 vertices, from 3ccaba9: #> [1] 2 7 9 12 #> #> [[4]] #> + 4/12 vertices, from 3ccaba9: #> [1] 8 10 11 12 #> #> [[5]] #> + 4/12 vertices, from 3ccaba9: #> [1] 6 9 11 12 #> #> [[6]] #> + 4/12 vertices, from 3ccaba9: #> [1] 2 5 7 10 #> #> [[7]] #> + 4/12 vertices, from 3ccaba9: #> [1] 1 3 6 8 #> #> [[8]] #> + 4/12 vertices, from 3ccaba9: #> [1] 2 4 7 9 #> #> [[9]] #> + 4/12 vertices, from 3ccaba9: #> [1] 3 5 8 10 #> #> [[10]] #> + 4/12 vertices, from 3ccaba9: #> [1] 1 4 6 9 #> #> [[11]] #> + 4/12 vertices, from 3ccaba9: #> [1] 1 2 4 5 #> #> [[12]] #> + 4/12 vertices, from 3ccaba9: #> [1] 1 3 4 5 #> #> [[13]] #> + 6/12 vertices, from 3ccaba9: #> [1] 3 6 8 10 11 12 #> #> [[14]] #> + 6/12 vertices, from 3ccaba9: #> [1] 4 6 7 9 11 12 #> #> [[15]] #> + 6/12 vertices, from 3ccaba9: #> [1] 2 4 5 7 10 12 #> #> [[16]] #> + 6/12 vertices, from 3ccaba9: #> [1] 3 4 5 7 10 11 #> #> [[17]] #> + 6/12 vertices, from 3ccaba9: #> [1] 6 7 8 9 11 12 #> #> [[18]] #> + 6/12 vertices, from 3ccaba9: #> [1] 3 5 7 8 10 11 #> #> [[19]] #> + 6/12 vertices, from 3ccaba9: #> [1] 3 4 6 7 9 11 #> #> [[20]] #> + 6/12 vertices, from 3ccaba9: #> [1] 1 3 4 5 6 8 #> #> [[21]] #> + 6/12 vertices, from 3ccaba9: #> [1] 1 2 6 8 9 12 #> #> [[22]] #> + 6/12 vertices, from 3ccaba9: #> [1] 2 5 7 8 10 12 #> #> [[23]] #> + 6/12 vertices, from 3ccaba9: #> [1] 1 2 4 5 7 9 #> #> [[24]] #> + 6/12 vertices, from 3ccaba9: #> [1] 2 7 9 10 11 12 #> #> [[25]] #> + 6/12 vertices, from 3ccaba9: #> [1] 1 6 8 9 11 12 #> #> [[26]] #> + 6/12 vertices, from 3ccaba9: #> [1] 1 2 5 8 10 12 #> #> [[27]] #> + 6/12 vertices, from 3ccaba9: #> [1] 1 3 5 8 10 11 #> #> [[28]] #> + 6/12 vertices, from 3ccaba9: #> [1] 1 2 4 6 9 12 #> #> [[29]] #> + 6/12 vertices, from 3ccaba9: #> [1] 1 3 4 6 9 11 #> #> [[30]] #> + 6/12 vertices, from 3ccaba9: #> [1] 1 2 3 5 8 10 #> #> [[31]] #> + 6/12 vertices, from 3ccaba9: #> [1] 1 2 3 4 6 9 #> #> [[32]] #> + 6/12 vertices, from 3ccaba9: #> [1] 2 3 4 5 7 10 #> # https://github.com/r-lib/roxygen2/issues/1092"},{"path":"https://r.igraph.org/reference/minimal.st.separators.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum size vertex separators — minimal.st.separators","title":"Minimum size vertex separators — minimal.st.separators","text":"minimal.st.separators() renamed min_st_separators() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/minimal.st.separators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum size vertex separators — minimal.st.separators","text":"","code":"minimal.st.separators(graph)"},{"path":"https://r.igraph.org/reference/minimal.st.separators.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum size vertex separators — minimal.st.separators","text":"graph input graph. may directed, edge directions ignored.","code":""},{"path":"https://r.igraph.org/reference/minimum.size.separators.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum size vertex separators — minimum.size.separators","title":"Minimum size vertex separators — minimum.size.separators","text":"minimum.size.separators() renamed min_separators() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/minimum.size.separators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum size vertex separators — minimum.size.separators","text":"","code":"minimum.size.separators(graph)"},{"path":"https://r.igraph.org/reference/minimum.size.separators.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum size vertex separators — minimum.size.separators","text":"graph input graph. may directed, edge directions ignored.","code":""},{"path":"https://r.igraph.org/reference/minimum.spanning.tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum spanning tree — minimum.spanning.tree","title":"Minimum spanning tree — minimum.spanning.tree","text":"minimum.spanning.tree() renamed mst() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/minimum.spanning.tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum spanning tree — minimum.spanning.tree","text":"","code":"minimum.spanning.tree(graph, weights = NULL, algorithm = NULL, ...)"},{"path":"https://r.igraph.org/reference/minimum.spanning.tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum spanning tree — minimum.spanning.tree","text":"graph graph object analyze. weights Numeric vector giving weights edges graph. order determined edge ids. ignored unweighted algorithm chosen. Edge weights interpreted distances. algorithm algorithm use calculation. unweighted can used unweighted graphs, prim runs Prim's algorithm weighted graphs. NULL igraph select algorithm automatically: graph edge attribute called weight weights argument NULL Prim's algorithm chosen, otherwise unweighted algorithm used. ... Additional arguments, unused.","code":""},{"path":"https://r.igraph.org/reference/mod.matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Modularity of a community structure of a graph — mod.matrix","title":"Modularity of a community structure of a graph — mod.matrix","text":"mod.matrix() renamed modularity_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/mod.matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Modularity of a community structure of a graph — mod.matrix","text":"","code":"mod.matrix(graph, membership, weights = NULL, resolution = 1, directed = TRUE)"},{"path":"https://r.igraph.org/reference/mod.matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Modularity of a community structure of a graph — mod.matrix","text":"membership Numeric vector, one value vertex, membership vector community structure. weights NULL numeric vector giving edge weights. resolution resolution parameter. Must greater equal 0. Set 1 use classical definition modularity. directed Whether use directed undirected version modularity. Ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Modularity of a community structure of a graph — modularity.igraph","title":"Modularity of a community structure of a graph — modularity.igraph","text":"function calculates modular given division graph subgraphs.","code":""},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Modularity of a community structure of a graph — modularity.igraph","text":"","code":"# S3 method for class 'igraph' modularity(x, membership, weights = NULL, resolution = 1, directed = TRUE, ...) modularity_matrix( graph, membership = lifecycle::deprecated(), weights = NULL, resolution = 1, directed = TRUE )"},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Modularity of a community structure of a graph — modularity.igraph","text":"x, graph input graph. membership Numeric vector, one value vertex, membership vector community structure. weights NULL numeric vector giving edge weights. resolution resolution parameter. Must greater equal 0. Set 1 use classical definition modularity. directed Whether use directed undirected version modularity. Ignored undirected graphs. ... Additional arguments, none currently.","code":""},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Modularity of a community structure of a graph — modularity.igraph","text":"modularity() numeric scalar, modularity score given configuration. modularity_matrix() numeric square matrix, order number vertices graph.","code":""},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Modularity of a community structure of a graph — modularity.igraph","text":"modularity() calculates modularity graph respect given membership vector. modularity graph respect division (vertex types) measures good division , separated different vertex types . defined $$Q=\\frac{1}{2m} \\sum_{,j} (A_{ij}-\\gamma\\frac{k_i k_j}{2m})\\delta(c_i,c_j),$$ \\(m\\) number edges, \\(A_{ij}\\) element \\(\\) adjacency matrix row \\(\\) column \\(j\\), \\(k_i\\) degree \\(\\), \\(k_j\\) degree \\(j\\), \\(c_i\\) type (component) \\(\\), \\(c_j\\) \\(j\\), sum goes \\(\\) \\(j\\) pairs vertices, \\(\\delta(x,y)\\) 1 \\(x=y\\) 0 otherwise. directed graphs, defined $$Q = \\frac{1}{m} \\sum_{,j} (A_{ij}-\\gamma \\frac{k_i^{} k_j^{}}{m})\\delta(c_i,c_j).$$ resolution parameter \\(\\gamma\\) allows weighting random null model, might useful finding partitions high modularity. Maximizing modularity higher values resolution parameter typically results , smaller clusters finding partitions high modularity. Lower values typically results fewer, larger clusters. original definition modularity retrieved setting \\(\\gamma\\) 1. edge weights given, considered element \\(\\) adjacency matrix, \\(k_i\\) sum weights adjacent edges vertex \\(\\). modularity_matrix() calculates modularity matrix. dense matrix, defined difference adjacency matrix configuration model null model matrix. words element \\(M_{ij}\\) given \\(A_{ij}-d_i d_j/(2m)\\), \\(A_{ij}\\) (possibly weighted) adjacency matrix, \\(d_i\\) degree vertex \\(\\), \\(m\\) number edges (total weights graph, weighed).","code":""},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Modularity of a community structure of a graph — modularity.igraph","text":"Clauset, .; Newman, M. E. J. & Moore, C. Finding community structure large networks, Physical Review E 2004, 70, 066111","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Modularity of a community structure of a graph — modularity.igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Modularity of a community structure of a graph — modularity.igraph","text":"","code":"g <- make_full_graph(5) %du% make_full_graph(5) %du% make_full_graph(5) g <- add_edges(g, c(1, 6, 1, 11, 6, 11)) wtc <- cluster_walktrap(g) modularity(wtc) #> [1] 0.5757576 modularity(g, membership(wtc)) #> [1] 0.5757576"},{"path":"https://r.igraph.org/reference/motifs.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph motifs — motifs","title":"Graph motifs — motifs","text":"Graph motifs small connected induced subgraphs well-defined structure. functions search graph various motifs.","code":""},{"path":"https://r.igraph.org/reference/motifs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph motifs — motifs","text":"","code":"motifs(graph, size = 3, cut.prob = rep(0, size))"},{"path":"https://r.igraph.org/reference/motifs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph motifs — motifs","text":"graph Graph object, input graph. size size motif, currently sizes 3 4 supported directed graphs sizes 3-6 undirected graphs. cut.prob Numeric vector giving probabilities search graph cut certain level. length size motif (size argument). default cuts made.","code":""},{"path":"https://r.igraph.org/reference/motifs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph motifs — motifs","text":"motifs() returns numeric vector, number occurrences motif graph. motifs ordered isomorphism classes. Note unconnected subgraphs, considered motifs, result NA.","code":""},{"path":"https://r.igraph.org/reference/motifs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph motifs — motifs","text":"motifs() searches graph motifs given size returns numeric vector containing number different motifs. order motifs defined isomorphism class, see isomorphism_class().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/motifs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph motifs — motifs","text":"","code":"g <- sample_pa(100) motifs(g, 3) #> [1] NA NA 319 NA 80 0 0 0 0 0 0 0 0 0 0 0 count_motifs(g, 3) #> [1] 399 sample_motifs(g, 3) #> [1] -9.223372e+18"},{"path":"https://r.igraph.org/reference/mst.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum spanning tree — mst","title":"Minimum spanning tree — mst","text":"spanning tree connected graph connected subgraph smallest number edges includes vertices graph. graph many spanning trees. Among , minimum spanning tree smallest sum edge weights.","code":""},{"path":"https://r.igraph.org/reference/mst.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum spanning tree — mst","text":"","code":"mst(graph, weights = NULL, algorithm = NULL, ...)"},{"path":"https://r.igraph.org/reference/mst.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum spanning tree — mst","text":"graph graph object analyze. weights Numeric vector giving weights edges graph. order determined edge ids. ignored unweighted algorithm chosen. Edge weights interpreted distances. algorithm algorithm use calculation. unweighted can used unweighted graphs, prim runs Prim's algorithm weighted graphs. NULL igraph select algorithm automatically: graph edge attribute called weight weights argument NULL Prim's algorithm chosen, otherwise unweighted algorithm used. ... Additional arguments, unused.","code":""},{"path":"https://r.igraph.org/reference/mst.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimum spanning tree — mst","text":"graph object minimum spanning forest. check whether tree, check number edges vcount(graph)-1. edge vertex attributes original graph preserved result.","code":""},{"path":"https://r.igraph.org/reference/mst.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minimum spanning tree — mst","text":"minimum spanning forest disconnected graph collection minimum spanning trees components. graph connected minimum spanning forest returned.","code":""},{"path":"https://r.igraph.org/reference/mst.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Minimum spanning tree — mst","text":"Prim, R.C. 1957. Shortest connection networks generalizations Bell System Technical Journal, 37 1389–1401.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/mst.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Minimum spanning tree — mst","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/mst.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimum spanning tree — mst","text":"","code":"g <- sample_gnp(100, 3 / 100) g_mst <- mst(g)"},{"path":"https://r.igraph.org/reference/multilevel.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding community structure by multi-level optimization of modularity — multilevel.community","title":"Finding community structure by multi-level optimization of modularity — multilevel.community","text":"multilevel.community() renamed cluster_louvain() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/multilevel.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding community structure by multi-level optimization of modularity — multilevel.community","text":"","code":"multilevel.community(graph, weights = NULL, resolution = 1)"},{"path":"https://r.igraph.org/reference/multilevel.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding community structure by multi-level optimization of modularity — multilevel.community","text":"graph input graph. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. resolution Optional resolution parameter allows user adjust resolution parameter modularity function algorithm uses internally. Lower values typically yield fewer, larger clusters. original definition modularity recovered resolution parameter set 1.","code":""},{"path":"https://r.igraph.org/reference/neighborhood.size.html","id":null,"dir":"Reference","previous_headings":"","what":"Neighborhood of graph vertices — neighborhood.size","title":"Neighborhood of graph vertices — neighborhood.size","text":"neighborhood.size() renamed ego_size() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/neighborhood.size.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neighborhood of graph vertices — neighborhood.size","text":"","code":"neighborhood.size( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 )"},{"path":"https://r.igraph.org/reference/neighborhood.size.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neighborhood of graph vertices — neighborhood.size","text":"graph input graph. order Integer giving order neighborhood. nodes vertices calculation performed. mode Character constant, specifies use direction edges directed graph analyzed. ‘’ outgoing edges followed, vertices reachable source vertex order steps counted. ‘\"\"’ vertices source vertex reachable order steps counted. ‘\"\"’ ignores direction edges. argument ignored undirected graphs. mindist minimum distance include vertex result.","code":""},{"path":"https://r.igraph.org/reference/neighbors.html","id":null,"dir":"Reference","previous_headings":"","what":"Neighboring (adjacent) vertices in a graph — neighbors","title":"Neighboring (adjacent) vertices in a graph — neighbors","text":"vertex neighbor another one (words, two vertices adjacent), incident edge.","code":""},{"path":"https://r.igraph.org/reference/neighbors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neighboring (adjacent) vertices in a graph — neighbors","text":"","code":"neighbors(graph, v, mode = c(\"out\", \"in\", \"all\", \"total\"))"},{"path":"https://r.igraph.org/reference/neighbors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neighboring (adjacent) vertices in a graph — neighbors","text":"graph input graph. v vertex adjacent vertices queried. mode Whether query outgoing (‘’), incoming (‘’) edges, types (‘’). ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/neighbors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Neighboring (adjacent) vertices in a graph — neighbors","text":"vertex sequence containing neighbors input vertex.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/neighbors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neighboring (adjacent) vertices in a graph — neighbors","text":"","code":"g <- make_graph(\"Zachary\") n1 <- neighbors(g, 1) n34 <- neighbors(g, 34) intersection(n1, n34) #> + 4/34 vertices, from 09650a1: #> [1] 9 14 20 32"},{"path":"https://r.igraph.org/reference/no.clusters.html","id":null,"dir":"Reference","previous_headings":"","what":"Connected components of a graph — no.clusters","title":"Connected components of a graph — no.clusters","text":".clusters() renamed count_components() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/no.clusters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connected components of a graph — no.clusters","text":"","code":"no.clusters(graph, mode = c(\"weak\", \"strong\"))"},{"path":"https://r.igraph.org/reference/no.clusters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connected components of a graph — no.clusters","text":"graph graph analyze. mode Character string, either “weak” “strong”. directed graphs “weak” implies weakly, “strong” strongly connected components search. ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/norm_coords.html","id":null,"dir":"Reference","previous_headings":"","what":"Normalize coordinates for plotting graphs — norm_coords","title":"Normalize coordinates for plotting graphs — norm_coords","text":"Rescale coordinates linearly within given bounds.","code":""},{"path":"https://r.igraph.org/reference/norm_coords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Normalize coordinates for plotting graphs — norm_coords","text":"","code":"norm_coords( layout, xmin = -1, xmax = 1, ymin = -1, ymax = 1, zmin = -1, zmax = 1 )"},{"path":"https://r.igraph.org/reference/norm_coords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Normalize coordinates for plotting graphs — norm_coords","text":"layout matrix two three columns, layout normalize. xmin, xmax limits first coordinate, one NULL normalization performed along direction. ymin, ymax limits second coordinate, one NULL normalization performed along direction. zmin, zmax limits third coordinate, one NULL normalization performed along direction.","code":""},{"path":"https://r.igraph.org/reference/norm_coords.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Normalize coordinates for plotting graphs — norm_coords","text":"numeric matrix dimension layout.","code":""},{"path":"https://r.igraph.org/reference/norm_coords.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Normalize coordinates for plotting graphs — norm_coords","text":"norm_coords() normalizes layout, linearly transforms coordinate separately fit given limits.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/norm_coords.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Normalize coordinates for plotting graphs — norm_coords","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/normalize.html","id":null,"dir":"Reference","previous_headings":"","what":"Normalize layout — normalize","title":"Normalize layout — normalize","text":"Scale coordinates layout.","code":""},{"path":"https://r.igraph.org/reference/normalize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Normalize layout — normalize","text":"","code":"normalize( xmin = -1, xmax = 1, ymin = xmin, ymax = xmax, zmin = xmin, zmax = xmax )"},{"path":"https://r.igraph.org/reference/normalize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Normalize layout — normalize","text":"xmin, xmax Minimum maximum x coordinates. ymin, ymax Minimum maximum y coordinates. zmin, zmax Minimum maximum z coordinates.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/normalize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Normalize layout — normalize","text":"","code":"layout_(make_ring(10), with_fr(), normalize()) #> [,1] [,2] #> [1,] 1.0000000 0.1809687 #> [2,] 0.7104397 0.7313289 #> [3,] 0.1487960 1.0000000 #> [4,] -0.4666510 0.8832536 #> [5,] -0.9025416 0.4339439 #> [6,] -1.0000000 -0.1858822 #> [7,] -0.7071462 -0.7340898 #> [8,] -0.1455567 -1.0000000 #> [9,] 0.4696901 -0.8897022 #> [10,] 0.9083100 -0.4412655"},{"path":"https://r.igraph.org/reference/optimal.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Optimal community structure — optimal.community","title":"Optimal community structure — optimal.community","text":"optimal.community() renamed cluster_optimal() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/optimal.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Optimal community structure — optimal.community","text":"","code":"optimal.community(graph, weights = NULL)"},{"path":"https://r.igraph.org/reference/optimal.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Optimal community structure — optimal.community","text":"graph input graph. Edge directions ignored directed graphs. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function.","code":""},{"path":"https://r.igraph.org/reference/page.rank.html","id":null,"dir":"Reference","previous_headings":"","what":"The Page Rank algorithm — page.rank","title":"The Page Rank algorithm — page.rank","text":"page.rank() renamed page_rank() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/page.rank.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Page Rank algorithm — page.rank","text":"","code":"page.rank( graph, algo = c(\"prpack\", \"arpack\"), vids = V(graph), directed = TRUE, damping = 0.85, personalized = NULL, weights = NULL, options = NULL )"},{"path":"https://r.igraph.org/reference/page.rank.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Page Rank algorithm — page.rank","text":"graph graph object. algo Character scalar, implementation use carry calculation. default \"prpack\", uses PRPACK library (https://github.com/dgleich/prpack) calculate PageRank scores solving set linear equations. new implementation igraph version 0.7, suggested one, stable fastest small graphs. \"arpack\" uses ARPACK library, default implementation igraph version 0.5 version 0.7. computes PageRank scores solving eingevalue problem. vids vertices interest. directed Logical, true directed paths considered directed graphs. ignored undirected graphs. damping damping factor (‘d’ original paper). personalized Optional vector giving probability distribution calculate personalized PageRank. personalized PageRank, probability jumping node abandoning random walk uniform, given vector. vector contains entry vertex rescaled sum one. weights numerical vector NULL. argument can used give edge weights calculating weighted PageRank vertices. NULL graph weight edge attribute used. weights numerical vector used, even graph weights edge attribute. NA, edge weights used (even graph weight edge attribute. function interprets edge weights connection strengths. random surfer model, edge larger weight likely selected surfer. options named list, override ARPACK options. See arpack() details. argument ignored PRPACK implementation used.","code":""},{"path":"https://r.igraph.org/reference/page_rank.html","id":null,"dir":"Reference","previous_headings":"","what":"The Page Rank algorithm — page_rank","title":"The Page Rank algorithm — page_rank","text":"Calculates Google PageRank specified vertices.","code":""},{"path":"https://r.igraph.org/reference/page_rank.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Page Rank algorithm — page_rank","text":"","code":"page_rank( graph, algo = c(\"prpack\", \"arpack\"), vids = V(graph), directed = TRUE, damping = 0.85, personalized = NULL, weights = NULL, options = NULL )"},{"path":"https://r.igraph.org/reference/page_rank.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Page Rank algorithm — page_rank","text":"graph graph object. algo Character scalar, implementation use carry calculation. default \"prpack\", uses PRPACK library (https://github.com/dgleich/prpack) calculate PageRank scores solving set linear equations. new implementation igraph version 0.7, suggested one, stable fastest small graphs. \"arpack\" uses ARPACK library, default implementation igraph version 0.5 version 0.7. computes PageRank scores solving eingevalue problem. vids vertices interest. directed Logical, true directed paths considered directed graphs. ignored undirected graphs. damping damping factor (‘d’ original paper). personalized Optional vector giving probability distribution calculate personalized PageRank. personalized PageRank, probability jumping node abandoning random walk uniform, given vector. vector contains entry vertex rescaled sum one. weights numerical vector NULL. argument can used give edge weights calculating weighted PageRank vertices. NULL graph weight edge attribute used. weights numerical vector used, even graph weights edge attribute. NA, edge weights used (even graph weight edge attribute. function interprets edge weights connection strengths. random surfer model, edge larger weight likely selected surfer. options named list, override ARPACK options. See arpack() details. argument ignored PRPACK implementation used.","code":""},{"path":"https://r.igraph.org/reference/page_rank.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Page Rank algorithm — page_rank","text":"named list entries: vector numeric vector PageRank scores. value using ARPACK method, eigenvalue corresponding eigenvector PageRank scores returned . expected exactly one, can used check ARPACK successfully converged expected eingevector. using PRPACK method, always set 1.0. options information underlying ARPACK calculation. See arpack() details. entry NULL ARPACK implementation used.","code":""},{"path":"https://r.igraph.org/reference/page_rank.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Page Rank algorithm — page_rank","text":"explanation PageRank algorithm, see following webpage: http://infolab.stanford.edu/~backrub/google.html, following reference: Sergey Brin Larry Page: Anatomy Large-Scale Hypertextual Web Search Engine. Proceedings 7th World-Wide Web Conference, Brisbane, Australia, April 1998. page_rank() function can use either PRPACK library ARPACK (see arpack()) perform calculation. Please note PageRank given vertex depends PageRank vertices, even want calculate PageRank vertices, must calculated. Requesting PageRank vertices result performance increase .","code":""},{"path":"https://r.igraph.org/reference/page_rank.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Page Rank algorithm — page_rank","text":"Sergey Brin Larry Page: Anatomy Large-Scale Hypertextual Web Search Engine. Proceedings 7th World-Wide Web Conference, Brisbane, Australia, April 1998.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/page_rank.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Page Rank algorithm — page_rank","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/page_rank.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"The Page Rank algorithm — page_rank","text":"igraph_personalized_pagerank().","code":""},{"path":"https://r.igraph.org/reference/page_rank.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Page Rank algorithm — page_rank","text":"","code":"g <- sample_gnp(20, 5 / 20, directed = TRUE) page_rank(g)$vector #> [1] 0.02729696 0.05320821 0.05318108 0.04357278 0.02196227 0.07497734 #> [7] 0.08301483 0.07488333 0.01739680 0.07177140 0.02271937 0.05685135 #> [13] 0.04165312 0.05776120 0.02729696 0.04657316 0.05371544 0.06694570 #> [19] 0.04393273 0.06128598 g2 <- make_star(10) page_rank(g2)$vector #> [1] 0.49008499 0.05665722 0.05665722 0.05665722 0.05665722 0.05665722 #> [7] 0.05665722 0.05665722 0.05665722 0.05665722 # Personalized PageRank g3 <- make_ring(10) page_rank(g3)$vector #> [1] 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 reset <- seq(vcount(g3)) page_rank(g3, personalized = reset)$vector #> [1] 0.08305627 0.07206568 0.07367581 0.08203783 0.09368592 0.10631408 #> [7] 0.11796217 0.12632419 0.12793432 0.11694373"},{"path":"https://r.igraph.org/reference/path.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper function to add or delete edges along a path — path","title":"Helper function to add or delete edges along a path — path","text":"function can used add delete edges form path.","code":""},{"path":"https://r.igraph.org/reference/path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper function to add or delete edges along a path — path","text":"","code":"path(...)"},{"path":"https://r.igraph.org/reference/path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper function to add or delete edges along a path — path","text":"... See details .","code":""},{"path":"https://r.igraph.org/reference/path.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper function to add or delete edges along a path — path","text":"special object can used together igraph graphs plus minus operators.","code":""},{"path":"https://r.igraph.org/reference/path.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Helper function to add or delete edges along a path — path","text":"adding edges via +, unnamed arguments concatenated, element final vector interpreted vertex graph. vector length \\(n+1\\), \\(n\\) edges added, vertex 1 vertex 2, vertex 2 vertex 3, etc. Named arguments used edge attributes new edges. deleting edges, attributes concatenated passed delete_edges().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/path.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper function to add or delete edges along a path — path","text":"","code":"# Create a (directed) wheel g <- make_star(11, center = 1) + path(2:11, 2) plot(g) g <- make_empty_graph(directed = FALSE, n = 10) %>% set_vertex_attr(\"name\", value = letters[1:10]) g2 <- g + path(\"a\", \"b\", \"c\", \"d\") plot(g2) g3 <- g2 + path(\"e\", \"f\", \"g\", weight = 1:2, color = \"red\") E(g3)[[]] #> + 5/5 edges from 67cf3b2 (vertex names): #> tail head tid hid weight color #> 1 a b 1 2 NA #> 2 b c 2 3 NA #> 3 c d 3 4 NA #> 4 e f 5 6 1 red #> 5 f g 6 7 2 red g4 <- g3 + path(c(\"f\", \"c\", \"j\", \"d\"), width = 1:3, color = \"green\") E(g4)[[]] #> + 8/8 edges from b8788ca (vertex names): #> tail head tid hid weight color width #> 1 a b 1 2 NA NA #> 2 b c 2 3 NA NA #> 3 c d 3 4 NA NA #> 4 e f 5 6 1 red NA #> 5 f g 6 7 2 red NA #> 6 c f 3 6 NA green 1 #> 7 c j 3 10 NA green 2 #> 8 d j 4 10 NA green 3"},{"path":"https://r.igraph.org/reference/path.length.hist.html","id":null,"dir":"Reference","previous_headings":"","what":"Shortest (directed or undirected) paths between vertices — path.length.hist","title":"Shortest (directed or undirected) paths between vertices — path.length.hist","text":"path.length.hist() renamed distance_table() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/path.length.hist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shortest (directed or undirected) paths between vertices — path.length.hist","text":"","code":"path.length.hist(graph, directed = TRUE)"},{"path":"https://r.igraph.org/reference/path.length.hist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shortest (directed or undirected) paths between vertices — path.length.hist","text":"graph graph work . directed Whether consider directed paths directed graphs, argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/permute.html","id":null,"dir":"Reference","previous_headings":"","what":"Permute the vertices of a graph — permute","title":"Permute the vertices of a graph — permute","text":"Create new graph, permuting vertex ids.","code":""},{"path":"https://r.igraph.org/reference/permute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Permute the vertices of a graph — permute","text":"","code":"permute(graph, permutation)"},{"path":"https://r.igraph.org/reference/permute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Permute the vertices of a graph — permute","text":"graph input graph, can directed undirected. permutation numeric vector giving permutation apply. first element new id vertex 1, etc. Every number one vcount(graph) must appear exactly .","code":""},{"path":"https://r.igraph.org/reference/permute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Permute the vertices of a graph — permute","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/permute.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Permute the vertices of a graph — permute","text":"function creates new graph input graph permuting vertices according specified mapping. Call function output canonical_permutation() create canonical form graph. permute() keeps graph, vertex edge attributes graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/permute.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Permute the vertices of a graph — permute","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/permute.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Permute the vertices of a graph — permute","text":"igraph_permute_vertices().","code":""},{"path":"https://r.igraph.org/reference/permute.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Permute the vertices of a graph — permute","text":"","code":"# Random permutation of a random graph g <- sample_gnm(20, 50) g2 <- permute(g, sample(vcount(g))) graph.isomorphic(g, g2) #> [1] TRUE # Permutation keeps all attributes g$name <- \"Random graph, Gnm, 20, 50\" V(g)$name <- letters[1:vcount(g)] E(g)$weight <- sample(1:5, ecount(g), replace = TRUE) g2 <- permute(g, sample(vcount(g))) graph.isomorphic(g, g2) #> [1] TRUE g2$name #> [1] \"Random graph, Gnm, 20, 50\" V(g2)$name #> [1] \"h\" \"e\" \"n\" \"d\" \"p\" \"r\" \"a\" \"s\" \"m\" \"f\" \"j\" \"g\" \"c\" \"o\" \"i\" \"b\" \"q\" \"t\" \"l\" #> [20] \"k\" E(g2)$weight #> [1] 3 5 2 3 4 2 1 3 2 4 3 1 1 1 4 2 1 5 5 1 2 3 3 5 3 1 1 2 5 4 1 4 5 5 5 4 4 1 #> [39] 3 1 1 4 3 3 5 5 5 3 3 2 all(sort(E(g2)$weight) == sort(E(g)$weight)) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/permute.vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Permute the vertices of a graph — permute.vertices","title":"Permute the vertices of a graph — permute.vertices","text":"permute.vertices() renamed permute() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/permute.vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Permute the vertices of a graph — permute.vertices","text":"","code":"permute.vertices(graph, permutation)"},{"path":"https://r.igraph.org/reference/permute.vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Permute the vertices of a graph — permute.vertices","text":"graph input graph, can directed undirected. permutation numeric vector giving permutation apply. first element new id vertex 1, etc. Every number one vcount(graph) must appear exactly .","code":""},{"path":"https://r.igraph.org/reference/piecewise.layout.html","id":null,"dir":"Reference","previous_headings":"","what":"Merging graph layouts — piecewise.layout","title":"Merging graph layouts — piecewise.layout","text":"piecewise.layout() renamed layout_components() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/piecewise.layout.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merging graph layouts — piecewise.layout","text":"","code":"piecewise.layout(graph, layout = layout_with_kk, ...)"},{"path":"https://r.igraph.org/reference/piecewise.layout.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merging graph layouts — piecewise.layout","text":"graph input graph. layout function object, layout function use. ... Additional arguments pass layout layout function.","code":""},{"path":"https://r.igraph.org/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Magrittr's pipes — %>%","title":"Magrittr's pipes — %>%","text":"igraph re-exports %>% operator magrittr, find useful. Please see documentation magrittr package.","code":""},{"path":"https://r.igraph.org/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Magrittr's pipes — %>%","text":"lhs Left hand side pipe. rhs Right hand side pipe.","code":""},{"path":"https://r.igraph.org/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Magrittr's pipes — %>%","text":"Result applying right hand side result left hand side.","code":""},{"path":"https://r.igraph.org/reference/pipe.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Magrittr's pipes — %>%","text":"","code":"make_ring(10) %>% add_edges(c(1, 6)) %>% plot()"},{"path":"https://r.igraph.org/reference/plot.common.html","id":null,"dir":"Reference","previous_headings":"","what":"Drawing graphs — Drawing graphs","title":"Drawing graphs — Drawing graphs","text":"common bits three plotting functions plot.igraph, tkplot rglplot discussed manual page","code":""},{"path":"https://r.igraph.org/reference/plot.common.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Drawing graphs — Drawing graphs","text":"currently three different functions igraph package can draw graph various ways: plot.igraph simple non-interactive 2D plotting R devices. Actually implementation plot generic function, can write plot(graph) instead plot.igraph(graph). used standard R devices supports every output format R output device. list quite impressing: PostScript, PDF files, XFig files, SVG files, JPG, PNG course can plot screen well using default devices, good-looking anti-aliased Cairo device. See plot.igraph information. tkplot interactive 2D plotting using tcltk package. can handle graphs moderate size, thousand vertices probably already many. parameters plotted graph can changed interactively issuing tkplot command: position, color size vertices color width edges. See tkplot details. rglplot experimental function draw graphs 3D using OpenGL. See rglplot information. Please also check examples .","code":""},{"path":"https://r.igraph.org/reference/plot.common.html","id":"how-to-specify-graphical-parameters","dir":"Reference","previous_headings":"","what":"How to specify graphical parameters","title":"Drawing graphs — Drawing graphs","text":"three ways give values parameters described , section 'Parameters'. give three ways order precedence. first method supply named arguments plotting commands: plot.igraph, tkplot rglplot. Parameters vertices start prefix ‘vertex.’, parameters edges prefix ‘edge.’, global parameters prefix. Eg. color vertices can given via argument vertex.color, whereas edge.color sets color edges. layout gives layout graphs. second way assign vertex, edge graph attributes graph. attributes prefix, ie. color vertices taken color vertex attribute color edges color edge attribute. layout graph given layout graph attribute. (Always assuming corresponding command argument present.) Setting vertex edge attributes handy want assign given ‘look’ graph, attributes saved graph save save GraphML format write_graph, graph look loading . parameter given command line, corresponding vertex/edge/graph attribute also missing general igraph parameters handled igraph_options also checked. Vertex parameters prefix ‘vertex.’, edge parameters prefixed ‘edge.’, general parameters like layout prefixed ‘plot’. parameters useful want graphs look, vertex size, vertex color, etc. need set every plotting, also need assign vertex/edge attributes every graph. value parameter specified three ways described , default valued used, given source code. Different parameters can different type, eg. vertex colors can given character vector color names, integer vector color numbers current palette. Different types valid different parameters, discussed detail next section. however always true parameter can always function object called graph single argument get “proper” value parameter. (function returns another function object called ...)","code":""},{"path":"https://r.igraph.org/reference/plot.common.html","id":"the-list-of-parameters","dir":"Reference","previous_headings":"","what":"The list of parameters","title":"Drawing graphs — Drawing graphs","text":"Vertex parameters first, note ‘vertex.’ prefix needs added used argument setting via igraph_options. value parameter may scalar valid every vertex vector separate value vertex. (Shorter vectors recycled.) size size vertex, numeric scalar vector, latter case vertex sizes may differ. vertex sizes scaled order size vertices given value three plotting commands. need integer number. default value 15. big enough place short labels vertices. size2 “” size vertex, vertex shapes. various rectangle shapes gives height vertices, whereas size gives width. ignored shapes size can specified single number. default 15. color fill color vertex. numeric current palette used, see palette. character vector may either contain integer values, named colors RGB specified colors three four bytes. strings starting ‘#’ assumed RGB color specifications. possible mix named color RGB colors. Note tkplot ignores fourth byte (alpha channel) RGB color specification. plot.igraph integer values, default igraph palette used (see ‘palette’ parameter . Note different R palette. want () vertices color, supply NA color name. default value “SkyBlue2”. frame.color color frame vertices, formats allowed fill color. want vertices frame, supply NA color name. default “black”. frame.width width frame vertices. default value 1. shape shape vertex, currently “circle”, “square”, “csquare”, “rectangle”, “crectangle”, “vrectangle”, “pie” (see vertex.shape.pie), ‘sphere’, “none” supported, plot.igraph command. “none” draw vertices , although vertex label plotted (given). See shapes details vertex shapes vertex.shape.pie using pie charts vertices. “sphere” vertex shape plots vertices 3D ray-traced spheres, given color size. produces raster image supported graphics devices. devices raster transparency supported spheres transparent background. See dev.capabilities ‘rasterImage’ capability check device supported. default vertices drawn circles. label vertex labels. converted character. Specify NA omit vertex labels. default vertex labels vertex ids. label.family font family used vertex labels. different plotting commands can used different fonts, interpret parameter different ways. basic notation , however, understood plot.igraph tkplot. rglplot support fonts right now, ignores parameter completely. plot.igraph parameter simply passed text argument family. tkplot conversion performed. parameter name existing Tk font, font used label.font label.cex parameters ignored completely. one base families (serif, sans, mono) Times, Helvetica Courier fonts used, guaranteed exist systems. ‘symbol’ base family used symbol font available, otherwise first font ‘symbol’ name. parameter name base families also named Tk font pass tkfont.create hope user knows . label.font label.cex parameters also passed tkfont.create case. default value ‘serif’. label.font font within font family use vertex labels. interpreted way font graphical parameter: 1 plain text, 2 bold face, 3 italic, 4 bold italic 5 specifies symbol font. plot.igraph parameter simply passed text. tkplot, label.family parameter name Tk font parameter used set whether newly created font italic / boldface. Otherwise ignored. rglplot ignored. default value 1. label.cex font size vertex labels. interpreted multiplication factor device-dependent base font size. plot.igraph simply passed text argument cex. tkplot multiplied 12 used size argument tkfont.create. base font thus 12 tkplot. rglplot ignored. default value 1. label.dist distance label center vertex. 0 label centered vertex. 1 label displayed beside vertex. default value 0. label.degree defines position vertex labels, relative center vertices. interpreted angle radians, zero means ‘right’, ‘pi’ means left, -pi/2 pi/2. default value -pi/4. label.color color labels, see color vertex parameter discussed earlier possible values. default value black. Edge parameters require add ‘edge.’ prefix used arguments set igraph_options. edge parameters: color color edges, see color vertex parameter possible values. default parameter darkgrey. width width edges. default value 1. arrow.size size arrows. Currently constant, every edge. vector submitted first element used, ie. taken edge attribute attribute first edge used arrows. likely change future. default value 1. arrow.width width arrows. Currently constant, every edge. vector submitted first element used, ie. taken edge attribute attribute first edge used arrows. likely change future. argument currently used plot.igraph. default value 1, gives width option appeared igraph. lty line type edges. Almost format accepted standard graphics par, 0 “blank” mean edges, 1 “solid” solid lines, possible values : 2 (“dashed”), 3 (“dotted”), 4 (“dotdash”), 5 (“longdash”), 6 (“twodash”). tkplot also accepts standard Tk line type strings, however support “blank” lines, instead type ‘0’ type ‘1’, ie. solid lines drawn. argument ignored rglplot. default value type 1, solid line. label edge labels. converted character. Specify NA omit edge labels. Edge labels omitted default. label.family Font family edge labels. See vertex parameter name details. label.font font edge labels. See corresponding vertex parameter discussed earlier details. label.cex font size edge labels, see corresponding vertex parameter details. label.color color edge labels, see color vertex parameters specify colors. label.x horizontal coordinates edge labels might given , explicitly. NA elements replaced automatically calculated coordinates. NULL, edge horizontal coordinates calculated automatically. parameter supported plot.igraph. label.y label.x, vertical coordinates. curved Specifies whether draw curved edges, . can logical numeric vector scalar. First vector replicated length number edges graph. interpreted edge separately. numeric value specifies curvature edge; zero curvature means straight edges, negative values means edge bends clockwise, positive values opposite. TRUE means curvature 0.5, FALSE means curvature zero. default vector specifying curvature calculated via call curve_multiple function. function makes sure multiple edges curved visible. parameter ignored loop edges. default value FALSE. parameter currently ignored rglplot. arrow.mode parameter can used specify edges arrows drawn. parameter given user (either three ways) specifies edges forward, backward arrows, , arrows . usual, parameter can vector scalar value. can integer character type. integer 0 means arrows, 1 means backward arrows, 2 forward arrows 3 . character vector “<” “<-” specify backward, “>” “->” forward arrows “<>” “<->” stands arrows. values mean arrows, perhaps use “-” “–” specify arrows. Hint: parameter can used ‘cheap’ solution drawing “mixed” graphs: graphs edges directed . want , please create directed graph, version 0.4 vertex pairs edge lists can swapped undirected graphs. default, arrows drawn undirected graphs, directed graphs, arrow drawn edge, according direction. surprising, expected behavior. loop.angle Gives angle radians plotting loop edges. See label.dist vertex parameter see interpreted. default value 0. loop.angle2 Gives second angle radians plotting loop edges. used 3D, loop.angle enough 2D. default value 0. parameters: layout Either function numeric matrix. specifies vertices placed plot. numeric matrix, matrix one line vertex, specifying coordinates. matrix least two columns, x y coordinates, can also third column, z coordinate 3D plots ignored 2D plots. two column matrix given 3D plotting function rglplot third column assumed 1 vertex. layout function, function called graph single parameter determine actual coordinates. function return matrix two three columns. 2D plots third column ignored. default value layout_nicely, smart function chooses layout based graph. margin amount empty space , , left right plot, numeric vector length four. Usually values 0 0.5 meaningful, negative values also possible, make plot zoom part graph. shorter four recycled. rglplot support parameter, can zoom graph flexible way. default value 0. palette color palette use vertex color. default categorical_pal, color-blind friendly categorical palette. See manual page details palettes. parameters supported plot, tkplot rglplot. rescale Logical constant, whether rescale coordinates [-1,1]x[-1,1](x[-1,1]) interval. parameter implemented tkplot. Defaults TRUE, layout rescaled. asp numeric constant, gives asp parameter plot, aspect ratio. Supply 0 want give aspect ratio. ignored tkplot rglplot. Defaults 1. frame Boolean, whether plot frame around graph. ignored tkplot rglplot. Defaults FALSE. main Overall title main plot. default empty annotate.plot igraph option FALSE, graph's name attribute otherwise. See argument base plot function. supported plot. sub Subtitle main plot, default empty. supported plot. xlab Title x axis, default empty annotate.plot igraph option FALSE, number vertices edges, TRUE. supported plot. ylab Title y axis, default empty. supported plot.","code":""},{"path":"https://r.igraph.org/reference/plot.common.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Drawing graphs — Drawing graphs","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/plot.common.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Drawing graphs — Drawing graphs","text":"","code":"if (FALSE) { # \\dontrun{ # plotting a simple ring graph, all default parameters, except the layout g <- make_ring(10) g$layout <- layout_in_circle plot(g) tkplot(g) rglplot(g) # plotting a random graph, set the parameters in the command arguments g <- barabasi.game(100) plot(g, layout=layout_with_fr, vertex.size=4, vertex.label.dist=0.5, vertex.color=\"red\", edge.arrow.size=0.5) # plot a random graph, different color for each component g <- sample_gnp(100, 1/100) comps <- components(g)$membership colbar <- rainbow(max(comps)+1) V(g)$color <- colbar[comps+1] plot(g, layout=layout_with_fr, vertex.size=5, vertex.label=NA) # plot communities in a graph g <- make_full_graph(5) %du% make_full_graph(5) %du% make_full_graph(5) g <- add_edges(g, c(1,6, 1,11, 6,11)) com <- cluster_spinglass(g, spins=5) V(g)$color <- com$membership+1 g <- set_graph_attr(g, \"layout\", layout_with_kk(g)) plot(g, vertex.label.dist=1.5) # draw a bunch of trees, fix layout igraph_options(plot.layout=layout_as_tree) plot(make_tree(20, 2)) plot(make_tree(50, 3), vertex.size=3, vertex.label=NA) tkplot(make_tree(50, 2, mode=\"undirected\"), vertex.size=10, vertex.color=\"green\") } # }"},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Plotting of graphs — plot.igraph","title":"Plotting of graphs — plot.igraph","text":"plot.igraph() able plot graphs R device. non-interactive companion tkplot() function.","code":""},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plotting of graphs — plot.igraph","text":"","code":"# S3 method for class 'igraph' plot( x, axes = FALSE, add = FALSE, xlim = c(-1, 1), ylim = c(-1, 1), mark.groups = list(), mark.shape = 1/2, mark.col = rainbow(length(mark.groups), alpha = 0.3), mark.border = rainbow(length(mark.groups), alpha = 1), mark.expand = 15, loop.size = 1, ... )"},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plotting of graphs — plot.igraph","text":"x graph plot. axes Logical, whether plot axes, defaults FALSE. add Logical scalar, whether add plot current device, delete device's current contents first. xlim limits horizontal axis, unlikely want modify . ylim limits vertical axis, unlikely want modify . mark.groups list vertex id vectors. interpreted set vertex groups. vertex group highlighted, plotting colored smoothed polygon around “” . See arguments control look polygons. mark.shape numeric scalar vector. Controls smoothness vertex group marking polygons. basically ‘shape’ parameter graphics::xspline() function, possible values -1 1. vector, different value used different vertex groups. mark.col scalar vector giving colors marking polygons, format accepted graphics::xspline(); e.g. numeric color ids, symbolic color names, colors RGB. mark.border scalar vector giving colors borders vertex group marking polygons. NA, border drawn. mark.expand numeric scalar vector, size border around marked vertex groups. units vertex sizes. vector given, different values used different vertex groups. loop.size numeric scalar allows user scale loop edges network. default loop size 1. Larger values produce larger loops. ... Additional plotting parameters. See igraph.plotting complete list.","code":""},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plotting of graphs — plot.igraph","text":"Returns NULL, invisibly.","code":""},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plotting of graphs — plot.igraph","text":"One convenient way plot graphs plot tkplot() first, handtune placement vertices, query coordinates tk_coords() function use plot() plot graph R device.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plotting of graphs — plot.igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plotting of graphs — plot.igraph","text":"","code":"g <- make_ring(10) plot(g, layout = layout_with_kk, vertex.color = \"green\")"},{"path":"https://r.igraph.org/reference/plot.sir.html","id":null,"dir":"Reference","previous_headings":"","what":"Plotting the results on multiple SIR model runs — plot.sir","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"function can conveniently plot results multiple SIR model simulations.","code":""},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"","code":"# S3 method for class 'sir' plot( x, comp = c(\"NI\", \"NS\", \"NR\"), median = TRUE, quantiles = c(0.1, 0.9), color = NULL, median_color = NULL, quantile_color = NULL, lwd.median = 2, lwd.quantile = 2, lty.quantile = 3, xlim = NULL, ylim = NULL, xlab = \"Time\", ylab = NULL, ... )"},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"x output SIR simulation, coming sir() function. comp Character scalar, component plot. Either ‘NI’ (infected, default), ‘NS’ (susceptible) ‘NR’ (recovered). median Logical scalar, whether plot (binned) median. quantiles vector (binned) quantiles plot. color Color individual simulation curves. median_color Color median curve. quantile_color Color(s) quantile curves. (recycled needed non-needed entries ignored long.) lwd.median Line width median. lwd.quantile Line width quantile curves. lty.quantile Line type quantile curves. xlim x limits, two-element numeric vector. NULL, calculated data. ylim y limits, two-element numeric vector. NULL, calculated data. xlab x label. ylab y label. NULL automatically added based comp argument. ... Additional arguments passed plot(), run curves added, create figure.","code":""},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"Nothing.","code":""},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"number susceptible/infected/recovered individuals plotted time, multiple simulations.","code":""},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"Bailey, Norman T. J. (1975). mathematical theory infectious diseases applications (2nd ed.). London: Griffin.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"Eric Kolaczyk (http://math.bu.edu/people/kolaczyk/) Gabor Csardi csardi.gabor@gmail.com.","code":""},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"","code":"g <- sample_gnm(100, 100) sm <- sir(g, beta = 5, gamma = 1) plot(sm)"},{"path":"https://r.igraph.org/reference/plotHierarchy.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Cohesive Blocks — plotHierarchy","title":"Calculate Cohesive Blocks — plotHierarchy","text":"plotHierarchy() renamed plot_hierarchy() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/plotHierarchy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Cohesive Blocks — plotHierarchy","text":"","code":"plotHierarchy( blocks, layout = layout_as_tree(hierarchy(blocks), root = 1), ... )"},{"path":"https://r.igraph.org/reference/plotHierarchy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Cohesive Blocks — plotHierarchy","text":"layout layout plot, simply passed plot.igraph(), see possible formats . default Reingold-Tilford layout generator used. ... Additional arguments. plot_hierarchy() plot() pass plot.igraph(). print() summary() ignore .","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure dendrogram plots — plot_dendrogram","title":"Community structure dendrogram plots — plot_dendrogram","text":"Plot hierarchical community structure dendrogram.","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure dendrogram plots — plot_dendrogram","text":"","code":"plot_dendrogram(x, mode = igraph_opt(\"dend.plot.type\"), ...) # S3 method for class 'communities' plot_dendrogram( x, mode = igraph_opt(\"dend.plot.type\"), ..., use.modularity = FALSE, palette = categorical_pal(8) )"},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure dendrogram plots — plot_dendrogram","text":"x object containing community structure graph. See communities() details. mode dendrogram plotting function use. See details . ... Additional arguments supply dendrogram plotting function. use.modularity Logical scalar, whether use modularity values define height branches. palette color palette use colored plots.","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Community structure dendrogram plots — plot_dendrogram","text":"Returns whatever return value plotting function, plot.phylo, plot.dendrogram plot.hclust.","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Community structure dendrogram plots — plot_dendrogram","text":"plot_dendrogram() supports three different plotting functions, selected via mode argument. default plotting function taken dend.plot.type igraph option, possible values: auto Choose automatically plotting functions. plot.phylo sophisticated, choosen, whenever ape package available. Otherwise plot.hclust used. phylo Use plot.phylo ape package. hclust Use plot.hclust stats package. dendrogram Use plot.dendrogram stats package. different plotting functions take different sets arguments. using plot.phylo (mode=\"phylo\"), following syntax: extra arguments documented : colbar Color bar edges. edge.color Edge colors. NULL, colbar argument used. use.edge.length Passed plot.phylo. dots Attitional arguments pass plot.phylo. syntax plot.hclust (mode=\"hclust\"): extra arguments documented : rect numeric scalar, number groups mark dendrogram. dendrogram cut exactly rect groups marked via rect.hclust command. Set zero want mark groups. colbar colors rectangles mark vertex groups via rect argument. hang put leaf nodes, corresponds hang argument plot.hclust. ann Whether annotate plot, ann argument plot.hclust. main main title plot, main argument plot.hclust. sub sub-title plot, sub argument plot.hclust. xlab label horizontal axis, passed plot.hclust. ylab label vertical axis, passed plot.hclust. dots Attitional arguments pass plot.hclust. syntax plot.dendrogram (mode=\"dendrogram\"): extra arguments simply passed .dendrogram().","code":"plot_dendrogram(x, mode=\"phylo\", colbar = palette(), edge.color = NULL, use.edge.length = FALSE, \\dots) plot_dendrogram(x, mode=\"hclust\", rect = 0, colbar = palette(), hang = 0.01, ann = FALSE, main = \"\", sub = \"\", xlab = \"\", ylab = \"\", \\dots) plot_dendrogram(x, \\dots)"},{"path":[]},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community structure dendrogram plots — plot_dendrogram","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community structure dendrogram plots — plot_dendrogram","text":"","code":"karate <- make_graph(\"Zachary\") fc <- cluster_fast_greedy(karate) plot_dendrogram(fc)"},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":null,"dir":"Reference","previous_headings":"","what":"HRG dendrogram plot — plot_dendrogram.igraphHRG","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"Plot hierarchical random graph dendrogram.","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"","code":"# S3 method for class 'igraphHRG' plot_dendrogram(x, mode = igraph_opt(\"dend.plot.type\"), ...)"},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"x igraphHRG, hierarchical random graph, returned fit_hrg() function. mode dendrogram plotting function use. See details . ... Additional arguments supply dendrogram plotting function.","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"Returns whatever return value plotting function, plot.phylo, plot.dendrogram plot.hclust.","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"plot_dendrogram() supports three different plotting functions, selected via mode argument. default plotting function taken dend.plot.type igraph option, possible values: auto Choose automatically plotting functions. plot.phylo sophisticated, choosen, whenever ape package available. Otherwise plot.hclust used. phylo Use plot.phylo ape package. hclust Use plot.hclust stats package. dendrogram Use plot.dendrogram stats package. different plotting functions take different sets arguments. using plot.phylo (mode=\"phylo\"), following syntax: extra arguments documented : colbar Color bar edges. edge.color Edge colors. NULL, colbar argument used. use.edge.length Passed plot.phylo. dots Attitional arguments pass plot.phylo. syntax plot.hclust (mode=\"hclust\"): extra arguments documented : rect numeric scalar, number groups mark dendrogram. dendrogram cut exactly rect groups marked via rect.hclust command. Set zero want mark groups. colbar colors rectangles mark vertex groups via rect argument. hang put leaf nodes, corresponds hang argument plot.hclust. ann Whether annotate plot, ann argument plot.hclust. main main title plot, main argument plot.hclust. sub sub-title plot, sub argument plot.hclust. xlab label horizontal axis, passed plot.hclust. ylab label vertical axis, passed plot.hclust. dots Attitional arguments pass plot.hclust. syntax plot.dendrogram (mode=\"dendrogram\"): extra arguments simply passed .dendrogram().","code":"plot_dendrogram(x, mode=\"phylo\", colbar = rainbow(11, start=0.7, end=0.1), edge.color = NULL, use.edge.length = FALSE, \\dots) plot_dendrogram(x, mode=\"hclust\", rect = 0, colbar = rainbow(rect), hang = 0.01, ann = FALSE, main = \"\", sub = \"\", xlab = \"\", ylab = \"\", \\dots) plot_dendrogram(x, \\dots)"},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"","code":"g <- make_full_graph(5) + make_full_graph(5) hrg <- fit_hrg(g) plot_dendrogram(hrg)"},{"path":"https://r.igraph.org/reference/plus-.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Add vertices, edges or another graph to a graph — +.igraph","title":"Add vertices, edges or another graph to a graph — +.igraph","text":"Add vertices, edges another graph graph","code":""},{"path":"https://r.igraph.org/reference/plus-.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add vertices, edges or another graph to a graph — +.igraph","text":"","code":"# S3 method for class 'igraph' e1 + e2"},{"path":"https://r.igraph.org/reference/plus-.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add vertices, edges or another graph to a graph — +.igraph","text":"e1 First argument, probably igraph graph, see details . e2 Second argument, see details .","code":""},{"path":"https://r.igraph.org/reference/plus-.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add vertices, edges or another graph to a graph — +.igraph","text":"plus operator can used add vertices edges graph. actual operation performed depends type right hand side argument. another igraph graph object named graphs, union two graphs calculated, see union(). another igraph graph object, either two named, disjoint union two graphs calculated, see disjoint_union(). numeric scalar, specified number vertices added graph. character scalar vector, interpreted names vertices add graph. object created vertex() vertices() function, new vertices added graph. form appropriate one wants add vertex attributes well. operands vertices() function specifies number vertices add attributes well. unnamed arguments vertices() concatenated used ‘name’ vertex attribute (.e. vertex names), named arguments added additional vertex attributes. Examples: vertex() just alias vertices(), provided readability. user use single vertex added graph. object created edge() edges() function, new edges added graph. new edges possibly attributes can specified arguments edges() function. unnamed arguments edges() concatenated used vertex ids end points new edges. named arguments added edge attributes. Examples: See examples . edge() just alias edges() provided readability. user use single edge added graph. object created path() function, new edges form path added. edges possibly attributes specified arguments path() function. non-named arguments concatenated interpreted vertex ids along path. remaining arguments added edge attributes. Examples: important note , although plus operator commutative, .e. possible write associative, e.g. results syntax error, unless parentheses used: clarity, suggest always put graph object left hand side operator:","code":"g <- g + vertex(shape=\"circle\", color= \"red\") g <- g + vertex(\"foo\", color=\"blue\") g <- g + vertex(\"bar\", \"foobar\") g <- g + vertices(\"bar2\", \"foobar2\", color=1:2, shape=\"rectangle\") g <- make_empty_graph() + vertices(letters[1:10]) + vertices(\"foo\", \"bar\", \"bar2\", \"foobar2\") g <- g + edge(\"a\", \"b\") g <- g + edges(\"foo\", \"bar\", \"bar2\", \"foobar2\") g <- g + edges(c(\"bar\", \"foo\", \"foobar2\", \"bar2\"), color=\"red\", weight=1:2) g <- make_empty_graph() + vertices(letters[1:10]) g <- g + path(\"a\", \"b\", \"c\", \"d\") g <- g + path(\"e\", \"f\", \"g\", weight=1:2, color=\"red\") g <- g + path(c(\"f\", \"c\", \"j\", \"d\"), width=1:3, color=\"green\") graph <- \"foo\" + make_empty_graph() graph <- \"foo\" + \"bar\" + make_empty_graph() graph <- \"foo\" + ( \"bar\" + make_empty_graph() ) graph <- make_empty_graph() + \"foo\" + \"bar\""},{"path":[]},{"path":"https://r.igraph.org/reference/plus-.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add vertices, edges or another graph to a graph — +.igraph","text":"","code":"# 10 vertices named a,b,c,... and no edges g <- make_empty_graph() + vertices(letters[1:10]) # Add edges to make it a ring g <- g + path(letters[1:10], letters[1], color = \"grey\") # Add some extra random edges g <- g + edges(sample(V(g), 10, replace = TRUE), color = \"red\") g$layout <- layout_in_circle plot(g)"},{"path":"https://r.igraph.org/reference/power.law.fit.html","id":null,"dir":"Reference","previous_headings":"","what":"Fitting a power-law distribution function to discrete data — power.law.fit","title":"Fitting a power-law distribution function to discrete data — power.law.fit","text":"power.law.fit() renamed fit_power_law() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/power.law.fit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fitting a power-law distribution function to discrete data — power.law.fit","text":"","code":"power.law.fit( x, xmin = NULL, start = 2, force.continuous = FALSE, implementation = c(\"plfit\", \"R.mle\"), ... )"},{"path":"https://r.igraph.org/reference/power.law.fit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fitting a power-law distribution function to discrete data — power.law.fit","text":"x data fit, numeric vector. implementation ‘R.mle’ data must integer values. ‘plfit’ implementation non-integer values might present continuous power-law distribution fitted. xmin Numeric scalar, NULL. lower bound fitting power-law. NULL, smallest value x used ‘R.mle’ implementation, value automatically determined ‘plfit’ implementation. argument makes possible fit tail distribution. start Numeric scalar. initial value exponent minimizing function, ‘R.mle’ implementation. Usually safe leave untouched. force.continuous Logical scalar. Whether force continuous distribution ‘plfit’ implementation, even sample vector contains integer values (chance). argument false, igraph assume continuous distribution least one sample non-integer assume discrete distribution otherwise. implementation Character scalar. implementation use. See details . ... Additional arguments, passed maximum likelihood optimizing function, stats4::mle(), ‘R.mle’ implementation chosen. ignored ‘plfit’ implementation.","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"power_centrality() takes graph (dat) returns Boncich power centralities positions (selected nodes). decay rate power contributions specified exponent (1 default).","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"","code":"power_centrality( graph, nodes = V(graph), loops = FALSE, exponent = 1, rescale = FALSE, tol = 1e-07, sparse = TRUE )"},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"graph input graph. nodes vertex sequence indicating vertices included calculation. default, vertices included. loops boolean indicating whether diagonal treated valid data. Set true data can contain loops. loops FALSE default. exponent exponent (decay rate) Bonacich power centrality score; can negative rescale true, centrality scores rescaled sum 1. tol tolerance near-singularities matrix inversion (see solve()) sparse Logical scalar, whether use sparse matrices calculation. ‘Matrix’ package required sparse matrix support","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"vector, containing centrality scores.","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"Bonacich's power centrality measure defined \\(C_{BP}\\left(\\alpha,\\beta\\right)=\\alpha\\left(\\mathbf{}-\\beta\\mathbf{}\\right)^{-1}\\mathbf{}\\mathbf{1}\\), \\(\\beta\\) attenuation parameter (set exponent) \\(\\mathbf{}\\) graph adjacency matrix. (coefficient \\(\\alpha\\) acts scaling parameter, set (following Bonacich (1987)) sum squared scores equal number vertices. allows 1 used reference value “middle” centrality range.) \\(\\beta \\rightarrow \\)\\( 1/\\lambda_{\\mathbf{}1}\\) (reciprocal largest eigenvalue \\(\\mathbf{}\\)), within constant multiple familiar eigenvector centrality score; values \\(\\beta\\), behavior measure quite different. particular, \\(\\beta\\) gives positive negative weight even odd walks, respectively, can seen series expansion \\(C_{BP}\\left(\\alpha,\\beta\\right)=\\alpha \\sum_{k=0}^\\infty \\beta^k \\)\\( \\mathbf{}^{k+1} \\mathbf{1}\\) converges long \\(|\\beta| \\)\\( < 1/\\lambda_{\\mathbf{}1}\\). magnitude \\(\\beta\\) controls influence distant actors ego's centrality score, larger magnitudes indicating slower rates decay. (High rates, hence, imply greater sensitivity edge effects.) Interpretively, Bonacich power measure corresponds notion power vertex recursively defined sum power alters. nature recursion involved controlled power exponent: positive values imply vertices become powerful alters become powerful (occurs cooperative relations), negative values imply vertices become powerful alters become weaker (occurs competitive antagonistic relations). magnitude exponent indicates tendency effect decay across long walks; higher magnitudes imply slower decay. One interesting feature measure relative instability changes exponent magnitude (particularly negative case). theory motivates use measure, careful choose decay parameter non-ad hoc basis. directed networks, Bonacich power measure can understood similar status network higher status nodes edges point others status. Node 's centrality depends centrality nodes points toward, centrality depends nodes point toward, etc. Note, means node -degree 0 Bonacich power centrality 0 point towards anyone. using directed network important think edge direction represents.","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"function ported (.e. copied) SNA package.","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"warning-","dir":"Reference","previous_headings":"","what":"Warning","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"Singular adjacency matrices cause end headaches algorithm; thus, routine may fail certain cases. fixed get better algorithm.","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"Bonacich, P. (1972). “Factoring Weighting Approaches Status Scores Clique Identification.” Journal Mathematical Sociology, 2, 113-120. Bonacich, P. (1987). “Power Centrality: Family Measures.” American Journal Sociology, 92, 1170-1182.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"Carter T. Butts (http://www.faculty.uci.edu/profile.cfm?faculty_id=5057), ported igraph Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"","code":"# Generate some test data from Bonacich, 1987: g.c <- make_graph(c(1, 2, 1, 3, 2, 4, 3, 5), dir = FALSE) g.d <- make_graph(c(1, 2, 1, 3, 1, 4, 2, 5, 3, 6, 4, 7), dir = FALSE) g.e <- make_graph(c(1, 2, 1, 3, 1, 4, 2, 5, 2, 6, 3, 7, 3, 8, 4, 9, 4, 10), dir = FALSE) g.f <- make_graph( c(1, 2, 1, 3, 1, 4, 2, 5, 2, 6, 2, 7, 3, 8, 3, 9, 3, 10, 4, 11, 4, 12, 4, 13), dir = FALSE ) # Compute power centrality scores for (e in seq(-0.5, .5, by = 0.1)) { print(round(power_centrality(g.c, exp = e)[c(1, 2, 4)], 2)) } #> [1] 0.00 1.58 0.00 #> [1] 0.73 1.45 0.36 #> [1] 0.97 1.34 0.49 #> [1] 1.09 1.27 0.54 #> [1] 1.15 1.23 0.58 #> [1] 1.2 1.2 0.6 #> [1] 1.22 1.17 0.61 #> [1] 1.25 1.16 0.62 #> [1] 1.26 1.14 0.63 #> [1] 1.27 1.13 0.64 #> [1] 1.28 1.12 0.64 for (e in seq(-0.4, .4, by = 0.1)) { print(round(power_centrality(g.d, exp = e)[c(1, 2, 5)], 2)) } #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 for (e in seq(-0.4, .4, by = 0.1)) { print(round(power_centrality(g.e, exp = e)[c(1, 2, 5)], 2)) } #> [1] -1.00 1.67 -0.33 #> [1] 0.36 1.81 0.12 #> [1] 1.00 1.67 0.33 #> [1] 1.30 1.55 0.43 #> [1] 1.46 1.46 0.49 #> [1] 1.57 1.40 0.52 #> [1] 1.63 1.36 0.54 #> [1] 1.68 1.33 0.56 #> [1] 1.72 1.30 0.57 for (e in seq(-0.4, .4, by = 0.1)) { print(round(power_centrality(g.f, exp = e)[c(1, 2, 5)], 2)) } #> [1] -1.72 1.53 -0.57 #> [1] -0.55 2.03 -0.18 #> [1] 0.44 2.05 0.15 #> [1] 1.01 1.91 0.34 #> [1] 1.33 1.78 0.44 #> [1] 1.52 1.67 0.51 #> [1] 1.65 1.59 0.55 #> [1] 1.74 1.53 0.58 #> [1] 1.80 1.48 0.60"},{"path":"https://r.igraph.org/reference/predict_edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Predict edges based on a hierarchical random graph model — predict_edges","title":"Predict edges based on a hierarchical random graph model — predict_edges","text":"predict_edges() uses hierarchical random graph model predict missing edges network. done sampling hierarchical models around optimum model, proportionally likelihood. MCMC sampling stated hrg(), given start argument set TRUE. Otherwise HRG fitted graph first.","code":""},{"path":"https://r.igraph.org/reference/predict_edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Predict edges based on a hierarchical random graph model — predict_edges","text":"","code":"predict_edges( graph, hrg = NULL, start = FALSE, num.samples = 10000, num.bins = 25 )"},{"path":"https://r.igraph.org/reference/predict_edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Predict edges based on a hierarchical random graph model — predict_edges","text":"graph graph fit model . Edge directions ignored directed graphs. hrg hierarchical random graph model, form igraphHRG object. predict_edges() allow NULL well, HRG fitted graph first, random starting point. start Logical, whether start fitting/sampling supplied igraphHRG object, random starting point. num.samples Number samples use consensus generation missing edge prediction. num.bins Number bins edge probabilities. Give higher number accurate prediction.","code":""},{"path":"https://r.igraph.org/reference/predict_edges.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Predict edges based on a hierarchical random graph model — predict_edges","text":"list entries: edges predicted edges, two-column matrix vertex ids. prob Probabilities edges, according fitted model. hrg (supplied fitted) hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/predict_edges.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Predict edges based on a hierarchical random graph model — predict_edges","text":". Clauset, C. Moore, M.E.J. Newman. Hierarchical structure prediction missing links networks. Nature 453, 98–101 (2008); . Clauset, C. Moore, M.E.J. Newman. Structural Inference Hierarchies Networks. E. M. Airoldi et al. (Eds.): ICML 2006 Ws, Lecture Notes Computer Science 4503, 1–13. Springer-Verlag, Berlin Heidelberg (2007).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/predict_edges.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Predict edges based on a hierarchical random graph model — predict_edges","text":"","code":"if (FALSE) { # rlang::is_interactive() ## A graph with two dense groups g <- sample_gnp(10, p = 1 / 2) + sample_gnp(10, p = 1 / 2) hrg <- fit_hrg(g) hrg ## The consensus tree for it consensus_tree(g, hrg = hrg, start = TRUE) ## Prediction of missing edges g2 <- make_full_graph(4) + (make_full_graph(4) - path(1, 2)) predict_edges(g2) }"},{"path":"https://r.igraph.org/reference/preference.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Trait-based random generation — preference.game","title":"Trait-based random generation — preference.game","text":"preference.game() renamed sample_pref() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/preference.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trait-based random generation — preference.game","text":"","code":"preference.game( nodes, types, type.dist = rep(1, types), fixed.sizes = FALSE, pref.matrix = matrix(1, types, types), directed = FALSE, loops = FALSE )"},{"path":"https://r.igraph.org/reference/preference.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trait-based random generation — preference.game","text":"nodes number vertices graphs. types number different vertex types. type.dist distribution vertex types, numeric vector length ‘types’ containing non-negative numbers. vector normed obtain probabilities. fixed.sizes Fix number vertices given vertex type label. type.dist argument gives group sizes (.e. number vertices different labels) case. pref.matrix square matrix giving preferences vertex types. matrix ‘types’ rows columns. generating undirected graph, must symmetric. directed Logical constant, whether create directed graph. loops Logical constant, whether self-loops allowed graph.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Print an edge sequence to the screen — print.igraph.es","title":"Print an edge sequence to the screen — print.igraph.es","text":"long edge sequences, printing truncated fit screen. Use print() explicitly full argument see full sequence.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print an edge sequence to the screen — print.igraph.es","text":"","code":"# S3 method for class 'igraph.es' print(x, full = igraph_opt(\"print.full\"), id = igraph_opt(\"print.id\"), ...)"},{"path":"https://r.igraph.org/reference/print.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print an edge sequence to the screen — print.igraph.es","text":"x edge sequence. full Whether show full sequence, truncate output screen size. id Whether print graph ID. ... Currently ignored.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print an edge sequence to the screen — print.igraph.es","text":"edge sequence, invisibly.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.es.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Print an edge sequence to the screen — print.igraph.es","text":"Edge sequences created double bracket operator printed differently, together attributes edges sequence, table.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/print.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print an edge sequence to the screen — print.igraph.es","text":"","code":"# Unnamed graphs g <- make_ring(10) E(g) #> + 10/10 edges from 90d847a: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 # Named graphs g2 <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) E(g2) #> + 10/10 edges from c6a3bbf (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J # All edges in a long sequence g3 <- make_ring(200) E(g3) #> + 200/200 edges from 93b81d1: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 10--11 #> [11] 11--12 12--13 13--14 14--15 15--16 16--17 17--18 18--19 19--20 20--21 #> [21] 21--22 22--23 23--24 24--25 25--26 26--27 27--28 28--29 29--30 30--31 #> [31] 31--32 32--33 33--34 34--35 35--36 36--37 37--38 38--39 39--40 40--41 #> [41] 41--42 42--43 43--44 44--45 45--46 46--47 47--48 48--49 49--50 50--51 #> [51] 51--52 52--53 53--54 54--55 55--56 56--57 57--58 58--59 59--60 60--61 #> [61] 61--62 62--63 63--64 64--65 65--66 66--67 67--68 68--69 69--70 70--71 #> [71] 71--72 72--73 73--74 74--75 75--76 76--77 77--78 78--79 79--80 80--81 #> [81] 81--82 82--83 83--84 84--85 85--86 86--87 87--88 88--89 89--90 90--91 #> [91] 91--92 92--93 93--94 94--95 95--96 96--97 97--98 98--99 #> + ... omitted several edges E(g3) %>% print(full = TRUE) #> + 200/200 edges from 93b81d1: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 #> [9] 9-- 10 10-- 11 11-- 12 12-- 13 13-- 14 14-- 15 15-- 16 16-- 17 #> [17] 17-- 18 18-- 19 19-- 20 20-- 21 21-- 22 22-- 23 23-- 24 24-- 25 #> [25] 25-- 26 26-- 27 27-- 28 28-- 29 29-- 30 30-- 31 31-- 32 32-- 33 #> [33] 33-- 34 34-- 35 35-- 36 36-- 37 37-- 38 38-- 39 39-- 40 40-- 41 #> [41] 41-- 42 42-- 43 43-- 44 44-- 45 45-- 46 46-- 47 47-- 48 48-- 49 #> [49] 49-- 50 50-- 51 51-- 52 52-- 53 53-- 54 54-- 55 55-- 56 56-- 57 #> [57] 57-- 58 58-- 59 59-- 60 60-- 61 61-- 62 62-- 63 63-- 64 64-- 65 #> [65] 65-- 66 66-- 67 67-- 68 68-- 69 69-- 70 70-- 71 71-- 72 72-- 73 #> [73] 73-- 74 74-- 75 75-- 76 76-- 77 77-- 78 78-- 79 79-- 80 80-- 81 #> [81] 81-- 82 82-- 83 83-- 84 84-- 85 85-- 86 86-- 87 87-- 88 88-- 89 #> [89] 89-- 90 90-- 91 91-- 92 92-- 93 93-- 94 94-- 95 95-- 96 96-- 97 #> [97] 97-- 98 98-- 99 99--100 100--101 101--102 102--103 103--104 104--105 #> [105] 105--106 106--107 107--108 108--109 109--110 110--111 111--112 112--113 #> [113] 113--114 114--115 115--116 116--117 117--118 118--119 119--120 120--121 #> [121] 121--122 122--123 123--124 124--125 125--126 126--127 127--128 128--129 #> [129] 129--130 130--131 131--132 132--133 133--134 134--135 135--136 136--137 #> [137] 137--138 138--139 139--140 140--141 141--142 142--143 143--144 144--145 #> [145] 145--146 146--147 147--148 148--149 149--150 150--151 151--152 152--153 #> [153] 153--154 154--155 155--156 156--157 157--158 158--159 159--160 160--161 #> [161] 161--162 162--163 163--164 164--165 165--166 166--167 167--168 168--169 #> [169] 169--170 170--171 171--172 172--173 173--174 174--175 175--176 176--177 #> [177] 177--178 178--179 179--180 180--181 181--182 182--183 183--184 184--185 #> [185] 185--186 186--187 187--188 188--189 189--190 190--191 191--192 192--193 #> [193] 193--194 194--195 195--196 196--197 197--198 198--199 199--200 1--200 # Metadata g4 <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) %>% set_edge_attr(\"weight\", value = 1:10) %>% set_edge_attr(\"color\", value = \"green\") E(g4) #> + 10/10 edges from a400150 (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J E(g4)[[]] #> + 10/10 edges from a400150 (vertex names): #> tail head tid hid weight color #> 1 A B 1 2 1 green #> 2 B C 2 3 2 green #> 3 C D 3 4 3 green #> 4 D E 4 5 4 green #> 5 E F 5 6 5 green #> 6 F G 6 7 6 green #> 7 G H 7 8 7 green #> 8 H I 8 9 8 green #> 9 I J 9 10 9 green #> 10 A J 1 10 10 green E(g4)[[1:5]] #> + 5/10 edges from a400150 (vertex names): #> tail head tid hid weight color #> 1 A B 1 2 1 green #> 2 B C 2 3 2 green #> 3 C D 3 4 3 green #> 4 D E 4 5 4 green #> 5 E F 5 6 5 green"},{"path":"https://r.igraph.org/reference/print.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Print graphs to the terminal — print.igraph","title":"Print graphs to the terminal — print.igraph","text":"functions attempt print graph terminal human readable form.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print graphs to the terminal — print.igraph","text":"","code":"# S3 method for class 'igraph' print( x, full = igraph_opt(\"print.full\"), graph.attributes = igraph_opt(\"print.graph.attributes\"), vertex.attributes = igraph_opt(\"print.vertex.attributes\"), edge.attributes = igraph_opt(\"print.edge.attributes\"), names = TRUE, max.lines = igraph_opt(\"auto.print.lines\"), id = igraph_opt(\"print.id\"), ... ) # S3 method for class 'igraph' summary(object, ...)"},{"path":"https://r.igraph.org/reference/print.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print graphs to the terminal — print.igraph","text":"x graph print. full Logical scalar, whether print graph structure well. graph.attributes Logical constant, whether print graph attributes. vertex.attributes Logical constant, whether print vertex attributes. edge.attributes Logical constant, whether print edge attributes. names Logical constant, whether print symbolic vertex names (.e. name vertex attribute) vertex ids. max.lines maximum number lines use. rest output truncated. id Whether print graph ID. ... Additional agruments. object graph summary printed.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print graphs to the terminal — print.igraph","text":"functions return graph invisibly.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Print graphs to the terminal — print.igraph","text":"summary.igraph prints number vertices, edges whether graph directed. print_all() prints information, also lists edges, optionally graph, vertex /edge attributes. print.igraph() behaves either summary.igraph print_all() depending full argument. See also ‘print.full’ igraph option igraph_opt(). graph summary printed summary.igraph (print.igraph() print_all()) consists one lines. first line contains basic properties graph, rest contains attributes. example, small star graph weighted directed edges named vertices: first line always starts IGRAPH, showing object igraph graph. seven character code printed, first seven characters unique id graph. See graph_id() . four letter long code string printed. first letter distinguishes directed (‘D’) undirected (‘U’) graphs. second letter ‘N’ named graphs, .e. graphs name vertex attribute set. third letter ‘W’ weighted graphs, .e. graphs weight edge attribute set. fourth letter ‘B’ bipartite graphs, .e. graphs type vertex attribute set. followed number vertices edges, two dashes. Finally, two dashes, name graph printed, one, .e. name graph attribute set. second line, attributes graph listed, separated comma. attribute names, kind attribute – graph (‘g’), vertex (‘v’) edge (‘e’) – denoted, type attribute well, character (‘c’), numeric (‘n’), logical (‘l’), (‘x’). igraph 0.4 print_all() print.igraph() use max.print option, see base::options() details. igraph 1.1.1, str.igraph function defunct, use print_all().","code":"IGRAPH badcafe DNW- 10 9 -- In-star + attr: name (g/c), mode (g/c), center (g/n), name (v/c), weight (e/n)"},{"path":"https://r.igraph.org/reference/print.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print graphs to the terminal — print.igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/print.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print graphs to the terminal — print.igraph","text":"","code":"g <- make_ring(10) g #> IGRAPH 62b08ca U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from 62b08ca: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 summary(g) #> IGRAPH 62b08ca U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l)"},{"path":"https://r.igraph.org/reference/print.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Show a vertex sequence on the screen — print.igraph.vs","title":"Show a vertex sequence on the screen — print.igraph.vs","text":"long vertex sequences, printing truncated fit screen. Use print() explicitly full argument see full sequence.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show a vertex sequence on the screen — print.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' print(x, full = igraph_opt(\"print.full\"), id = igraph_opt(\"print.id\"), ...)"},{"path":"https://r.igraph.org/reference/print.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show a vertex sequence on the screen — print.igraph.vs","text":"x vertex sequence. full Whether show full sequence, truncate output screen size. id Whether print graph ID. ... arguments currently ignored.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Show a vertex sequence on the screen — print.igraph.vs","text":"vertex sequence, invisibly.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.vs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Show a vertex sequence on the screen — print.igraph.vs","text":"Vertex sequence created double bracket operator printed differently, together attributes vertices sequence, table.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/print.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Show a vertex sequence on the screen — print.igraph.vs","text":"","code":"# Unnamed graphs g <- make_ring(10) V(g) #> + 10/10 vertices, from 2d6aeea: #> [1] 1 2 3 4 5 6 7 8 9 10 # Named graphs g2 <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) V(g2) #> + 10/10 vertices, named, from 3a66fac: #> [1] A B C D E F G H I J # All vertices in the sequence g3 <- make_ring(1000) V(g3) #> + 1000/1000 vertices, from 58f38b1: #> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #> [15] 15 16 17 18 19 20 21 22 23 24 25 26 27 28 #> [29] 29 30 31 32 33 34 35 36 37 38 39 40 41 42 #> [43] 43 44 45 46 47 48 49 50 51 52 53 54 55 56 #> [57] 57 58 59 60 61 62 63 64 65 66 67 68 69 70 #> [71] 71 72 73 74 75 76 77 78 79 80 81 82 83 84 #> [85] 85 86 87 88 89 90 91 92 93 94 95 96 97 98 #> [99] 99 100 101 102 103 104 105 106 107 108 109 110 111 112 #> [113] 113 114 115 116 117 118 119 120 121 122 123 124 125 126 #> [127] 127 128 129 130 131 132 133 134 135 136 137 138 139 140 #> + ... omitted several vertices print(V(g3), full = TRUE) #> + 1000/1000 vertices, from 58f38b1: #> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #> [15] 15 16 17 18 19 20 21 22 23 24 25 26 27 28 #> [29] 29 30 31 32 33 34 35 36 37 38 39 40 41 42 #> [43] 43 44 45 46 47 48 49 50 51 52 53 54 55 56 #> [57] 57 58 59 60 61 62 63 64 65 66 67 68 69 70 #> [71] 71 72 73 74 75 76 77 78 79 80 81 82 83 84 #> [85] 85 86 87 88 89 90 91 92 93 94 95 96 97 98 #> [99] 99 100 101 102 103 104 105 106 107 108 109 110 111 112 #> [113] 113 114 115 116 117 118 119 120 121 122 123 124 125 126 #> [127] 127 128 129 130 131 132 133 134 135 136 137 138 139 140 #> [141] 141 142 143 144 145 146 147 148 149 150 151 152 153 154 #> [155] 155 156 157 158 159 160 161 162 163 164 165 166 167 168 #> [169] 169 170 171 172 173 174 175 176 177 178 179 180 181 182 #> [183] 183 184 185 186 187 188 189 190 191 192 193 194 195 196 #> [197] 197 198 199 200 201 202 203 204 205 206 207 208 209 210 #> [211] 211 212 213 214 215 216 217 218 219 220 221 222 223 224 #> [225] 225 226 227 228 229 230 231 232 233 234 235 236 237 238 #> [239] 239 240 241 242 243 244 245 246 247 248 249 250 251 252 #> [253] 253 254 255 256 257 258 259 260 261 262 263 264 265 266 #> [267] 267 268 269 270 271 272 273 274 275 276 277 278 279 280 #> [281] 281 282 283 284 285 286 287 288 289 290 291 292 293 294 #> [295] 295 296 297 298 299 300 301 302 303 304 305 306 307 308 #> [309] 309 310 311 312 313 314 315 316 317 318 319 320 321 322 #> [323] 323 324 325 326 327 328 329 330 331 332 333 334 335 336 #> [337] 337 338 339 340 341 342 343 344 345 346 347 348 349 350 #> [351] 351 352 353 354 355 356 357 358 359 360 361 362 363 364 #> [365] 365 366 367 368 369 370 371 372 373 374 375 376 377 378 #> [379] 379 380 381 382 383 384 385 386 387 388 389 390 391 392 #> [393] 393 394 395 396 397 398 399 400 401 402 403 404 405 406 #> [407] 407 408 409 410 411 412 413 414 415 416 417 418 419 420 #> [421] 421 422 423 424 425 426 427 428 429 430 431 432 433 434 #> [435] 435 436 437 438 439 440 441 442 443 444 445 446 447 448 #> [449] 449 450 451 452 453 454 455 456 457 458 459 460 461 462 #> [463] 463 464 465 466 467 468 469 470 471 472 473 474 475 476 #> [477] 477 478 479 480 481 482 483 484 485 486 487 488 489 490 #> [491] 491 492 493 494 495 496 497 498 499 500 501 502 503 504 #> [505] 505 506 507 508 509 510 511 512 513 514 515 516 517 518 #> [519] 519 520 521 522 523 524 525 526 527 528 529 530 531 532 #> [533] 533 534 535 536 537 538 539 540 541 542 543 544 545 546 #> [547] 547 548 549 550 551 552 553 554 555 556 557 558 559 560 #> [561] 561 562 563 564 565 566 567 568 569 570 571 572 573 574 #> [575] 575 576 577 578 579 580 581 582 583 584 585 586 587 588 #> [589] 589 590 591 592 593 594 595 596 597 598 599 600 601 602 #> [603] 603 604 605 606 607 608 609 610 611 612 613 614 615 616 #> [617] 617 618 619 620 621 622 623 624 625 626 627 628 629 630 #> [631] 631 632 633 634 635 636 637 638 639 640 641 642 643 644 #> [645] 645 646 647 648 649 650 651 652 653 654 655 656 657 658 #> [659] 659 660 661 662 663 664 665 666 667 668 669 670 671 672 #> [673] 673 674 675 676 677 678 679 680 681 682 683 684 685 686 #> [687] 687 688 689 690 691 692 693 694 695 696 697 698 699 700 #> [701] 701 702 703 704 705 706 707 708 709 710 711 712 713 714 #> [715] 715 716 717 718 719 720 721 722 723 724 725 726 727 728 #> [729] 729 730 731 732 733 734 735 736 737 738 739 740 741 742 #> [743] 743 744 745 746 747 748 749 750 751 752 753 754 755 756 #> [757] 757 758 759 760 761 762 763 764 765 766 767 768 769 770 #> [771] 771 772 773 774 775 776 777 778 779 780 781 782 783 784 #> [785] 785 786 787 788 789 790 791 792 793 794 795 796 797 798 #> [799] 799 800 801 802 803 804 805 806 807 808 809 810 811 812 #> [813] 813 814 815 816 817 818 819 820 821 822 823 824 825 826 #> [827] 827 828 829 830 831 832 833 834 835 836 837 838 839 840 #> [841] 841 842 843 844 845 846 847 848 849 850 851 852 853 854 #> [855] 855 856 857 858 859 860 861 862 863 864 865 866 867 868 #> [869] 869 870 871 872 873 874 875 876 877 878 879 880 881 882 #> [883] 883 884 885 886 887 888 889 890 891 892 893 894 895 896 #> [897] 897 898 899 900 901 902 903 904 905 906 907 908 909 910 #> [911] 911 912 913 914 915 916 917 918 919 920 921 922 923 924 #> [925] 925 926 927 928 929 930 931 932 933 934 935 936 937 938 #> [939] 939 940 941 942 943 944 945 946 947 948 949 950 951 952 #> [953] 953 954 955 956 957 958 959 960 961 962 963 964 965 966 #> [967] 967 968 969 970 971 972 973 974 975 976 977 978 979 980 #> [981] 981 982 983 984 985 986 987 988 989 990 991 992 993 994 #> [995] 995 996 997 998 999 1000 # Metadata g4 <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) %>% set_vertex_attr(\"color\", value = \"red\") V(g4)[[]] #> + 10/10 vertices, named, from 7fc774d: #> name color #> 1 A red #> 2 B red #> 3 C red #> 4 D red #> 5 E red #> 6 F red #> 7 G red #> 8 H red #> 9 I red #> 10 J red V(g4)[[2:5, 7:8]] #> + 6/10 vertices, named, from 7fc774d: #> name color #> 2 B red #> 3 C red #> 4 D red #> 5 E red #> 7 G red #> 8 H red"},{"path":"https://r.igraph.org/reference/print.igraphHRG.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a hierarchical random graph model to the screen — print.igraphHRG","title":"Print a hierarchical random graph model to the screen — print.igraphHRG","text":"igraphHRG objects can printed screen two forms: tree list, depending type argument print function. default auto type used, selects tree small graphs simple (=list) bigger ones. tree format looks like : graph 20 vertices, top three levels fitted hierarchical random graph printed. root node HRG always vertex group #1 (‘g1’ printout). Vertex pairs left subtree g1 connect vertices right subtree probability zero, according fitted model. g1 two subgroups, g15 g8. g15 subgroup single vertex (vertex 1), another larger subgroup contains vertices 6, 3, etc. lower levels, etc. plain printing simpler faster produce, less visual: lists two subgroups internal node, many columns screen width allows.","code":"Hierarchical random graph, at level 3: g1 p= 0 '- g15 p=0.33 1 '- g13 p=0.88 6 3 9 4 2 10 7 5 8 '- g8 p= 0.5 '- g16 p= 0.2 20 14 17 19 11 15 16 13 '- g5 p= 0 12 18 Hierarchical random graph: g1 p=0.0 -> g12 g10 g2 p=1.0 -> 7 10 g3 p=1.0 -> g18 14 g4 p=1.0 -> g17 15 g5 p=0.4 -> g15 17 g6 p=0.0 -> 1 4 g7 p=1.0 -> 11 16 g8 p=0.1 -> g9 3 g9 p=0.3 -> g11 g16 g10 p=0.2 -> g4 g5 g11 p=1.0 -> g6 5 g12 p=0.8 -> g8 8 g13 p=0.0 -> g14 9 g14 p=1.0 -> 2 6 g15 p=0.2 -> g19 18 g16 p=1.0 -> g13 g2 g17 p=0.5 -> g7 13 g18 p=1.0 -> 12 19 g19 p=0.7 -> g3 20"},{"path":"https://r.igraph.org/reference/print.igraphHRG.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a hierarchical random graph model to the screen — print.igraphHRG","text":"","code":"# S3 method for class 'igraphHRG' print(x, type = c(\"auto\", \"tree\", \"plain\"), level = 3, ...)"},{"path":"https://r.igraph.org/reference/print.igraphHRG.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a hierarchical random graph model to the screen — print.igraphHRG","text":"x igraphHRG object print. type print dendrogram, see details . level number top levels print dendrogram. ... Additional arguments, used currently.","code":""},{"path":"https://r.igraph.org/reference/print.igraphHRG.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print a hierarchical random graph model to the screen — print.igraphHRG","text":"hierarchical random graph model , invisibly.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/print.igraphHRGConsensus.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a hierarchical random graph consensus tree to the screen — print.igraphHRGConsensus","title":"Print a hierarchical random graph consensus tree to the screen — print.igraphHRGConsensus","text":"Consensus dendrograms (igraphHRGConsensus objects) printed simply listing children internal node dendrogram: root dendrogram g3 (incoming edges), two subgroups, g1 g2.","code":"HRG consensus tree: g1 -> 11 12 13 14 15 16 17 18 19 20 g2 -> 1 2 3 4 5 6 7 8 9 10 g3 -> g1 g2"},{"path":"https://r.igraph.org/reference/print.igraphHRGConsensus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a hierarchical random graph consensus tree to the screen — print.igraphHRGConsensus","text":"","code":"# S3 method for class 'igraphHRGConsensus' print(x, ...)"},{"path":"https://r.igraph.org/reference/print.igraphHRGConsensus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a hierarchical random graph consensus tree to the screen — print.igraphHRGConsensus","text":"x igraphHRGConsensus object print. ... Ignored.","code":""},{"path":"https://r.igraph.org/reference/print.igraphHRGConsensus.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print a hierarchical random graph consensus tree to the screen — print.igraphHRGConsensus","text":"input object, invisibly, allow method chaining.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/printer_callback.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a printer callback function — printer_callback","title":"Create a printer callback function — printer_callback","text":"printer callback function function can performs actual printing. number subcommands, called printer package, form See examples .","code":"printer_callback(\"subcommand\", argument1, argument2, ...)"},{"path":"https://r.igraph.org/reference/printer_callback.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a printer callback function — printer_callback","text":"","code":"printer_callback(fun)"},{"path":"https://r.igraph.org/reference/printer_callback.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a printer callback function — printer_callback","text":"fun function use printer callback function.","code":""},{"path":"https://r.igraph.org/reference/printer_callback.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a printer callback function — printer_callback","text":"subcommands: length length data print, number items, natural units. E.g. list objects, number objects. min_width TODO width Width one item, items printed. TODO print Argument: . actual printing, print items. done TODO","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/r_pal.html","id":null,"dir":"Reference","previous_headings":"","what":"The default R palette — r_pal","title":"The default R palette — r_pal","text":"default R palette, able reproduce colors older igraph versions. colors appropriate categories, attractive.","code":""},{"path":"https://r.igraph.org/reference/r_pal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The default R palette — r_pal","text":"","code":"r_pal(n)"},{"path":"https://r.igraph.org/reference/r_pal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The default R palette — r_pal","text":"n number colors use, maximum eight.","code":""},{"path":"https://r.igraph.org/reference/r_pal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The default R palette — r_pal","text":"character vector color names.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/radius.html","id":null,"dir":"Reference","previous_headings":"","what":"Radius of a graph — radius","title":"Radius of a graph — radius","text":"eccentricity vertex distance farthest node graph. smallest eccentricity graph called radius.","code":""},{"path":"https://r.igraph.org/reference/radius.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Radius of a graph — radius","text":"","code":"radius(graph, ..., weights = NULL, mode = c(\"all\", \"out\", \"in\", \"total\"))"},{"path":"https://r.igraph.org/reference/radius.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Radius of a graph — radius","text":"graph input graph, can directed undirected. ... dots future extensions must empty. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). weighted graph, length path sum weights constituent edges. mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, graph treated undirected, .e. edge directions taken account. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/radius.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Radius of a graph — radius","text":"numeric scalar, radius graph.","code":""},{"path":"https://r.igraph.org/reference/radius.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Radius of a graph — radius","text":"eccentricity vertex calculated measuring shortest distance () vertex, () vertices graph, taking maximum. implementation ignores vertex pairs different components. Isolated vertices eccentricity zero.","code":""},{"path":"https://r.igraph.org/reference/radius.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Radius of a graph — radius","text":"Harary, F. Graph Theory. Reading, MA: Addison-Wesley, p. 35, 1994.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/radius.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Radius of a graph — radius","text":"igraph_radius_dijkstra().","code":""},{"path":"https://r.igraph.org/reference/radius.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Radius of a graph — radius","text":"","code":"g <- make_star(10, mode = \"undirected\") eccentricity(g) #> [1] 1 2 2 2 2 2 2 2 2 2 radius(g) #> [1] 1"},{"path":"https://r.igraph.org/reference/random_walk.html","id":null,"dir":"Reference","previous_headings":"","what":"Random walk on a graph — random_walk","title":"Random walk on a graph — random_walk","text":"random_walk() performs random walk graph returns vertices random walk passed . random_edge_walk() returns edges random walk passed .","code":""},{"path":"https://r.igraph.org/reference/random_walk.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random walk on a graph — random_walk","text":"","code":"random_walk( graph, start, steps, weights = NULL, mode = c(\"out\", \"in\", \"all\", \"total\"), stuck = c(\"return\", \"error\") ) random_edge_walk( graph, start, steps, weights = NULL, mode = c(\"out\", \"in\", \"all\", \"total\"), stuck = c(\"return\", \"error\") )"},{"path":"https://r.igraph.org/reference/random_walk.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random walk on a graph — random_walk","text":"graph input graph, might undirected directed. start start vertex. steps number steps make. weights edge weights. Larger edge weights increase probability edge selected random walker. words, larger edge weights correspond stronger connections. ‘weight’ edge attribute used present. Supply ‘NA’ want ignore ‘weight’ edge attribute. mode follow directed edges. \"\" steps along edge direction, \"\" opposite . \"\" ignores edge directions. argument ignored undirected graphs. stuck random walk gets stuck. \"return\" returns partial walk, \"error\" raises error.","code":""},{"path":"https://r.igraph.org/reference/random_walk.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Random walk on a graph — random_walk","text":"random_walk(), vertex sequence length steps + 1 containing vertices along walk, starting start. random_edge_walk(), edge sequence length steps containing edges along walk.","code":""},{"path":"https://r.igraph.org/reference/random_walk.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Random walk on a graph — random_walk","text":"random walk. given start vertex, take given number steps, choosing edge actual vertex uniformly randomly. Edge directions observed directed graphs (see mode argument well). Multiple loop edges also observed. igraph < 1.6.0, random_walk() counted steps differently, returned sequence length steps instead steps + 1. changed improve consistency underlying C library.","code":""},{"path":"https://r.igraph.org/reference/random_walk.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Random walk on a graph — random_walk","text":"igraph_random_walk().","code":""},{"path":"https://r.igraph.org/reference/random_walk.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Random walk on a graph — random_walk","text":"","code":"## Stationary distribution of a Markov chain g <- make_ring(10, directed = TRUE) %u% make_star(11, center = 11) + edge(11, 1) ec <- eigen_centrality(g, directed = TRUE)$vector pg <- page_rank(g, damping = 0.999)$vector w <- random_walk(g, start = 1, steps = 10000) ## These are similar, but not exactly the same cor(table(w), ec) #> [1] 0.962012 ## But these are (almost) the same cor(table(w), pg) #> [1] 0.9999092"},{"path":"https://r.igraph.org/reference/read.graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Reading foreign file formats — read.graph","title":"Reading foreign file formats — read.graph","text":"read.graph() renamed read_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/read.graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reading foreign file formats — read.graph","text":"","code":"read.graph( file, format = c(\"edgelist\", \"pajek\", \"ncol\", \"lgl\", \"graphml\", \"dimacs\", \"graphdb\", \"gml\", \"dl\"), ... )"},{"path":"https://r.igraph.org/reference/read.graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reading foreign file formats — read.graph","text":"file connection read . can local file, http ftp connection. can also character string file name URI. format Character constant giving file format. Right now edgelist, pajek, ncol, lgl, graphml, dimacs, graphdb, gml dl supported, default edgelist. igraph 0.4 argument case insensitive. ... Additional arguments, see .","code":""},{"path":"https://r.igraph.org/reference/read_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Reading foreign file formats — read_graph","title":"Reading foreign file formats — read_graph","text":"read_graph() function able read graphs various representations file, http connection. Various formats supported.","code":""},{"path":"https://r.igraph.org/reference/read_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reading foreign file formats — read_graph","text":"","code":"read_graph( file, format = c(\"edgelist\", \"pajek\", \"ncol\", \"lgl\", \"graphml\", \"dimacs\", \"graphdb\", \"gml\", \"dl\"), ... )"},{"path":"https://r.igraph.org/reference/read_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reading foreign file formats — read_graph","text":"file connection read . can local file, http ftp connection. can also character string file name URI. format Character constant giving file format. Right now edgelist, pajek, ncol, lgl, graphml, dimacs, graphdb, gml dl supported, default edgelist. igraph 0.4 argument case insensitive. ... Additional arguments, see .","code":""},{"path":"https://r.igraph.org/reference/read_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reading foreign file formats — read_graph","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/read_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reading foreign file formats — read_graph","text":"read_graph() function may additional arguments depending file format (format argument). See details separately file format, .","code":""},{"path":"https://r.igraph.org/reference/read_graph.html","id":"edge-list-format","dir":"Reference","previous_headings":"","what":"Edge list format","title":"Reading foreign file formats — read_graph","text":"format simple text file numeric vertex IDs defining edges. need newline characters edges, simple space also . Vertex IDs contained file assumed start zero. Additional arguments: n number vertices graph. smaller equal largest integer file, ignored; safe set zero (default). directed Logical scalar, whether create directed graph. default value TRUE.","code":""},{"path":"https://r.igraph.org/reference/read_graph.html","id":"pajek-format","dir":"Reference","previous_headings":"","what":"Pajek format","title":"Reading foreign file formats — read_graph","text":"Currently igraph supports Pajek network files, .net extension, Pajek project files .paj extension. network data supported; permutations, hierarchies, clusters vectors .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/read_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Reading foreign file formats — read_graph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/realize_bipartite_degseq.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","title":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","text":"Constructs bipartite graph degree sequences partitions, one exists. function uses Havel-Hakimi style construction algorithm.","code":""},{"path":"https://r.igraph.org/reference/realize_bipartite_degseq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","text":"","code":"realize_bipartite_degseq( degrees1, degrees2, ..., allowed.edge.types = c(\"simple\", \"multiple\"), method = c(\"smallest\", \"largest\", \"index\") )"},{"path":"https://r.igraph.org/reference/realize_bipartite_degseq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","text":"degrees1 degrees first partition. degrees2 degrees second partition. ... dots future extensions must empty. allowed.edge.types Character, specifies types allowed edges. “simple” allows simple graphs (multiple edges). “multiple” allows multiple edges. method Character, method generating graph; see .","code":""},{"path":"https://r.igraph.org/reference/realize_bipartite_degseq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/realize_bipartite_degseq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","text":"‘method’ argument controls order vertices selected course algorithm. “smallest” method selects vertex smallest remaining degree, either partition. result usually graph high negative degree assortativity. undirected case, method guaranteed generate connected graph, regardless whether multi-edges allowed, provided connected realization exists. default method. “largest” method selects vertex largest remaining degree. result usually graph high positive degree assortativity, often disconnected. “index” method selects vertices order index.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/realize_bipartite_degseq.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","text":"igraph_realize_bipartite_degree_sequence().","code":""},{"path":"https://r.igraph.org/reference/realize_bipartite_degseq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","text":"","code":"g <- realize_bipartite_degseq(c(3, 3, 2, 1, 1), c(2, 2, 2, 2, 2)) degree(g) #> [1] 3 3 2 1 1 2 2 2 2 2"},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating a graph from a given degree sequence, deterministically — realize_degseq","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":"often useful create graph given vertex degrees. function creates graph deterministic manner.","code":""},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":"","code":"realize_degseq( out.deg, in.deg = NULL, allowed.edge.types = c(\"simple\", \"loops\", \"multi\", \"all\"), method = c(\"smallest\", \"largest\", \"index\") )"},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":".deg Numeric vector, sequence degrees (undirected graphs) -degrees (directed graphs). undirected graphs sum even. directed graphs sum sum .deg. .deg directed graph, -degree sequence. default NULL undirected graph created. allowed.edge.types Character, specifies types allowed edges. “simple” allows simple graphs (loops, multiple edges). “multiple” allows multiple edges disallows loop. “loops” allows loop edges disallows multiple edges (currently unimplemented). “” allows types edges. default “simple”. method Character, method generating graph; see .","code":""},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":"Simple undirected graphs constructed using Havel-Hakimi algorithm (undirected case), analogous Kleitman-Wang algorithm (directed case). algorithms work choosing arbitrary vertex connecting stubs vertices. step repeated degrees connected . ‘method’ argument controls order vertices selected course algorithm. “smallest” method selects vertex smallest remaining degree. result usually graph high negative degree assortativity. undirected case, method guaranteed generate connected graph, regardless whether multi-edges allowed, provided connected realization exists. See Horvát Modes (2021) details. directed case tends generate weakly connected graphs, guaranteed. default method. “largest” method selects vertex largest remaining degree. result usually graph high positive degree assortativity, often disconnected. “index” method selects vertices order index.","code":""},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":"V. Havel, Poznámka o existenci konečných grafů (remark existence finite graphs), Časopis pro pěstování matematiky 80, 477-480 (1955). https://eudml.org/doc/19050 S. L. Hakimi, Realizability Set Integers Degrees Vertices Linear Graph, Journal SIAM 10, 3 (1962). doi:10.1137/0111010 D. J. Kleitman D. L. Wang, Algorithms Constructing Graphs Digraphs Given Valences Factors, Discrete Mathematics 6, 1 (1973). doi:10.1016/0012-365X(73)90037-X Sz. Horvát C. D. Modes, Connectedness matters: construction exact random sampling connected networks (2021). doi:10.1088/2632-072X/abced5","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":"igraph_realize_degree_sequence().","code":""},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":"","code":"g <- realize_degseq(rep(2, 100)) degree(g) #> [1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 #> [38] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 #> [75] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 is_simple(g) #> [1] TRUE ## Exponential degree distribution, with high positive assortativity. ## Loop and multiple edges are explicitly allowed. ## Note that we correct the degree sequence if its sum is odd. degs <- sample(1:100, 100, replace = TRUE, prob = exp(-0.5 * (1:100))) if (sum(degs) %% 2 != 0) { degs[1] <- degs[1] + 1 } g4 <- realize_degseq(degs, method = \"largest\", allowed.edge.types = \"all\") all(degree(g4) == degs) #> [1] TRUE ## Power-law degree distribution, no loops allowed but multiple edges ## are okay. ## Note that we correct the degree sequence if its sum is odd. degs <- sample(1:100, 100, replace = TRUE, prob = (1:100)^-2) if (sum(degs) %% 2 != 0) { degs[1] <- degs[1] + 1 } g5 <- realize_degseq(degs, allowed.edge.types = \"multi\") all(degree(g5) == degs) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/reciprocity.html","id":null,"dir":"Reference","previous_headings":"","what":"Reciprocity of graphs — reciprocity","title":"Reciprocity of graphs — reciprocity","text":"Calculates reciprocity directed graph.","code":""},{"path":"https://r.igraph.org/reference/reciprocity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reciprocity of graphs — reciprocity","text":"","code":"reciprocity(graph, ignore.loops = TRUE, mode = c(\"default\", \"ratio\"))"},{"path":"https://r.igraph.org/reference/reciprocity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reciprocity of graphs — reciprocity","text":"graph graph object. ignore.loops Logical constant, whether ignore loop edges. mode See .","code":""},{"path":"https://r.igraph.org/reference/reciprocity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reciprocity of graphs — reciprocity","text":"numeric scalar zero one.","code":""},{"path":"https://r.igraph.org/reference/reciprocity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reciprocity of graphs — reciprocity","text":"measure reciprocity defines proportion mutual connections, directed graph. commonly defined probability opposite counterpart directed edge also included graph. adjacency matrix notation: \\(1 - \\left(\\sum_{,j} |A_{ij} - A_{ji}|\\right) / \\left(2\\sum_{,j} A_{ij}\\right)\\). measure calculated mode argument default. Prior igraph version 0.6, another measure implemented, defined probability mutual connection vertex pair, know (possibly non-mutual) connection . words, (unordered) vertex pairs classified three groups: (1) -connected, (2) non-reciprocally connected, (3) reciprocally connected. result size group (3), divided sum group sizes (2)+(3). measure calculated mode ratio.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/reciprocity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Reciprocity of graphs — reciprocity","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/reciprocity.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Reciprocity of graphs — reciprocity","text":"igraph_reciprocity().","code":""},{"path":"https://r.igraph.org/reference/reciprocity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reciprocity of graphs — reciprocity","text":"","code":"g <- sample_gnp(20, 5 / 20, directed = TRUE) reciprocity(g) #> [1] 0.1980198"},{"path":"https://r.igraph.org/reference/remove.edge.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete an edge attribute — remove.edge.attribute","title":"Delete an edge attribute — remove.edge.attribute","text":"remove.edge.attribute() renamed delete_edge_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/remove.edge.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete an edge attribute — remove.edge.attribute","text":"","code":"remove.edge.attribute(graph, name)"},{"path":"https://r.igraph.org/reference/remove.edge.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete an edge attribute — remove.edge.attribute","text":"graph graph name name edge attribute delete.","code":""},{"path":"https://r.igraph.org/reference/remove.graph.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete a graph attribute — remove.graph.attribute","title":"Delete a graph attribute — remove.graph.attribute","text":"remove.graph.attribute() renamed delete_graph_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/remove.graph.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete a graph attribute — remove.graph.attribute","text":"","code":"remove.graph.attribute(graph, name)"},{"path":"https://r.igraph.org/reference/remove.graph.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete a graph attribute — remove.graph.attribute","text":"graph graph. name Name attribute delete.","code":""},{"path":"https://r.igraph.org/reference/remove.vertex.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete a vertex attribute — remove.vertex.attribute","title":"Delete a vertex attribute — remove.vertex.attribute","text":"remove.vertex.attribute() renamed delete_vertex_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/remove.vertex.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete a vertex attribute — remove.vertex.attribute","text":"","code":"remove.vertex.attribute(graph, name)"},{"path":"https://r.igraph.org/reference/remove.vertex.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete a vertex attribute — remove.vertex.attribute","text":"graph graph name name vertex attribute delete.","code":""},{"path":"https://r.igraph.org/reference/rep.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Replicate a graph multiple times — rep.igraph","title":"Replicate a graph multiple times — rep.igraph","text":"new graph contain input graph given number times, unconnected components.","code":""},{"path":"https://r.igraph.org/reference/rep.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replicate a graph multiple times — rep.igraph","text":"","code":"# S3 method for class 'igraph' rep(x, n, mark = TRUE, ...) # S3 method for class 'igraph' x * n"},{"path":"https://r.igraph.org/reference/rep.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replicate a graph multiple times — rep.igraph","text":"x input graph. n Number times replicate . mark Whether mark vertices attribute, integer number denoting replication vertex coming . ... Additional arguments satisfy S3 requirements, currently ignored.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/rep.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Replicate a graph multiple times — rep.igraph","text":"","code":"rings <- make_ring(5) * 5"},{"path":"https://r.igraph.org/reference/rev.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Reverse the order in an edge sequence — rev.igraph.es","title":"Reverse the order in an edge sequence — rev.igraph.es","text":"Reverse order edge sequence","code":""},{"path":"https://r.igraph.org/reference/rev.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reverse the order in an edge sequence — rev.igraph.es","text":"","code":"# S3 method for class 'igraph.es' rev(x)"},{"path":"https://r.igraph.org/reference/rev.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reverse the order in an edge sequence — rev.igraph.es","text":"x edge sequence reverse.","code":""},{"path":"https://r.igraph.org/reference/rev.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reverse the order in an edge sequence — rev.igraph.es","text":"reversed edge sequence.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/rev.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reverse the order in an edge sequence — rev.igraph.es","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) E(g) #> + 10/10 edges from 6db4b72 (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J E(g) %>% rev() #> + 10/10 edges from 6db4b72 (vertex names): #> [1] A--J I--J H--I G--H F--G E--F D--E C--D B--C A--B"},{"path":"https://r.igraph.org/reference/rev.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Reverse the order in a vertex sequence — rev.igraph.vs","title":"Reverse the order in a vertex sequence — rev.igraph.vs","text":"Reverse order vertex sequence","code":""},{"path":"https://r.igraph.org/reference/rev.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reverse the order in a vertex sequence — rev.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' rev(x)"},{"path":"https://r.igraph.org/reference/rev.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reverse the order in a vertex sequence — rev.igraph.vs","text":"x vertex sequence reverse.","code":""},{"path":"https://r.igraph.org/reference/rev.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reverse the order in a vertex sequence — rev.igraph.vs","text":"reversed vertex sequence.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/rev.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reverse the order in a vertex sequence — rev.igraph.vs","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) V(g) %>% rev() #> + 10/10 vertices, named, from bf2b4ae: #> [1] J I H G F E D C B A"},{"path":"https://r.igraph.org/reference/reverse_edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Reverse edges in a graph — reverse_edges","title":"Reverse edges in a graph — reverse_edges","text":"new graph contain vertices, edges attributes original graph, except direction edges selected edge IDs eids argument reversed. reversing edges, operation also known graph transpose.","code":""},{"path":"https://r.igraph.org/reference/reverse_edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reverse edges in a graph — reverse_edges","text":"","code":"reverse_edges(graph, eids = E(graph)) # S3 method for class 'igraph' t(x)"},{"path":"https://r.igraph.org/reference/reverse_edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reverse edges in a graph — reverse_edges","text":"graph input graph. eids edge IDs edges reverse. x input graph.","code":""},{"path":"https://r.igraph.org/reference/reverse_edges.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reverse edges in a graph — reverse_edges","text":"result graph direction edges given IDs reversed","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/reverse_edges.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Reverse edges in a graph — reverse_edges","text":"igraph_reverse_edges().","code":""},{"path":"https://r.igraph.org/reference/reverse_edges.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reverse edges in a graph — reverse_edges","text":"","code":"g <- make_graph(~ 1 -+ 2, 2 -+ 3, 3 -+ 4) reverse_edges(g, 2) #> IGRAPH 7a07c7b DN-- 4 3 -- #> + attr: name (v/c) #> + edges from 7a07c7b (vertex names): #> [1] 1->2 3->2 3->4"},{"path":"https://r.igraph.org/reference/rewire.html","id":null,"dir":"Reference","previous_headings":"","what":"Rewiring edges of a graph — rewire","title":"Rewiring edges of a graph — rewire","text":"See links implemented rewiring methods.","code":""},{"path":"https://r.igraph.org/reference/rewire.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rewiring edges of a graph — rewire","text":"","code":"rewire(graph, with)"},{"path":"https://r.igraph.org/reference/rewire.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rewiring edges of a graph — rewire","text":"graph graph rewire function call one rewiring methods, see details .","code":""},{"path":"https://r.igraph.org/reference/rewire.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rewiring edges of a graph — rewire","text":"rewired graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/rewire.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rewiring edges of a graph — rewire","text":"","code":"g <- make_ring(10) g %>% rewire(each_edge(p = .1, loops = FALSE)) %>% plot(layout = layout_in_circle) print_all(rewire(g, with = keeping_degseq(niter = vcount(g) * 10))) #> IGRAPH 5ab8744 U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + graph attributes: #> | + name: #> | [1] \"Ring graph\" #> | + mutual: #> | [1] FALSE #> | + circular: #> | [1] TRUE #> + edges from 5ab8744: #> [1] 6-- 8 2-- 6 7--10 3-- 7 4-- 8 1-- 5 2-- 9 3-- 9 1-- 4 5--10"},{"path":"https://r.igraph.org/reference/rglplot.html","id":null,"dir":"Reference","previous_headings":"","what":"3D plotting of graphs with OpenGL — rglplot","title":"3D plotting of graphs with OpenGL — rglplot","text":"Using rgl package, rglplot() plots graph 3D. plot can zoomed, rotated, shifted, etc. coordinates vertices fixed.","code":""},{"path":"https://r.igraph.org/reference/rglplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"3D plotting of graphs with OpenGL — rglplot","text":"","code":"rglplot(x, ...)"},{"path":"https://r.igraph.org/reference/rglplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"3D plotting of graphs with OpenGL — rglplot","text":"x graph plot. ... Additional arguments, see igraph.plotting details","code":""},{"path":"https://r.igraph.org/reference/rglplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"3D plotting of graphs with OpenGL — rglplot","text":"NULL, invisibly.","code":""},{"path":"https://r.igraph.org/reference/rglplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"3D plotting of graphs with OpenGL — rglplot","text":"Note rglplot() considered highly experimental. useful either. See igraph.plotting possible arguments.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/rglplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"3D plotting of graphs with OpenGL — rglplot","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/rglplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"3D plotting of graphs with OpenGL — rglplot","text":"","code":"g <- make_lattice(c(5, 5, 5)) coords <- layout_with_fr(g, dim = 3) if (interactive() && requireNamespace(\"rgl\", quietly = TRUE)) { rglplot(g, layout = coords) }"},{"path":"https://r.igraph.org/reference/running.mean.html","id":null,"dir":"Reference","previous_headings":"","what":"Running mean of a time series — running.mean","title":"Running mean of a time series — running.mean","text":"running.mean() renamed running_mean() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/running.mean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Running mean of a time series — running.mean","text":"","code":"running.mean(v, binwidth)"},{"path":"https://r.igraph.org/reference/running.mean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Running mean of a time series — running.mean","text":"v numeric vector. binwidth Numeric constant, size bin, meaningful, .e. smaller length v.","code":""},{"path":"https://r.igraph.org/reference/running_mean.html","id":null,"dir":"Reference","previous_headings":"","what":"Running mean of a time series — running_mean","title":"Running mean of a time series — running_mean","text":"running_mean() calculates running mean vector given bin width.","code":""},{"path":"https://r.igraph.org/reference/running_mean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Running mean of a time series — running_mean","text":"","code":"running_mean(v, binwidth)"},{"path":"https://r.igraph.org/reference/running_mean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Running mean of a time series — running_mean","text":"v numeric vector. binwidth Numeric constant, size bin, meaningful, .e. smaller length v.","code":""},{"path":"https://r.igraph.org/reference/running_mean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Running mean of a time series — running_mean","text":"numeric vector length length(v)-binwidth+1","code":""},{"path":"https://r.igraph.org/reference/running_mean.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Running mean of a time series — running_mean","text":"running mean v w vector length length(v)-binwidth+1. first element w id average first binwidth elements v, second element w average elements 2:(binwidth+1), etc.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/running_mean.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Running mean of a time series — running_mean","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/running_mean.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Running mean of a time series — running_mean","text":"","code":"running_mean(1:100, 10) #> [1] 5.5 6.5 7.5 8.5 9.5 10.5 11.5 12.5 13.5 14.5 15.5 16.5 17.5 18.5 19.5 #> [16] 20.5 21.5 22.5 23.5 24.5 25.5 26.5 27.5 28.5 29.5 30.5 31.5 32.5 33.5 34.5 #> [31] 35.5 36.5 37.5 38.5 39.5 40.5 41.5 42.5 43.5 44.5 45.5 46.5 47.5 48.5 49.5 #> [46] 50.5 51.5 52.5 53.5 54.5 55.5 56.5 57.5 58.5 59.5 60.5 61.5 62.5 63.5 64.5 #> [61] 65.5 66.5 67.5 68.5 69.5 70.5 71.5 72.5 73.5 74.5 75.5 76.5 77.5 78.5 79.5 #> [76] 80.5 81.5 82.5 83.5 84.5 85.5 86.5 87.5 88.5 89.5 90.5 91.5 92.5 93.5 94.5 #> [91] 95.5"},{"path":"https://r.igraph.org/reference/sample_.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample from a random graph model — sample_","title":"Sample from a random graph model — sample_","text":"Generic function sampling network models.","code":""},{"path":"https://r.igraph.org/reference/sample_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample from a random graph model — sample_","text":"","code":"sample_(...)"},{"path":"https://r.igraph.org/reference/sample_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample from a random graph model — sample_","text":"... Parameters, see details .","code":""},{"path":"https://r.igraph.org/reference/sample_.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample from a random graph model — sample_","text":"sample_() generic function creating graphs. every graph constructor igraph sample_ prefix, corresponding function without prefix: e.g. sample_pa() also pa(), etc. true deterministic graph samplers, .e. constructor make_ prefix, corresponding function without prefix. shorter forms can used together sample_(). advantage form user can specify constructor modifiers work constructors. E.g. with_vertex_() modifier adds vertex attributes newly created graphs. See examples various constructor modifiers .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample from a random graph model — sample_","text":"","code":"pref_matrix <- cbind(c(0.8, 0.1), c(0.1, 0.7)) blocky <- sample_(sbm( n = 20, pref.matrix = pref_matrix, block.sizes = c(10, 10) )) blocky2 <- pref_matrix %>% sample_sbm(n = 20, block.sizes = c(10, 10)) ## Arguments are passed on from sample_ to sample_sbm blocky3 <- pref_matrix %>% sample_(sbm(), n = 20, block.sizes = c(10, 10))"},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":null,"dir":"Reference","previous_headings":"","what":"Bipartite random graphs — sample_bipartite","title":"Bipartite random graphs — sample_bipartite","text":"Generate bipartite graphs using Erdős-Rényi model","code":""},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bipartite random graphs — sample_bipartite","text":"","code":"sample_bipartite( n1, n2, type = c(\"gnp\", \"gnm\"), p, m, directed = FALSE, mode = c(\"out\", \"in\", \"all\") ) bipartite(...)"},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bipartite random graphs — sample_bipartite","text":"n1 Integer scalar, number bottom vertices. n2 Integer scalar, number top vertices. type Character scalar, type graph, ‘gnp’ creates \\(G(n,p)\\) graph, ‘gnm’ creates \\(G(n,m)\\) graph. See details . p Real scalar, connection probability \\(G(n,p)\\) graphs. given \\(G(n,m)\\) graphs. m Integer scalar, number edges \\(G(n,m)\\) graphs. given \\(G(n,p)\\) graphs. directed Logical scalar, whether create directed graph. See also mode argument. mode Character scalar, specifies direct edges directed graphs. ‘’, directed edges point bottom vertices top vertices. ‘’, edges point top vertices bottom vertices. ‘’ ‘’ generate mutual edges. argument ‘’, edge direction considered independently mutual edges might generated. argument ignored undirected graphs. ... Passed sample_bipartite().","code":""},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bipartite random graphs — sample_bipartite","text":"bipartite igraph graph.","code":""},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Bipartite random graphs — sample_bipartite","text":"Similarly unipartite (one-mode) networks, can define \\(G(n,p)\\), \\(G(n,m)\\) graph classes bipartite graphs, via generating process. \\(G(n,p)\\) every possible edge top bottom vertices realized probability \\(p\\), independently rest edges. \\(G(n,m)\\), uniformly choose \\(m\\) edges realize.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Bipartite random graphs — sample_bipartite","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bipartite random graphs — sample_bipartite","text":"","code":"## empty graph sample_bipartite(10, 5, p = 0) #> IGRAPH e10d31a U--B 15 0 -- Bipartite Gnp random graph #> + attr: name (g/c), p (g/n), type (v/l) #> + edges from e10d31a: ## full graph sample_bipartite(10, 5, p = 1) #> IGRAPH 1a9e493 U--B 15 50 -- Bipartite Gnp random graph #> + attr: name (g/c), p (g/n), type (v/l) #> + edges from 1a9e493: #> [1] 1--11 1--12 1--13 1--14 1--15 2--11 2--12 2--13 2--14 2--15 #> [11] 3--11 3--12 3--13 3--14 3--15 4--11 4--12 4--13 4--14 4--15 #> [21] 5--11 5--12 5--13 5--14 5--15 6--11 6--12 6--13 6--14 6--15 #> [31] 7--11 7--12 7--13 7--14 7--15 8--11 8--12 8--13 8--14 8--15 #> [41] 9--11 9--12 9--13 9--14 9--15 10--11 10--12 10--13 10--14 10--15 ## random bipartite graph sample_bipartite(10, 5, p = .1) #> IGRAPH 407334c U--B 15 5 -- Bipartite Gnp random graph #> + attr: name (g/c), p (g/n), type (v/l) #> + edges from 407334c: #> [1] 7--11 4--12 8--12 5--13 7--15 ## directed bipartite graph, G(n,m) sample_bipartite(10, 5, type = \"Gnm\", m = 20, directed = TRUE, mode = \"all\") #> IGRAPH edf1f11 D--B 15 20 -- Bipartite Gnm random graph #> + attr: name (g/c), m (g/n), type (v/l) #> + edges from edf1f11: #> [1] 5->11 6->11 7->11 9->11 4->12 5->12 8->12 4->13 9->14 8->15 #> [11] 11-> 2 13-> 2 15-> 2 13-> 3 13-> 5 12-> 6 15-> 6 14-> 8 14->10 15->10"},{"path":"https://r.igraph.org/reference/sample_chung_lu.html","id":null,"dir":"Reference","previous_headings":"","what":"Random graph with given expected degrees — sample_chung_lu","title":"Random graph with given expected degrees — sample_chung_lu","text":"Chung-Lu model useful generating random graphs fixed expected degrees. function implements original model Chung Lu, well additional variants useful properties.","code":""},{"path":"https://r.igraph.org/reference/sample_chung_lu.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random graph with given expected degrees — sample_chung_lu","text":"","code":"sample_chung_lu( out.weights, in.weights = NULL, ..., loops = TRUE, variant = c(\"original\", \"maxent\", \"nr\") ) chung_lu( out.weights, in.weights = NULL, ..., loops = TRUE, variant = c(\"original\", \"maxent\", \"nr\") )"},{"path":"https://r.igraph.org/reference/sample_chung_lu.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random graph with given expected degrees — sample_chung_lu","text":".weights vector non-negative vertex weights (-weights). sparse graphs, approximately equal expected (-)degrees. .weights vector non-negative -weights, approximately equal expected -degrees sparse graphs. May set NULL, case undirected graphs generated. ... dots future extensions must empty. loops Logical, whether allow creation self-loops. Since vertex pairs connected independently, setting FALSE equivalent simply discarding self-loops existing loopy Chung-Lu graph. variant model variant sample , different definitions connection probability vertices \\(\\) \\(j\\). Given \\(q_{ij} = \\frac{w_i w_j}{S}\\), following formulations available: “original” original Chung-Lu model, \\(p_{ij} = \\min(q_{ij}, 1)\\). “maxent” maximum entropy model fixed expected degrees, \\(p_{ij} = \\frac{q_{ij}}{1 + q_{ij}}\\). “nr” Norros Reittu's model, \\(p_{ij} = 1 - \\exp(-q_{ij})\\).","code":""},{"path":"https://r.igraph.org/reference/sample_chung_lu.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Random graph with given expected degrees — sample_chung_lu","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/sample_chung_lu.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Random graph with given expected degrees — sample_chung_lu","text":"original Chung-Lu model, pair vertices \\(\\) \\(j\\) connected independent probability $$p_{ij} = \\frac{w_i w_j}{S},$$ \\(w_i\\) weight associated vertex \\(\\) $$S = \\sum_k w_k$$ sum weights. directed variant, vertices -weights, \\(w^\\text{}\\), -weights, \\(w^\\text{}\\), equal sums, $$S = \\sum_k w^\\text{}_k = \\sum_k w^\\text{}_k.$$ connection probability \\(\\) \\(j\\) $$p_{ij} = \\frac{w^\\text{}_i w^\\text{}_j.}{S}$$ model commonly used create random graphs fixed expected degree sequence. expected degree vertex \\(\\) approximately equal weight \\(w_i\\). Specifically, graph directed self-loops allowed, expected - -degrees precisely \\(w^\\text{}\\) \\(w^\\text{}\\). self-loops disallowed, expected - -degrees \\(\\frac{w^\\text{} (S - w^\\text{})}{S}\\) \\(\\frac{w^\\text{} (S - w^\\text{})}{S}\\), respectively. graph undirected, expected degrees without self-loops \\(\\frac{w (S + w)}{S}\\) \\(\\frac{w (S - w)}{S}\\), respectively. limitation original Chung-Lu model weights large, formula \\(p_{ij}\\) yields values larger 1. Chung Lu's original paper excludes use weights. \\(p_{ij} > 1\\), function simply issues warning creates connection \\(\\) \\(j\\). However, case expected degrees longer relate weights manner stated . Thus, original Chung-Lu model produce certain (large) expected degrees. overcome limitation, function implements additional variants model, modified expressions connection probability \\(p_{ij}\\) vertices \\(\\) \\(j\\). Let \\(q_{ij} = \\frac{w_i w_j}{S}\\), \\(q_{ij} = \\frac{w^\\text{}_i w^\\text{}_j}{S}\\) directed case. model variants become equivalent limit sparse graphs \\(q_{ij}\\) approaches zero. original Chung-Lu model, selectable setting variant “original”, \\(p_{ij} = \\min(q_{ij}, 1)\\). “maxent” variant, sometimes referred generalized random graph, uses \\(p_{ij} = \\frac{q_{ij}}{1 + q_{ij}}\\), equivalent maximum entropy model (.e., exponential random graph model) constraint expected degrees; see Park Newman (2004), Section B, setting \\(\\exp(-\\Theta_{ij}) = \\frac{w_i w_j}{S}\\). model also discussed Britton, Deijfen, Martin-Löf (2006). virtue degree-constrained maximum entropy model, generates graphs degree sequence probability. third variant can requested “nr”, uses \\(p_{ij} = 1 - \\exp(-q_{ij})\\). underlying simple graph multigraph model introduced Norros Reittu (2006). discussion three model variants, see Section 16.4 Bollobás, Janson, Riordan (2007), well Van Der Hofstad (2013).","code":""},{"path":"https://r.igraph.org/reference/sample_chung_lu.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Random graph with given expected degrees — sample_chung_lu","text":"Chung, F., Lu, L. (2002). Connected components random graph given degree sequences. Annals Combinatorics, 6, 125-145. doi:10.1007/PL00012580 Miller, J. C., Hagberg, . (2011). Efficient Generation Networks Given Expected Degrees. doi:10.1007/978-3-642-21286-4_10 Park, J., Newman, M. E. J. (2004). Statistical mechanics networks. Physical Review E, 70, 066117. doi:10.1103/PhysRevE.70.066117 Britton, T., Deijfen, M., Martin-Löf, . (2006). Generating Simple Random Graphs Prescribed Degree Distribution. Journal Statistical Physics, 124, 1377-1397. doi:10.1007/s10955-006-9168-x Norros, ., Reittu, H. (2006). conditionally Poissonian graph process. Advances Applied Probability, 38, 59-75. doi:10.1239/aap/1143936140 Bollobás, B., Janson, S., Riordan, O. (2007). phase transition inhomogeneous random graphs. Random Structures & Algorithms, 31, 3-122. doi:10.1002/rsa.20168 Van Der Hofstad, R. (2013). Critical behavior inhomogeneous random graphs. Random Structures & Algorithms, 42, 480-508. doi:10.1002/rsa.20450","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_chung_lu.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Random graph with given expected degrees — sample_chung_lu","text":"igraph_chung_lu_game().","code":""},{"path":"https://r.igraph.org/reference/sample_chung_lu.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Random graph with given expected degrees — sample_chung_lu","text":"","code":"g <- sample_chung_lu(c(3, 3, 2, 2, 2, 1, 1)) rowMeans(replicate( 100, degree(sample_chung_lu(c(1, 3, 2, 1), c(2, 1, 2, 2)), mode = \"out\") )) #> [1] 1.17 2.94 1.96 0.89 rowMeans(replicate( 100, degree(sample_chung_lu(c(1, 3, 2, 1), c(2, 1, 2, 2), variant = \"maxent\"), mode='out') )) #> [1] 0.90 1.71 1.32 0.84"},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"Sample new graph perturbing adjacency matrix given graph shuffling vertices.","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"","code":"sample_correlated_gnp( old.graph, corr, p = edge_density(old.graph), permutation = NULL )"},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"old.graph original graph. corr scalar unit interval, target Pearson correlation adjacency matrices original generated graph (adjacency matrix used vector). p numeric scalar, probability edge two vertices, must open (0,1) interval. default empirical edge density graph. resampling Erdős-Rényi graph know original edge probability Erdős-Rényi model, supply explicitly. permutation numeric vector, permutation vector applied vertices first graph, get second graph. NULL, vertices permuted.","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"unweighted graph size old.graph correlation coefficient entries two adjacency matrices corr. Note pair corresponding matrix entries pair correlated Bernoulli random variables.","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"Please see reference given .","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"Lyzinski, V., Fishkind, D. E., Priebe, C. E. (2013). Seeded graph matching correlated Erdős-Rényi graphs. https://arxiv.org/abs/1304.7844","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"igraph_correlated_game().","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"","code":"g <- sample_gnp(1000, .1) g2 <- sample_correlated_gnp(g, corr = 0.5) cor(as.vector(g[]), as.vector(g2[])) #> [1] 0.5009943 g #> IGRAPH c91e1bb U--- 1000 50009 -- Erdos-Renyi (gnp) graph #> + attr: name (g/c), type (g/c), loops (g/l), p (g/n) #> + edges from c91e1bb: #> [1] 3-- 7 1-- 8 5-- 9 7-- 9 1--11 6--11 3--13 5--14 11--14 1--16 #> [11] 14--16 8--18 10--18 17--18 9--19 11--19 2--20 13--22 16--22 14--23 #> [21] 1--24 15--24 2--25 20--25 14--26 18--26 6--27 8--27 2--28 9--28 #> [31] 20--28 1--29 8--29 12--29 5--30 15--30 16--30 18--30 4--31 19--31 #> [41] 26--31 24--32 25--32 8--33 14--33 20--33 21--33 11--34 20--34 33--34 #> [51] 27--35 31--35 33--35 16--36 35--36 5--37 9--37 12--37 15--37 6--38 #> [61] 17--38 19--38 20--38 27--38 1--39 6--39 15--39 20--39 2--40 4--40 #> [71] 17--40 27--40 34--40 5--41 7--41 13--41 15--41 19--41 11--42 17--42 #> + ... omitted several edges g2 #> IGRAPH db88bc2 U--- 1000 49633 -- Correlated random graph #> + attr: name (g/c), corr (g/n), p (g/n) #> + edges from db88bc2: #> [1] 2-- 5 3-- 7 1-- 8 5-- 9 6--10 10--11 3--12 6--12 3--13 11--14 #> [11] 1--15 14--16 15--17 8--18 17--18 6--19 9--19 11--19 17--19 2--20 #> [21] 15--20 5--21 8--21 14--23 15--24 2--25 6--26 11--26 14--26 18--26 #> [31] 6--27 8--27 2--28 5--28 9--28 15--28 20--28 1--29 8--29 12--29 #> [41] 15--30 18--30 2--31 4--31 9--31 10--31 26--31 30--31 5--32 6--32 #> [51] 10--32 24--32 8--33 20--33 21--33 22--33 23--33 33--34 18--35 27--35 #> [61] 30--35 31--35 33--35 22--36 35--36 2--37 15--37 24--37 26--37 6--38 #> [71] 27--38 1--39 6--39 20--39 2--40 4--40 5--40 27--40 31--40 5--41 #> + ... omitted several edges"},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"Sample new graph perturbing adjacency matrix given graph shuffling vertices.","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"","code":"sample_correlated_gnp_pair(n, corr, p, directed = FALSE, permutation = NULL)"},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"n Numeric scalar, number vertices sampled graphs. corr scalar unit interval, target Pearson correlation adjacency matrices original generated graph (adjacency matrix used vector). p numeric scalar, probability edge two vertices, must open (0,1) interval. directed Logical scalar, whether generate directed graphs. permutation numeric vector, permutation vector applied vertices first graph, get second graph. NULL, vertices permuted.","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"list two igraph objects, named graph1 graph2, two graphs whose adjacency matrix entries correlated corr.","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"Please see reference given .","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"Lyzinski, V., Fishkind, D. E., Priebe, C. E. (2013). Seeded graph matching correlated Erdős-Rényi graphs. https://arxiv.org/abs/1304.7844","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"igraph_correlated_pair_game().","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"","code":"gg <- sample_correlated_gnp_pair( n = 10, corr = .8, p = .5, directed = FALSE ) gg #> $graph1 #> IGRAPH f968921 U--- 10 18 -- #> + edges from f968921: #> [1] 2-- 3 1-- 5 3-- 5 2-- 6 3-- 6 4-- 6 5-- 6 2-- 7 3-- 7 5-- 7 2-- 8 3-- 8 #> [13] 3-- 9 4-- 9 5-- 9 3--10 4--10 5--10 #> #> $graph2 #> IGRAPH fe47fc9 U--- 10 19 -- #> + edges from fe47fc9: #> [1] 2-- 3 1-- 5 3-- 5 4-- 5 2-- 6 3-- 6 4-- 6 5-- 6 2-- 7 5-- 7 2-- 8 3-- 8 #> [13] 5-- 8 3-- 9 4-- 9 5-- 9 3--10 4--10 5--10 #> cor(as.vector(gg[[1]][]), as.vector(gg[[2]][])) #> [1] 0.8721573"},{"path":"https://r.igraph.org/reference/sample_degseq.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs with a given degree sequence — sample_degseq","title":"Generate random graphs with a given degree sequence — sample_degseq","text":"often useful create graph given vertex degrees. function creates graph randomized manner.","code":""},{"path":"https://r.igraph.org/reference/sample_degseq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs with a given degree sequence — sample_degseq","text":"","code":"sample_degseq( out.deg, in.deg = NULL, method = c(\"configuration\", \"vl\", \"fast.heur.simple\", \"configuration.simple\", \"edge.switching.simple\") ) degseq(..., deterministic = FALSE)"},{"path":"https://r.igraph.org/reference/sample_degseq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs with a given degree sequence — sample_degseq","text":".deg Numeric vector, sequence degrees (undirected graphs) -degrees (directed graphs). undirected graphs sum even. directed graphs sum sum .deg. .deg directed graph, -degree sequence. default NULL undirected graph created. method Character, method generating graph. See Details. ... Passed realize_degseq() ‘deterministic’ true, sample_degseq() otherwise. deterministic Whether construction deterministic","code":""},{"path":"https://r.igraph.org/reference/sample_degseq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate random graphs with a given degree sequence — sample_degseq","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_degseq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate random graphs with a given degree sequence — sample_degseq","text":"“configuration” method (formerly called \"simple\") implements configuration model. undirected graphs, puts vertex IDs bag multiplicity vertex bag degree. draws pairs bag bag becomes empty. method may generate loop (self) edges multiple edges. directed graphs, algorithm basically , two separate bags used - -degrees. Undirected graphs generated probability proportional \\((\\prod_{ [1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 #> [38] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 #> [75] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 is_simple(undirected_graph) # sometimes TRUE, but can be FALSE #> [1] FALSE directed_graph <- sample_degseq(1:10, 10:1) degree(directed_graph, mode = \"out\") #> [1] 1 2 3 4 5 6 7 8 9 10 degree(directed_graph, mode = \"in\") #> [1] 10 9 8 7 6 5 4 3 2 1 ## The vl generator vl_graph <- sample_degseq(rep(2, 100), method = \"vl\") degree(vl_graph) #> [1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 #> [38] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 #> [75] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 is_simple(vl_graph) # always TRUE #> [1] TRUE ## Exponential degree distribution ## We fix the seed as there's no guarantee ## that randomly picked integers will form a graphical degree sequence ## (i.e. that there's a graph with these degrees) ## withr::with_seed(42, { ## exponential_degrees <- sample(1:100, 100, replace = TRUE, prob = exp(-0.5 * (1:100))) ## }) exponential_degrees <- c( 5L, 6L, 1L, 4L, 3L, 2L, 3L, 1L, 3L, 3L, 2L, 3L, 6L, 1L, 2L, 6L, 8L, 1L, 2L, 2L, 5L, 1L, 10L, 6L, 1L, 2L, 1L, 5L, 2L, 4L, 3L, 4L, 1L, 3L, 1L, 4L, 1L, 1L, 5L, 2L, 1L, 2L, 1L, 8L, 2L, 7L, 5L, 3L, 8L, 2L, 1L, 1L, 2L, 4L, 1L, 3L, 3L, 1L, 1L, 2L, 3L, 9L, 3L, 2L, 4L, 1L, 1L, 4L, 3L, 1L, 1L, 1L, 1L, 2L, 1L, 3L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 3L, 3L, 2L, 1L, 1L, 1L, 1L, 3L, 1L, 1L, 6L, 6L, 3L, 1L, 2L, 3L, 2L ) ## Note, that we'd have to correct the degree sequence if its sum is odd is_exponential_degrees_sum_odd <- (sum(exponential_degrees) %% 2 != 0) if (is_exponential_degrees_sum_odd) { exponential_degrees[1] <- exponential_degrees[1] + 1 } exp_vl_graph <- sample_degseq(exponential_degrees, method = \"vl\") all(degree(exp_vl_graph) == exponential_degrees) #> [1] TRUE ## An example that does not work if (FALSE) { # rlang::is_interactive() ## withr::with_seed(11, { ## exponential_degrees <- sample(1:100, 100, replace = TRUE, prob = exp(-0.5 * (1:100))) ## }) exponential_degrees <- c( 1L, 1L, 2L, 1L, 1L, 7L, 1L, 1L, 5L, 1L, 1L, 2L, 5L, 4L, 3L, 2L, 2L, 1L, 1L, 2L, 1L, 3L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 4L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 3L, 1L, 4L, 3L, 1L, 2L, 4L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 4L, 1L, 2L, 1L, 3L, 1L, 2L, 3L, 1L, 1L, 2L, 1L, 2L, 3L, 2L, 2L, 1L, 6L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 4L, 2L, 1L, 3L, 4L, 1L, 1L, 3L, 1L, 2L, 4L, 1L, 3L, 1L, 2L, 1L ) ## Note, that we'd have to correct the degree sequence if its sum is odd is_exponential_degrees_sum_odd <- (sum(exponential_degrees) %% 2 != 0) if (is_exponential_degrees_sum_odd) { exponential_degrees[1] <- exponential_degrees[1] + 1 } exp_vl_graph <- sample_degseq(exponential_degrees, method = \"vl\") } ## Power-law degree distribution ## We fix the seed as there's no guarantee ## that randomly picked integers will form a graphical degree sequence ## (i.e. that there's a graph with these degrees) ## withr::with_seed(1, { ## powerlaw_degrees <- sample(1:100, 100, replace = TRUE, prob = (1:100)^-2) ## }) powerlaw_degrees <- c( 1L, 1L, 1L, 6L, 1L, 6L, 10L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 3L, 1L, 2L, 43L, 1L, 3L, 9L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 4L, 1L, 1L, 1L, 1L, 1L, 3L, 2L, 3L, 1L, 2L, 1L, 3L, 2L, 3L, 1L, 1L, 3L, 1L, 1L, 2L, 2L, 1L, 4L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 7L, 1L, 1L, 1L, 2L, 1L, 1L, 3L, 1L, 5L, 1L, 4L, 1L, 1L, 1L, 5L, 4L, 1L, 3L, 13L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 5L, 3L, 3L, 1L, 1L, 3L, 1L ) ## Note, that we correct the degree sequence if its sum is odd is_exponential_degrees_sum_odd <- (sum(powerlaw_degrees) %% 2 != 0) if (is_exponential_degrees_sum_odd) { powerlaw_degrees[1] <- powerlaw_degrees[1] + 1 } powerlaw_vl_graph <- sample_degseq(powerlaw_degrees, method = \"vl\") all(degree(powerlaw_vl_graph) == powerlaw_degrees) #> [1] TRUE ## An example that does not work if (FALSE) { # rlang::is_interactive() ## withr::with_seed(2, { ## powerlaw_degrees <- sample(1:100, 100, replace = TRUE, prob = (1:100)^-2) ## }) powerlaw_degrees <- c( 1L, 2L, 1L, 1L, 10L, 10L, 1L, 4L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 4L, 21L, 1L, 1L, 1L, 2L, 1L, 4L, 1L, 1L, 1L, 1L, 1L, 14L, 1L, 1L, 1L, 3L, 4L, 1L, 2L, 4L, 1L, 2L, 1L, 25L, 1L, 1L, 1L, 10L, 3L, 19L, 1L, 1L, 3L, 1L, 1L, 2L, 8L, 1L, 3L, 3L, 36L, 2L, 2L, 3L, 5L, 2L, 1L, 4L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 4L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 4L, 18L, 1L, 2L, 1L, 21L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L ) ## Note, that we correct the degree sequence if its sum is odd is_exponential_degrees_sum_odd <- (sum(powerlaw_degrees) %% 2 != 0) if (is_exponential_degrees_sum_odd) { powerlaw_degrees[1] <- powerlaw_degrees[1] + 1 } powerlaw_vl_graph <- sample_degseq(powerlaw_degrees, method = \"vl\") all(degree(powerlaw_vl_graph) == powerlaw_degrees) }"},{"path":"https://r.igraph.org/reference/sample_dirichlet.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample from a Dirichlet distribution — sample_dirichlet","title":"Sample from a Dirichlet distribution — sample_dirichlet","text":"Sample finite-dimensional vectors use latent position vectors random dot product graphs","code":""},{"path":"https://r.igraph.org/reference/sample_dirichlet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample from a Dirichlet distribution — sample_dirichlet","text":"","code":"sample_dirichlet(n, alpha)"},{"path":"https://r.igraph.org/reference/sample_dirichlet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample from a Dirichlet distribution — sample_dirichlet","text":"n Integer scalar, sample size. alpha Numeric vector, vector \\(\\alpha\\) parameter Dirichlet distribution.","code":""},{"path":"https://r.igraph.org/reference/sample_dirichlet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample from a Dirichlet distribution — sample_dirichlet","text":"dim (length alpha vector sample_dirichlet()) times n matrix, whose columns sample vectors.","code":""},{"path":"https://r.igraph.org/reference/sample_dirichlet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample from a Dirichlet distribution — sample_dirichlet","text":"sample_dirichlet() generates samples Dirichlet distribution given \\(\\alpha\\) parameter. sample drawn length(alpha)-1-simplex.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_dirichlet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample from a Dirichlet distribution — sample_dirichlet","text":"","code":"lpvs.dir <- sample_dirichlet(n = 20, alpha = rep(1, 10)) RDP.graph.2 <- sample_dot_product(lpvs.dir) colSums(lpvs.dir) #> [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs according to the random dot product graph model — sample_dot_product","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"model, vertex represented latent position vector. Probability edge two vertices given dot product latent position vectors.","code":""},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"","code":"sample_dot_product(vecs, directed = FALSE) dot_product(...)"},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"vecs numeric matrix latent position vector column. directed logical scalar, TRUE generated graph directed. ... Passed sample_dot_product().","code":""},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"igraph graph object generated random dot product graph.","code":""},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"dot product latent position vectors [0,1] interval, otherwise warning given. negative dot products, edges added; dot products larger one always add edge.","code":""},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"Christine Leigh Myers Nickel: Random dot product graphs, model social networks. Dissertation, Johns Hopkins University, Maryland, USA, 2006.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"igraph_dot_product_game().","code":""},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"","code":"## A randomly generated graph lpvs <- matrix(rnorm(200), 20, 10) lpvs <- apply(lpvs, 2, function(x) { return(abs(x) / sqrt(sum(x^2))) }) g <- sample_dot_product(lpvs) g #> IGRAPH 7c641ae U--- 10 28 -- #> + edges from 7c641ae: #> [1] 1-- 3 1-- 4 1-- 6 1-- 7 1-- 9 1--10 2-- 4 2-- 5 2-- 8 2-- 9 3-- 4 3-- 5 #> [13] 3-- 7 3-- 8 3--10 4-- 5 4-- 6 4-- 7 4-- 8 4-- 9 5-- 7 5-- 8 5--10 6-- 8 #> [25] 6-- 9 6--10 7-- 8 8--10 ## Sample latent vectors from the surface of the unit sphere lpvs2 <- sample_sphere_surface(dim = 5, n = 20) g2 <- sample_dot_product(lpvs2) g2 #> IGRAPH eb7931c U--- 20 142 -- #> + edges from eb7931c: #> [1] 1-- 2 1-- 3 1-- 5 1-- 6 1-- 7 1-- 9 1--10 1--11 1--12 1--13 1--14 1--15 #> [13] 1--16 1--17 1--18 1--19 1--20 2-- 3 2-- 4 2-- 6 2-- 7 2--10 2--11 2--12 #> [25] 2--14 2--15 2--17 2--18 2--19 2--20 3-- 6 3-- 9 3--10 3--11 3--12 3--13 #> [37] 3--14 3--15 3--16 3--17 3--18 3--19 3--20 4-- 5 4-- 7 4-- 8 4--12 4--14 #> [49] 4--15 4--16 4--17 4--18 4--19 4--20 5-- 6 5-- 7 5-- 8 5--10 5--12 5--13 #> [61] 5--17 5--18 5--19 5--20 6-- 7 6-- 8 6-- 9 6--10 6--12 6--14 6--17 6--18 #> [73] 6--19 6--20 7-- 9 7--11 7--12 7--13 7--14 7--16 7--17 7--18 7--19 7--20 #> [85] 8-- 9 8--10 8--12 8--13 8--16 8--17 8--20 9--10 9--11 9--12 9--13 9--15 #> [97] 9--16 9--18 9--20 #> + ... omitted several edges"},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":null,"dir":"Reference","previous_headings":"","what":"Random graphs from vertex fitness scores — sample_fitness","title":"Random graphs from vertex fitness scores — sample_fitness","text":"function generates non-growing random graph edge probabilities proportional node fitness scores.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random graphs from vertex fitness scores — sample_fitness","text":"","code":"sample_fitness( no.of.edges, fitness.out, fitness.in = NULL, loops = FALSE, multiple = FALSE )"},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random graphs from vertex fitness scores — sample_fitness","text":"..edges number edges generated graph. fitness.numeric vector containing fitness vertex. directed graphs, specifies -fitness vertex. fitness.NULL (default), generated graph undirected. NULL, numeric vector specifies -fitness vertex. argument NULL, directed graph generated, otherwise undirected one. loops Logical scalar, whether allow loop edges graph. multiple Logical scalar, whether allow multiple edges graph.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Random graphs from vertex fitness scores — sample_fitness","text":"igraph graph, directed undirected.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Random graphs from vertex fitness scores — sample_fitness","text":"game generates directed undirected random graph probability edge vertices \\(\\) \\(j\\) depends fitness scores two vertices involved. undirected graphs, vertex single fitness score. directed graphs, vertex - -fitness, probability edge \\(\\) \\(j\\) depends -fitness vertex \\(\\) -fitness vertex \\(j\\). generation process goes follows. start \\(N\\) disconnected nodes (\\(N\\) given length fitness vector). randomly select two vertices \\(\\) \\(j\\), probabilities proportional fitnesses. (generated graph directed, \\(\\) selected according -fitnesses \\(j\\) selected according -fitnesses). vertices connected yet (multiple edges allowed), connect ; otherwise select new pair. repeated desired number links created. can shown expected degree vertex proportional fitness, although actual, observed degree . need generate graph exact degree sequence, consider sample_degseq() instead. model commonly used generate static scale-free networks. achieve , draw fitness scores desired power-law distribution. Alternatively, may use sample_fitness_pl() generates fitnesses given exponent.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Random graphs from vertex fitness scores — sample_fitness","text":"Goh K-, Kahng B, Kim D: Universal behaviour load distribution scale-free networks. Phys Rev Lett 87(27):278701, 2001.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Random graphs from vertex fitness scores — sample_fitness","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Random graphs from vertex fitness scores — sample_fitness","text":"igraph_static_fitness_game().","code":""},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Random graphs from vertex fitness scores — sample_fitness","text":"","code":"N <- 10000 g <- sample_fitness(5 * N, sample((1:50)^-2, N, replace = TRUE)) degree_distribution(g) #> [1] 0.4532 0.2083 0.0883 0.0429 0.0271 0.0207 0.0136 0.0123 0.0096 0.0082 #> [11] 0.0062 0.0046 0.0051 0.0038 0.0037 0.0034 0.0046 0.0015 0.0026 0.0020 #> [21] 0.0024 0.0020 0.0024 0.0020 0.0022 0.0012 0.0012 0.0015 0.0012 0.0013 #> [31] 0.0009 0.0012 0.0010 0.0010 0.0002 0.0008 0.0007 0.0010 0.0016 0.0013 #> [41] 0.0012 0.0012 0.0015 0.0014 0.0008 0.0009 0.0007 0.0013 0.0005 0.0007 #> [51] 0.0007 0.0004 0.0002 0.0002 0.0000 0.0000 0.0004 0.0000 0.0003 0.0000 #> [61] 0.0001 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0002 #> [71] 0.0000 0.0003 0.0002 0.0001 0.0003 0.0002 0.0001 0.0002 0.0005 0.0007 #> [81] 0.0009 0.0011 0.0005 0.0006 0.0007 0.0009 0.0006 0.0008 0.0005 0.0006 #> [91] 0.0009 0.0008 0.0006 0.0013 0.0011 0.0006 0.0007 0.0006 0.0004 0.0002 #> [101] 0.0005 0.0000 0.0001 0.0000 0.0004 0.0003 0.0002 0.0001 0.0001 0.0000 #> [111] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [121] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [131] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [141] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [151] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [161] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [171] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [181] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [191] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [201] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [211] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [221] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [231] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [241] 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 0.0000 #> [251] 0.0003 0.0000 0.0002 0.0000 0.0001 0.0001 0.0001 0.0002 0.0002 0.0003 #> [261] 0.0004 0.0002 0.0005 0.0000 0.0005 0.0007 0.0005 0.0004 0.0003 0.0004 #> [271] 0.0007 0.0004 0.0008 0.0006 0.0006 0.0002 0.0005 0.0012 0.0006 0.0006 #> [281] 0.0003 0.0005 0.0006 0.0006 0.0007 0.0008 0.0003 0.0001 0.0007 0.0003 #> [291] 0.0004 0.0002 0.0001 0.0003 0.0003 0.0002 0.0001 0.0001 0.0002 0.0000 #> [301] 0.0004 0.0003 0.0000 0.0000 0.0000 0.0002 0.0000 0.0001 0.0000 0.0000 #> [311] 0.0001 plot(degree_distribution(g, cumulative = TRUE), log = \"xy\")"},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":null,"dir":"Reference","previous_headings":"","what":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"function generates non-growing random graph expected power-law degree distributions.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"","code":"sample_fitness_pl( no.of.nodes, no.of.edges, exponent.out, exponent.in = -1, loops = FALSE, multiple = FALSE, finite.size.correction = TRUE )"},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"..nodes number vertices generated graph. ..edges number edges generated graph. exponent.Numeric scalar, power law exponent degree distribution. directed graphs, specifies exponent -degree distribution. must greater equal 2. pass Inf , get back Erdős-Rényi random network. exponent.Numeric scalar. negative, generated graph undirected. greater equal 2, argument specifies exponent -degree distribution. non-negative less 2, error generated. loops Logical scalar, whether allow loop edges generated graph. multiple Logical scalar, whether allow multiple edges generated graph. finite.size.correction Logical scalar, whether use proposed finite size correction Cho et al., see references .","code":""},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"igraph graph, directed undirected.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"game generates directed undirected random graph degrees vertices follow power-law distributions prescribed exponents. directed graphs, exponents - -degree distributions may specified separately. game simply uses sample_fitness() appropriately constructed fitness vectors. particular, fitness vertex \\(\\) \\(^{-\\alpha}\\), \\(\\alpha = 1/(\\gamma-1)\\) \\(\\gamma\\) exponent given arguments. remove correlations - -degrees case directed graphs, -fitness vector shuffled set sample_fitness() called. Note significant finite size effects may observed exponents smaller 3 original formulation game. function provides argument lets remove finite size effects assuming fitness vertex \\(\\) \\((+i_0-1)^{-\\alpha}\\) \\(i_0\\) constant chosen appropriately ensure maximum degree less square root number edges times average degree; see paper Chung Lu, Cho et al details.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"Goh K-, Kahng B, Kim D: Universal behaviour load distribution scale-free networks. Phys Rev Lett 87(27):278701, 2001. Chung F Lu L: Connected components random graph given degree sequences. Annals Combinatorics 6, 125-145, 2002. Cho YS, Kim JS, Park J, Kahng B, Kim D: Percolation transitions scale-free networks Achlioptas process. Phys Rev Lett 103:135702, 2009.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"igraph_static_power_law_game().","code":""},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"","code":"g <- sample_fitness_pl(10000, 30000, 2.2, 2.3) plot(degree_distribution(g, cumulative = TRUE, mode = \"out\"), log = \"xy\")"},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":null,"dir":"Reference","previous_headings":"","what":"Forest Fire Network Model — sample_forestfire","title":"Forest Fire Network Model — sample_forestfire","text":"growing network model, resembles forest fire spreads igniting trees close .","code":""},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Forest Fire Network Model — sample_forestfire","text":"","code":"sample_forestfire(nodes, fw.prob, bw.factor = 1, ambs = 1, directed = TRUE)"},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Forest Fire Network Model — sample_forestfire","text":"nodes number vertices graph. fw.prob forward burning probability, see details . bw.factor backward burning ratio. backward burning probability calculated bw.factor*fw.prob. ambs number ambassador vertices. directed Logical scalar, whether create directed graph.","code":""},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Forest Fire Network Model — sample_forestfire","text":"simple graph, possibly directed directed argument TRUE.","code":""},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Forest Fire Network Model — sample_forestfire","text":"forest fire model intends reproduce following network characteristics, observed real networks: Heavy-tailed -degree distribution. Heavy-tailed -degree distribution. Communities. Densification power-law. network densifying time, according power-law rule. Shrinking diameter. diameter network decreases time. network generated following way. One vertex added time. vertex connects (cites) ambs vertices already present network, chosen uniformly random. Now, cited vertex \\(v\\) following procedure: generate two random number, \\(x\\) \\(y\\), geometrically distributed means \\(p/(1-p)\\) \\(rp(1-rp)\\). (\\(p\\) fw.prob, \\(r\\) bw.factor.) new vertex cites \\(x\\) outgoing neighbors \\(y\\) incoming neighbors \\(v\\), yet cited new vertex. less \\(x\\) \\(y\\) vertices available cite . procedure applied newly cited vertices.","code":""},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Forest Fire Network Model — sample_forestfire","text":"version model published paper incorrect sense generate kind graphs authors claim. corrected version available http://www.cs.cmu.edu/~jure/pubs/powergrowth-tkdd.pdf, implementation based .","code":""},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Forest Fire Network Model — sample_forestfire","text":"Jure Leskovec, Jon Kleinberg Christos Faloutsos. Graphs time: densification laws, shrinking diameters possible explanations. KDD '05: Proceeding eleventh ACM SIGKDD international conference Knowledge discovery data mining, 177–187, 2005.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Forest Fire Network Model — sample_forestfire","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Forest Fire Network Model — sample_forestfire","text":"igraph_forest_fire_game().","code":""},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Forest Fire Network Model — sample_forestfire","text":"","code":"fire <- sample_forestfire(50, fw.prob = 0.37, bw.factor = 0.32 / 0.37) plot(fire) g <- sample_forestfire(10000, fw.prob = 0.37, bw.factor = 0.32 / 0.37) dd1 <- degree_distribution(g, mode = \"in\") dd2 <- degree_distribution(g, mode = \"out\") # The forest fire model produces graphs with a heavy tail degree distribution. # Note that some in- or out-degrees are zero which will be excluded from the logarithmic plot. plot(seq(along.with = dd1) - 1, dd1, log = \"xy\") #> Warning: 1 x value <= 0 omitted from logarithmic plot #> Warning: 439 y values <= 0 omitted from logarithmic plot points(seq(along.with = dd2) - 1, dd2, col = 2, pch = 2)"},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"Random graph fixed number edges vertices.","code":""},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"","code":"sample_gnm(n, m, directed = FALSE, loops = FALSE) gnm(...)"},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"n number vertices graph. m number edges graph. directed Logical, whether graph directed, defaults FALSE. loops Logical, whether add loop edges, defaults FALSE. ... Passed sample_gnm().","code":""},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"graph n vertices m edges. edges chosen uniformly random set vertex pairs. set includes potential self-connections well loops parameter TRUE.","code":""},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"Erdős, P. Rényi, ., random graphs, Publicationes Mathematicae 6, 290–297 (1959).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"","code":"g <- sample_gnm(1000, 1000) degree_distribution(g) #> [1] 0.133 0.290 0.246 0.181 0.095 0.041 0.009 0.004 0.001"},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"Every possible edge created independently probability p. model also referred Bernoulli random graph since connectivity status vertex pairs follows Bernoulli distribution.","code":""},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"","code":"sample_gnp(n, p, directed = FALSE, loops = FALSE) gnp(...)"},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"n number vertices graph. p probability drawing edge two arbitrary vertices (\\(G(n,p)\\) graph). directed Logical, whether graph directed, defaults FALSE. loops Logical, whether add loop edges, defaults FALSE. ... Passed sample_gnp().","code":""},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"graph n vertices pair vertices connected probability p. loops parameter controls whether self-connections also considered. model effectively constrains average number edges, \\(p m_\\text{max}\\), \\(m_\\text{max}\\) largest possible number edges, depends whether graph directed undirected whether self-loops allowed.","code":""},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"Erdős, P. Rényi, ., random graphs, Publicationes Mathematicae 6, 290–297 (1959).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"","code":"# Random graph with expected mean degree of 2 g <- sample_gnp(1000, 2 / 1000) mean(degree(g)) #> [1] 1.986 degree_distribution(g) #> [1] 0.125 0.289 0.277 0.167 0.091 0.033 0.015 0.002 0.000 0.001 # Pick a simple graph on 6 vertices uniformly at random plot(sample_gnp(6, 0.5))"},{"path":"https://r.igraph.org/reference/sample_grg.html","id":null,"dir":"Reference","previous_headings":"","what":"Geometric random graphs — sample_grg","title":"Geometric random graphs — sample_grg","text":"Generate random graph based distance random point unit square","code":""},{"path":"https://r.igraph.org/reference/sample_grg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Geometric random graphs — sample_grg","text":"","code":"sample_grg(nodes, radius, torus = FALSE, coords = FALSE) grg(...)"},{"path":"https://r.igraph.org/reference/sample_grg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Geometric random graphs — sample_grg","text":"nodes number vertices graph. radius radius within vertices connected edge. torus Logical constant, whether use torus instead square. coords Logical scalar, whether add positions vertices vertex attributes called ‘x’ ‘y’. ... Passed sample_grg().","code":""},{"path":"https://r.igraph.org/reference/sample_grg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Geometric random graphs — sample_grg","text":"graph object. coords TRUE vertex attributes ‘x’ ‘y’.","code":""},{"path":"https://r.igraph.org/reference/sample_grg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Geometric random graphs — sample_grg","text":"First number points dropped unit square, points correspond vertices graph create. Two points connected undirected edge closer Euclidean norm given radius. torus argument TRUE unit area torus used instead square.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_grg.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Geometric random graphs — sample_grg","text":"Gabor Csardi csardi.gabor@gmail.com, first version written Keith Briggs (http://keithbriggs.info/).","code":""},{"path":"https://r.igraph.org/reference/sample_grg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Geometric random graphs — sample_grg","text":"","code":"g <- sample_grg(1000, 0.05, torus = FALSE) g2 <- sample_grg(1000, 0.05, torus = TRUE)"},{"path":"https://r.igraph.org/reference/sample_growing.html","id":null,"dir":"Reference","previous_headings":"","what":"Growing random graph generation — sample_growing","title":"Growing random graph generation — sample_growing","text":"function creates random graph simulating stochastic evolution.","code":""},{"path":"https://r.igraph.org/reference/sample_growing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Growing random graph generation — sample_growing","text":"","code":"sample_growing(n, m = 1, ..., directed = TRUE, citation = FALSE) growing(...)"},{"path":"https://r.igraph.org/reference/sample_growing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Growing random graph generation — sample_growing","text":"n Numeric constant, number vertices graph. m Numeric constant, number edges added time step. ... Passed sample_growing(). directed Logical, whether create directed graph. citation Logical. TRUE citation graph created, .e. time step added edges originating new vertex.","code":""},{"path":"https://r.igraph.org/reference/sample_growing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Growing random graph generation — sample_growing","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_growing.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Growing random graph generation — sample_growing","text":"discrete time step model, time step new vertex added graph m new edges created. citation FALSE edges connecting two uniformly randomly chosen vertices, otherwise edges connecting new vertex uniformly randomly chosen old vertices.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_growing.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Growing random graph generation — sample_growing","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_growing.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Growing random graph generation — sample_growing","text":"igraph_growing_random_game().","code":""},{"path":"https://r.igraph.org/reference/sample_growing.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Growing random graph generation — sample_growing","text":"","code":"g <- sample_growing(500, citation = FALSE) g2 <- sample_growing(500, citation = TRUE)"},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"Sampling hierarchical stochastic block model networks.","code":""},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"","code":"sample_hierarchical_sbm(n, m, rho, C, p) hierarchical_sbm(...)"},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"n Integer scalar, number vertices. m Integer scalar, number vertices per block. n / m must integer. Alternatively, integer vector block sizes, blocks equal sizes. rho Numeric vector, fraction vertices per cluster, within block. Must sum 1, rho * m must integer elements rho. Alternatively list rho vectors, one block, blocks. C square, symmetric numeric matrix, Bernoulli rates clusters within block. size must mach size rho vector. Alternatively, list square matrices, Bernoulli rates differ different blocks. p Numeric scalar, Bernoulli rate connections vertices different blocks. ... Passed sample_hierarchical_sbm().","code":""},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"function generates random graph according hierarchical stochastic block model.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"igraph_hsbm_game(), igraph_hsbm_list_game().","code":""},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"","code":"## Ten blocks with three clusters each C <- matrix(c( 1, 3 / 4, 0, 3 / 4, 0, 3 / 4, 0, 3 / 4, 3 / 4 ), nrow = 3) g <- sample_hierarchical_sbm(100, 10, rho = c(3, 3, 4) / 10, C = C, p = 1 / 20) g #> IGRAPH d81ab6f U--- 100 443 -- Hierarchical stochastic block model #> + attr: name (g/c), m (g/n), rho (g/n), C (g/n), p (g/n) #> + edges from d81ab6f: #> [1] 1-- 2 1-- 3 2-- 3 1-- 4 2-- 4 3-- 4 1-- 5 2-- 5 3-- 5 1-- 6 #> [11] 2-- 6 4-- 7 5-- 7 6-- 7 5-- 8 6-- 8 4-- 9 5-- 9 4--10 6--10 #> [21] 7-- 8 7-- 9 8-- 9 7--10 8--10 9--10 11--12 11--13 12--13 12--14 #> [31] 11--15 12--15 13--15 11--16 12--16 13--16 14--17 15--17 14--18 16--18 #> [41] 14--19 15--19 16--19 15--20 17--18 18--19 17--20 18--20 21--22 21--23 #> [51] 22--23 21--24 22--24 23--24 21--25 23--25 21--26 22--26 23--26 25--27 #> [61] 24--28 25--28 26--28 24--29 26--29 24--30 26--30 27--29 28--29 27--30 #> [71] 28--30 31--32 31--33 32--33 31--34 32--34 33--34 31--35 32--35 31--36 #> + ... omitted several edges if (require(Matrix)) { image(g[]) }"},{"path":"https://r.igraph.org/reference/sample_hrg.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample from a hierarchical random graph model — sample_hrg","title":"Sample from a hierarchical random graph model — sample_hrg","text":"sample_hrg() samples graph given hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/sample_hrg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample from a hierarchical random graph model — sample_hrg","text":"","code":"sample_hrg(hrg)"},{"path":"https://r.igraph.org/reference/sample_hrg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample from a hierarchical random graph model — sample_hrg","text":"hrg hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/sample_hrg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample from a hierarchical random graph model — sample_hrg","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_hrg.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Sample from a hierarchical random graph model — sample_hrg","text":"igraph_hrg_game().","code":""},{"path":"https://r.igraph.org/reference/sample_islands.html","id":null,"dir":"Reference","previous_headings":"","what":"A graph with subgraphs that are each a random graph. — sample_islands","title":"A graph with subgraphs that are each a random graph. — sample_islands","text":"Create number Erdős-Rényi random graphs identical parameters, connect specified number edges.","code":""},{"path":"https://r.igraph.org/reference/sample_islands.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A graph with subgraphs that are each a random graph. — sample_islands","text":"","code":"sample_islands(islands.n, islands.size, islands.pin, n.inter)"},{"path":"https://r.igraph.org/reference/sample_islands.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A graph with subgraphs that are each a random graph. — sample_islands","text":"islands.n number islands graph. islands.size size islands graph. islands.pin probability create possible edge island. n.inter number edges create two islands.","code":""},{"path":"https://r.igraph.org/reference/sample_islands.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A graph with subgraphs that are each a random graph. — sample_islands","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/sample_islands.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A graph with subgraphs that are each a random graph. — sample_islands","text":"","code":"g <- sample_islands(3, 10, 5/10, 1) oc <- cluster_optimal(g) oc"},{"path":[]},{"path":"https://r.igraph.org/reference/sample_islands.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A graph with subgraphs that are each a random graph. — sample_islands","text":"Samuel Thiriot","code":""},{"path":"https://r.igraph.org/reference/sample_islands.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"A graph with subgraphs that are each a random graph. — sample_islands","text":"igraph_simple_interconnected_islands_game().","code":""},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a random regular graph — sample_k_regular","title":"Create a random regular graph — sample_k_regular","text":"Generate random graph vertex degree.","code":""},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a random regular graph — sample_k_regular","text":"","code":"sample_k_regular(no.of.nodes, k, directed = FALSE, multiple = FALSE)"},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a random regular graph — sample_k_regular","text":"..nodes Integer scalar, number vertices generated graph. k Integer scalar, degree vertex graph, -degree -degree directed graph. directed Logical scalar, whether create directed graph. multiple Logical scalar, whether multiple edges allowed.","code":""},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a random regular graph — sample_k_regular","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a random regular graph — sample_k_regular","text":"game generates directed undirected random graph degrees vertices equal predefined constant k. undirected graphs, least one k number vertices must even. game simply uses sample_degseq() appropriately constructed degree sequences.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a random regular graph — sample_k_regular","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Create a random regular graph — sample_k_regular","text":"igraph_k_regular_game().","code":""},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a random regular graph — sample_k_regular","text":"","code":"## A simple ring ring <- sample_k_regular(10, 2) plot(ring) ## k-regular graphs on 10 vertices, with k=1:9 k10 <- lapply(1:9, sample_k_regular, no.of.nodes = 10) layout(matrix(1:9, nrow = 3, byrow = TRUE)) sapply(k10, plot, vertex.label = NA) #> [[1]] #> NULL #> #> [[2]] #> NULL #> #> [[3]] #> NULL #> #> [[4]] #> NULL #> #> [[5]] #> NULL #> #> [[6]] #> NULL #> #> [[7]] #> NULL #> #> [[8]] #> NULL #> #> [[9]] #> NULL #>"},{"path":"https://r.igraph.org/reference/sample_last_cit.html","id":null,"dir":"Reference","previous_headings":"","what":"Random citation graphs — sample_last_cit","title":"Random citation graphs — sample_last_cit","text":"sample_last_cit() creates graph, vertices age, gain new connections based long ago last citation happened.","code":""},{"path":"https://r.igraph.org/reference/sample_last_cit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random citation graphs — sample_last_cit","text":"","code":"sample_last_cit( n, edges = 1, agebins = n/7100, pref = (1:(agebins + 1))^-3, directed = TRUE ) last_cit(...) sample_cit_types( n, edges = 1, types = rep(0, n), pref = rep(1, length(types)), directed = TRUE, attr = TRUE ) cit_types(...) sample_cit_cit_types( n, edges = 1, types = rep(0, n), pref = matrix(1, nrow = length(types), ncol = length(types)), directed = TRUE, attr = TRUE ) cit_cit_types(...)"},{"path":"https://r.igraph.org/reference/sample_last_cit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random citation graphs — sample_last_cit","text":"n Number vertices. edges Number edges per step. agebins Number aging bins. pref Vector (sample_last_cit() sample_cit_types() matrix (sample_cit_cit_types()) giving (unnormalized) citation probabilities different vertex types. directed Logical scalar, whether generate directed networks. ... Passed actual constructor. types Vector length ‘n’, types vertices. Types numbered zero. attr Logical scalar, whether add vertex types generated graph vertex attribute called ‘type’.","code":""},{"path":"https://r.igraph.org/reference/sample_last_cit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Random citation graphs — sample_last_cit","text":"new graph.","code":""},{"path":"https://r.igraph.org/reference/sample_last_cit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Random citation graphs — sample_last_cit","text":"sample_cit_cit_types() stochastic block model graph growing. sample_cit_types() similarly growing stochastic block model, probability edge depends (potentially) cited vertex .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_last_cit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Random citation graphs — sample_last_cit","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_motifs.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph motifs — sample_motifs","title":"Graph motifs — sample_motifs","text":"Graph motifs small connected induced subgraphs well-defined structure. functions search graph various motifs.","code":""},{"path":"https://r.igraph.org/reference/sample_motifs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph motifs — sample_motifs","text":"","code":"sample_motifs( graph, size = 3, cut.prob = rep(0, size), sample.size = vcount(graph)/10, sample = NULL )"},{"path":"https://r.igraph.org/reference/sample_motifs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph motifs — sample_motifs","text":"graph Graph object, input graph. size size motif, currently size 3 4 supported directed graphs sizes 3-6 undirected graphs. cut.prob Numeric vector giving probabilities search graph cut certain level. length size motif (size argument). default cuts made. sample.size number vertices use starting point finding motifs. used sample argument NULL. sample NULL specifies vertices use starting point finding motifs.","code":""},{"path":"https://r.igraph.org/reference/sample_motifs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph motifs — sample_motifs","text":"numeric scalar, estimate total number motifs graph.","code":""},{"path":"https://r.igraph.org/reference/sample_motifs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph motifs — sample_motifs","text":"sample_motifs() estimates total number motifs given size graph based sample.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_motifs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph motifs — sample_motifs","text":"","code":"g <- sample_pa(100) motifs(g, 3) #> [1] NA NA 409 NA 74 0 0 0 0 0 0 0 0 0 0 0 count_motifs(g, 3) #> [1] 483 sample_motifs(g, 3) #> [1] -9.223372e+18"},{"path":"https://r.igraph.org/reference/sample_pa.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs using preferential attachment — sample_pa","title":"Generate random graphs using preferential attachment — sample_pa","text":"Preferential attachment family simple stochastic algorithms building graph. Variants include Barabási-Abert model Price model.","code":""},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs using preferential attachment — sample_pa","text":"","code":"sample_pa( n, power = 1, m = NULL, out.dist = NULL, out.seq = NULL, out.pref = FALSE, zero.appeal = 1, directed = TRUE, algorithm = c(\"psumtree\", \"psumtree-multiple\", \"bag\"), start.graph = NULL ) pa(...)"},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs using preferential attachment — sample_pa","text":"n Number vertices. power power preferential attachment, default one, .e. linear preferential attachment. m Numeric constant, number edges add time step argument used .dist .seq omitted NULL. .dist Numeric vector, distribution number edges add time step. argument used .seq argument omitted NULL. .seq Numeric vector giving number edges add time step. first element ignored edges added first time step. .pref Logical, true total degree used calculating citation probability, otherwise -degree used. zero.appeal ‘attractiveness’ vertices adjacent edges. See details . directed Whether create directed graph. algorithm algorithm use graph generation. psumtree uses partial prefix-sum tree generate graph, algorithm can handle power zero.appeal values never generates multiple edges. psumtree-multiple also uses partial prefix-sum tree, generation multiple edges allowed. 0.6 version igraph used algorithm power one, zero.appeal one. bag algorithm previously (version 0.6) used power one zero.appeal one well. works putting ids vertices bag (multiset, really), exactly many times (-)degree, plus . required number cited vertices drawn bag, replacement. method might generate multiple edges. works power zero.appeal equal one. start.graph NULL igraph graph. graph, supplied graph used starting graph preferential attachment algorithm. graph least one vertex. graph supplied .seq argument NULL, contain degrees new vertices , ones start.graph. ... Passed sample_pa().","code":""},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate random graphs using preferential attachment — sample_pa","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate random graphs using preferential attachment — sample_pa","text":"simple stochastic algorithm generate graph. discrete time step model time step single vertex added. start single vertex edges first time step. add one vertex time step new vertex initiates edges old vertices. probability old vertex chosen given $$P[] \\sim k_i^\\alpha+$$ \\(k_i\\) -degree vertex \\(\\) current time step (precisely number adjacent edges \\(\\) initiated \\(\\) ) \\(\\alpha\\) \\(\\) parameters given power zero.appeal arguments. number edges initiated time step given m, .dist .seq arguments. .seq given NULL gives number edges add vector, first element ignored, second number edges add second time step . .seq given null .dist given NULL used discrete distribution generate number edges time step. first element probability edges added, second probability one edge added, etc. (.dist need sum one, normalized automatically.) .dist contain non-negative numbers east one element positive. .seq .dist omitted NULL m used, positive integer constant m edges added time step. sample_pa() generates directed graph default, set directed FALSE generate undirected graph. Note even undirected graph generated \\(k_i\\) denotes number adjacent edges initiated vertex total (- + -) degree vertex, unless .pref argument set TRUE.","code":""},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate random graphs using preferential attachment — sample_pa","text":"Barabási, .-L. Albert R. 1999. Emergence scaling random networks Science, 286 509–512. de Solla Price, D. J. 1965. Networks Scientific Papers Science, 149 510–515.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate random graphs using preferential attachment — sample_pa","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate random graphs using preferential attachment — sample_pa","text":"","code":"g <- sample_pa(10000) degree_distribution(g) #> [1] 0.0000 0.6609 0.1720 0.0707 0.0334 0.0187 0.0102 0.0067 0.0048 0.0033 #> [11] 0.0033 0.0032 0.0011 0.0018 0.0011 0.0011 0.0009 0.0007 0.0003 0.0005 #> [21] 0.0008 0.0002 0.0002 0.0003 0.0004 0.0003 0.0003 0.0004 0.0001 0.0004 #> [31] 0.0003 0.0000 0.0002 0.0000 0.0001 0.0000 0.0001 0.0001 0.0000 0.0001 #> [41] 0.0000 0.0001 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [51] 0.0000 0.0000 0.0000 0.0001 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 #> [61] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [71] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [81] 0.0000 0.0000 0.0001 0.0000 0.0000 0.0001 0.0000 0.0000 0.0001 0.0000 #> [91] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [101] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [111] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 0.0000 0.0000 0.0000 0.0000 #> [121] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [131] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [141] 0.0000 0.0000 0.0000 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [151] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [161] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [171] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [181] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [191] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001"},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"function creates random graph simulating evolution. time new vertex added creates number links old vertices probability old vertex cited depends -degree (preferential attachment) age.","code":""},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"","code":"sample_pa_age( n, pa.exp, aging.exp, m = NULL, aging.bin = 300, out.dist = NULL, out.seq = NULL, out.pref = FALSE, directed = TRUE, zero.deg.appeal = 1, zero.age.appeal = 0, deg.coef = 1, age.coef = 1, time.window = NULL ) pa_age(...)"},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"n number vertices graph. pa.exp preferential attachment exponent, see details . aging.exp exponent aging, usually non-positive number, see details . m number edges new vertex creates (except first vertex). argument used .dist .seq arguments NULL. aging.bin number bins use measuring age vertices, see details . .dist discrete distribution generate number edges add time step .seq NULL. See details . .seq number edges add time step, vector containing many elements number vertices. See details . .pref Logical constant, whether include edges initiated vertex basis preferential attachment. See details . directed Logical constant, whether generate directed graph. See details . zero.deg.appeal degree-dependent part ‘attractiveness’ vertices adjacent edges. See also details . zero.age.appeal age-dependent part ‘attrativeness’ vertices age zero. usually zero, see details . deg.coef coefficient degree-dependent ‘attractiveness’. See details . age.coef coefficient age-dependent part ‘attractiveness’. See details . time.window Integer constant, NULL adjacent added last time.windows time steps counted basis preferential attachment. See also details . ... Passed sample_pa_age().","code":""},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"new graph.","code":""},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"discrete time step model growing graph. start network containing single vertex (edges) first time step. time step (starting second) new vertex added initiates number edges old vertices network. probability old vertex connected proportional $$P[] \\sim (c\\cdot k_i^\\alpha+)(d\\cdot l_i^\\beta+b)$$. \\(k_i\\) -degree vertex \\(\\) current time step \\(l_i\\) age vertex \\(\\). age simply defined number time steps passed since vertex added, extension vertex age divided aging.bin bins. \\(c\\), \\(\\alpha\\), \\(\\), \\(d\\), \\(\\beta\\) \\(b\\) parameters can set via following arguments: pa.exp (\\(\\alpha\\), mandatory argument), aging.exp (\\(\\beta\\), mandatory argument), zero.deg.appeal (\\(\\), optional, default value 1), zero.age.appeal (\\(b\\), optional, default 0), deg.coef (\\(c\\), optional, default 1), age.coef (\\(d\\), optional, default 1). number edges initiated time step governed m, .seq .pref parameters. .seq given interpreted vector giving number edges added time step. length n (number vertices), first element ignored. .seq given (NULL) .dist given used discrete probability distribution generate number edges. first element gives probability zero edges added time step, second element probability one edge added, etc. (.seq contain non-negative numbers, sum 1, normalized sum 1. behavior similar prob argument sample command.) default directed graph generated, directed set FALSE undirected created. Even undirected graph generated \\(k_i\\) denotes adjacent edges initiated vertex except .pref set TRUE. time.window argument given (NULL) \\(k_i\\) means adjacent edges added previous time.window time steps. function might generate graphs multiple edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"","code":"# The maximum degree for graph with different aging exponents g1 <- sample_pa_age(10000, pa.exp = 1, aging.exp = 0, aging.bin = 1000) g2 <- sample_pa_age(10000, pa.exp = 1, aging.exp = -1, aging.bin = 1000) g3 <- sample_pa_age(10000, pa.exp = 1, aging.exp = -3, aging.bin = 1000) max(degree(g1)) #> [1] 240 max(degree(g2)) #> [1] 22 max(degree(g3)) #> [1] 11"},{"path":"https://r.igraph.org/reference/sample_pref.html","id":null,"dir":"Reference","previous_headings":"","what":"Trait-based random generation — sample_pref","title":"Trait-based random generation — sample_pref","text":"Generation random graphs based different vertex types.","code":""},{"path":"https://r.igraph.org/reference/sample_pref.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trait-based random generation — sample_pref","text":"","code":"sample_pref( nodes, types, type.dist = rep(1, types), fixed.sizes = FALSE, pref.matrix = matrix(1, types, types), directed = FALSE, loops = FALSE ) pref(...) sample_asym_pref( nodes, types, type.dist.matrix = matrix(1, types, types), pref.matrix = matrix(1, types, types), loops = FALSE ) asym_pref(...)"},{"path":"https://r.igraph.org/reference/sample_pref.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trait-based random generation — sample_pref","text":"nodes number vertices graphs. types number different vertex types. type.dist distribution vertex types, numeric vector length ‘types’ containing non-negative numbers. vector normed obtain probabilities. fixed.sizes Fix number vertices given vertex type label. type.dist argument gives group sizes (.e. number vertices different labels) case. pref.matrix square matrix giving preferences vertex types. matrix ‘types’ rows columns. generating undirected graph, must symmetric. directed Logical constant, whether create directed graph. loops Logical constant, whether self-loops allowed graph. ... Passed constructor, sample_pref() sample_asym_pref(). type.dist.matrix joint distribution - -vertex types.","code":""},{"path":"https://r.igraph.org/reference/sample_pref.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Trait-based random generation — sample_pref","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/sample_pref.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Trait-based random generation — sample_pref","text":"models generate random graphs given vertex types. sample_pref() probability two vertices connected depends type given ‘pref.matrix’ argument. matrix symmetric make sense checked. distribution different vertex types given ‘type.dist’ vector. sample_asym_pref() vertex -type -type directed graph created. probability directed edge realized vertex given -type vertex given -type given ‘pref.matrix’ argument, can asymmetric. joint distribution - -types given ‘type.dist.matrix’ argument. types generated vertices can retrieved type vertex attribute sample_pref() intype outtype vertex attribute sample_asym_pref().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_pref.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Trait-based random generation — sample_pref","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com R interface","code":""},{"path":"https://r.igraph.org/reference/sample_pref.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Trait-based random generation — sample_pref","text":"","code":"pf <- matrix(c(1, 0, 0, 1), nrow = 2) g <- sample_pref(20, 2, pref.matrix = pf) if (FALSE) { # rlang::is_installed(\"tcltk\") && rlang::is_interactive() # example code tkplot(g, layout = layout_with_fr) } pf <- matrix(c(0, 1, 0, 0), nrow = 2) g <- sample_asym_pref(20, 2, pref.matrix = pf) if (FALSE) { # rlang::is_installed(\"tcltk\") && rlang::is_interactive() tkplot(g, layout = layout_in_circle) }"},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample stochastic block model — sample_sbm","title":"Sample stochastic block model — sample_sbm","text":"Sampling stochastic block model networks","code":""},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample stochastic block model — sample_sbm","text":"","code":"sample_sbm(n, pref.matrix, block.sizes, directed = FALSE, loops = FALSE) sbm(...)"},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample stochastic block model — sample_sbm","text":"n Number vertices graph. pref.matrix matrix giving Bernoulli rates. \\(K\\times K\\) matrix, \\(K\\) number groups. probability creating edge vertices groups \\(\\) \\(j\\) given element \\((,j)\\). undirected graphs, matrix must symmetric. block.sizes Numeric vector giving number vertices group. sum vector must match number vertices. directed Logical scalar, whether generate directed graph. loops Logical scalar, whether self-loops allowed graph. ... Passed sample_sbm().","code":""},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample stochastic block model — sample_sbm","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample stochastic block model — sample_sbm","text":"function samples graphs stochastic block model (equivalent ) Bernoulli trials potential edge probabilities given Bernoulli rate matrix, pref.matrix. order vertices generated graph corresponds block.sizes argument.","code":""},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sample stochastic block model — sample_sbm","text":"Faust, K., & Wasserman, S. (1992a). Blockmodels: Interpretation evaluation. Social Networks, 14, 5–61.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Sample stochastic block model — sample_sbm","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Sample stochastic block model — sample_sbm","text":"igraph_sbm_game().","code":""},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample stochastic block model — sample_sbm","text":"","code":"## Two groups with not only few connection between groups pm <- cbind(c(.1, .001), c(.001, .05)) g <- sample_sbm(1000, pref.matrix = pm, block.sizes = c(300, 700)) g #> IGRAPH b549608 U--- 1000 16843 -- Stochastic block model #> + attr: name (g/c), loops (g/l) #> + edges from b549608: #> [1] 8-- 9 3--10 9--11 1--15 2--15 8--15 9--15 11--15 12--17 1--19 #> [11] 2--19 4--19 17--19 4--20 1--21 2--21 15--21 2--23 17--23 1--24 #> [21] 12--24 10--25 1--26 12--26 15--27 1--28 12--28 13--28 4--29 7--30 #> [31] 19--30 22--30 23--30 24--30 27--31 5--32 13--32 14--32 20--32 22--32 #> [41] 12--33 18--33 19--33 28--33 31--33 14--34 20--34 29--34 17--35 32--35 #> [51] 5--36 15--36 4--37 6--37 24--37 2--38 6--38 13--38 30--38 36--38 #> [61] 37--38 20--39 37--39 38--39 35--40 37--40 11--41 26--41 6--42 13--42 #> [71] 17--42 36--42 12--43 19--43 22--43 4--44 9--44 23--44 25--44 33--44 #> + ... omitted several edges"},{"path":"https://r.igraph.org/reference/sample_seq.html","id":null,"dir":"Reference","previous_headings":"","what":"Sampling a random integer sequence — sample_seq","title":"Sampling a random integer sequence — sample_seq","text":"function provides efficient way pull integer random sample sequence integer interval.","code":""},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sampling a random integer sequence — sample_seq","text":"","code":"sample_seq(low, high, length)"},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sampling a random integer sequence — sample_seq","text":"low lower limit interval (inclusive). high higher limit interval (inclusive). length length sample.","code":""},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sampling a random integer sequence — sample_seq","text":"increasing numeric vector containing integers, sample.","code":""},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sampling a random integer sequence — sample_seq","text":"algorithm runs O(length) expected time, even high-low big. much faster (course less general) builtin sample function R.","code":""},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sampling a random integer sequence — sample_seq","text":"Jeffrey Scott Vitter: Efficient Algorithm Sequential Random Sampling, ACM Transactions Mathematical Software, 13/1, 58–67.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Sampling a random integer sequence — sample_seq","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sampling a random integer sequence — sample_seq","text":"","code":"rs <- sample_seq(1, 100000000, 10) rs #> [1] 26472183 32252198 40691168 50646533 52672980 65872579 71657022 83131018 #> [9] 93389538 94370817"},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":null,"dir":"Reference","previous_headings":"","what":"The Watts-Strogatz small-world model — sample_smallworld","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"function generates networks small-world property based variant Watts-Strogatz model. network obtained first creating periodic undirected lattice, rewiring endpoints edge probability p, avoiding creation multi-edges.","code":""},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"","code":"sample_smallworld(dim, size, nei, p, loops = FALSE, multiple = FALSE) smallworld(...)"},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"dim Integer constant, dimension starting lattice. size Integer constant, size lattice along dimension. nei Integer constant, neighborhood within vertices lattice connected. p Real constant zero one, rewiring probability. loops Logical scalar, whether loops edges allowed generated graph. multiple Logical scalar, whether multiple edges allowed int generated graph. ... Passed sample_smallworld().","code":""},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"Note function might create graphs loops /multiple edges. can use simplify() get rid . process differs original model Watts Strogatz (see reference) rewires endpoints edges. Thus limit p=1, obtain G(n,m) random graph number vertices edges original lattice. comparison, original Watts-Strogatz model rewires single endpoint edge, thus network become fully random even p=1. appropriate choices p, models exhibit property simultaneously short path lengths high clustering.","code":""},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"Duncan J Watts Steven H Strogatz: Collective dynamics ‘small world’ networks, Nature 393, 440-442, 1998.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"","code":"g <- sample_smallworld(1, 100, 5, 0.05) mean_distance(g) #> [1] 2.689697 transitivity(g, type = \"average\") #> [1] 0.4888533"},{"path":"https://r.igraph.org/reference/sample_spanning_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Samples from the spanning trees of a graph randomly and uniformly — sample_spanning_tree","title":"Samples from the spanning trees of a graph randomly and uniformly — sample_spanning_tree","text":"sample_spanning_tree() picks spanning tree undirected graph randomly uniformly, using loop-erased random walks.","code":""},{"path":"https://r.igraph.org/reference/sample_spanning_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Samples from the spanning trees of a graph randomly and uniformly — sample_spanning_tree","text":"","code":"sample_spanning_tree(graph, vid = 0)"},{"path":"https://r.igraph.org/reference/sample_spanning_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Samples from the spanning trees of a graph randomly and uniformly — sample_spanning_tree","text":"graph input graph sample . Edge directions ignored graph directed. vid graph disconnected, argument specifies handle situation. argument zero (default), sampling performed component-wise, result spanning forest. argument contains vertex ID, component containing given vertex processed, result spanning tree component graph.","code":""},{"path":"https://r.igraph.org/reference/sample_spanning_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Samples from the spanning trees of a graph randomly and uniformly — sample_spanning_tree","text":"edge sequence containing edges spanning tree. Use subgraph_from_edges() extract corresponding subgraph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_spanning_tree.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Samples from the spanning trees of a graph randomly and uniformly — sample_spanning_tree","text":"igraph_random_spanning_tree().","code":""},{"path":"https://r.igraph.org/reference/sample_spanning_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Samples from the spanning trees of a graph randomly and uniformly — sample_spanning_tree","text":"","code":"g <- make_full_graph(10) %du% make_full_graph(5) edges <- sample_spanning_tree(g) forest <- subgraph_from_edges(g, edges)"},{"path":"https://r.igraph.org/reference/sample_sphere_surface.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","title":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","text":"Sample finite-dimensional vectors use latent position vectors random dot product graphs","code":""},{"path":"https://r.igraph.org/reference/sample_sphere_surface.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","text":"","code":"sample_sphere_surface(dim, n = 1, radius = 1, positive = TRUE)"},{"path":"https://r.igraph.org/reference/sample_sphere_surface.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","text":"dim Integer scalar, dimension random vectors. n Integer scalar, sample size. radius Numeric scalar, radius sphere sample. positive Logical scalar, whether sample positive orthant sphere.","code":""},{"path":"https://r.igraph.org/reference/sample_sphere_surface.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","text":"dim (length alpha vector sample_dirichlet()) times n matrix, whose columns sample vectors.","code":""},{"path":"https://r.igraph.org/reference/sample_sphere_surface.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","text":"sample_sphere_surface() generates uniform samples \\(S^{dim-1}\\) ((dim-1)-sphere) radius radius, .e. Euclidean norm samples equal radius.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_sphere_surface.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","text":"","code":"lpvs.sph <- sample_sphere_surface(dim = 10, n = 20, radius = 1) RDP.graph.3 <- sample_dot_product(lpvs.sph) vec.norm <- apply(lpvs.sph, 2, function(x) { sum(x^2) }) vec.norm #> [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},{"path":"https://r.igraph.org/reference/sample_sphere_volume.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","title":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","text":"Sample finite-dimensional vectors use latent position vectors random dot product graphs","code":""},{"path":"https://r.igraph.org/reference/sample_sphere_volume.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","text":"","code":"sample_sphere_volume(dim, n = 1, radius = 1, positive = TRUE)"},{"path":"https://r.igraph.org/reference/sample_sphere_volume.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","text":"dim Integer scalar, dimension random vectors. n Integer scalar, sample size. radius Numeric scalar, radius sphere sample. positive Logical scalar, whether sample positive orthant sphere.","code":""},{"path":"https://r.igraph.org/reference/sample_sphere_volume.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","text":"dim (length alpha vector sample_dirichlet()) times n matrix, whose columns sample vectors.","code":""},{"path":"https://r.igraph.org/reference/sample_sphere_volume.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","text":"sample_sphere_volume() generates uniform samples \\(S^{dim-1}\\) ((dim-1)-sphere) .e. Euclidean norm samples smaller equal radius.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_sphere_volume.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","text":"","code":"lpvs.sph.vol <- sample_sphere_volume(dim = 10, n = 20, radius = 1) RDP.graph.4 <- sample_dot_product(lpvs.sph.vol) vec.norm <- apply(lpvs.sph.vol, 2, function(x) { sum(x^2) }) vec.norm #> [1] 0.9150287 0.7363831 0.5954715 0.8867888 0.8669855 0.6208555 0.8631230 #> [8] 0.8168739 0.8412747 0.8722140 0.9441620 0.8631601 0.7382623 0.9771869 #> [15] 0.9278220 0.6914552 0.9773915 0.9503206 0.9595938 0.6409363"},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph generation based on different vertex types — sample_traits_callaway","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"functions implement evolving network models based different vertex types.","code":""},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"","code":"sample_traits_callaway( nodes, types, edge.per.step = 1, type.dist = rep(1, types), pref.matrix = matrix(1, types, types), directed = FALSE ) traits_callaway(...) sample_traits( nodes, types, k = 1, type.dist = rep(1, types), pref.matrix = matrix(1, types, types), directed = FALSE ) traits(...)"},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"nodes number vertices graph. types number different vertex types. edge.per.step number edges add graph per time step. type.dist distribution vertex types. assumed stationary time. pref.matrix matrix giving preferences given vertex types. probabilities, .e. numbers zero one. directed Logical constant, whether generate directed graphs. ... Passed constructor, sample_traits() sample_traits_callaway(). k number trials per time step, see details .","code":""},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"sample_traits_callaway() simulation goes like : discrete time step new vertex added graph. type vertex generated based type.dist. two vertices selected uniformly randomly graph. probability connected depends types vertices taken pref.matrix. another two vertices selected repeated edges.per.step times time step. sample_traits() simulation goes like : single vertex added time step. new vertex tries connect k vertices graph. probability connection realized depends types vertices involved taken pref.matrix.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"","code":"# two types of vertices, they like only themselves g1 <- sample_traits_callaway(1000, 2, pref.matrix = matrix(c(1, 0, 0, 1), ncol = 2)) g2 <- sample_traits(1000, 2, k = 2, pref.matrix = matrix(c(1, 0, 0, 1), ncol = 2))"},{"path":"https://r.igraph.org/reference/sample_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample trees randomly and uniformly — sample_tree","title":"Sample trees randomly and uniformly — sample_tree","text":"sample_tree() generates random given number nodes uniform random set labelled trees.","code":""},{"path":"https://r.igraph.org/reference/sample_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample trees randomly and uniformly — sample_tree","text":"","code":"sample_tree(n, directed = FALSE, method = c(\"lerw\", \"prufer\"))"},{"path":"https://r.igraph.org/reference/sample_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample trees randomly and uniformly — sample_tree","text":"n number nodes tree directed Whether create directed tree. edges tree oriented away root. method algorithm use generate tree. ‘prufer’ samples Prüfer sequences uniformly converts sampled sequence tree. ‘lerw’ performs loop-erased random walk complete graph uniformly sampleits spanning trees. (also known Wilson's algorithm). default ‘lerw’. Note method based Prüfer sequences support directed trees moment.","code":""},{"path":"https://r.igraph.org/reference/sample_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample trees randomly and uniformly — sample_tree","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_tree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample trees randomly and uniformly — sample_tree","text":"words, function generates possible labelled tree given number nodes probability.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_tree.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Sample trees randomly and uniformly — sample_tree","text":"igraph_tree_game().","code":""},{"path":"https://r.igraph.org/reference/sample_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample trees randomly and uniformly — sample_tree","text":"","code":"g <- sample_tree(100, method = \"lerw\")"},{"path":"https://r.igraph.org/reference/sbm.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample stochastic block model — sbm.game","title":"Sample stochastic block model — sbm.game","text":"sbm.game() renamed sample_sbm() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/sbm.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample stochastic block model — sbm.game","text":"","code":"sbm.game(n, pref.matrix, block.sizes, directed = FALSE, loops = FALSE)"},{"path":"https://r.igraph.org/reference/sbm.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample stochastic block model — sbm.game","text":"n Number vertices graph. pref.matrix matrix giving Bernoulli rates. \\(K\\times K\\) matrix, \\(K\\) number groups. probability creating edge vertices groups \\(\\) \\(j\\) given element \\((,j)\\). undirected graphs, matrix must symmetric. block.sizes Numeric vector giving number vertices group. sum vector must match number vertices. directed Logical scalar, whether generate directed graph. loops Logical scalar, whether self-loops allowed graph.","code":""},{"path":"https://r.igraph.org/reference/scan_stat.html","id":null,"dir":"Reference","previous_headings":"","what":"Scan statistics on a time series of graphs — scan_stat","title":"Scan statistics on a time series of graphs — scan_stat","text":"Calculate scan statistics time series graphs. done calculating local scan statistics graph vertex, normalizing across vertices across time steps.","code":""},{"path":"https://r.igraph.org/reference/scan_stat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scan statistics on a time series of graphs — scan_stat","text":"","code":"scan_stat(graphs, tau = 1, ell = 0, locality = c(\"us\", \"them\"), ...)"},{"path":"https://r.igraph.org/reference/scan_stat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scan statistics on a time series of graphs — scan_stat","text":"graphs list igraph graph objects. must directed undirected must number vertices. tau number previous time steps consider time-dependent normalization individual vertices. words, current locality statistics vertex compared many previous time steps vertex decide whether significantly larger. ell number previous time steps consider aggregated scan statistics. essentially smoothing parameter. locality Whether calculate ‘us’ ‘’ statistics. ... Extra arguments passed local_scan().","code":""},{"path":"https://r.igraph.org/reference/scan_stat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scan statistics on a time series of graphs — scan_stat","text":"list entries: stat scan statistics time step. NA initial tau + ell time steps. arg_max_v (numeric) vertex ids vertex largest locality statistics, time step. NA initial tau + ell time steps.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/scan_stat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scan statistics on a time series of graphs — scan_stat","text":"","code":"## Generate a bunch of SBMs, with the last one being different num_t <- 20 block_sizes <- c(10, 5, 5) p_ij <- list(p = 0.1, h = 0.9, q = 0.9) P0 <- matrix(p_ij$p, 3, 3) P0[2, 2] <- p_ij$h PA <- P0 PA[3, 3] <- p_ij$q num_v <- sum(block_sizes) tsg <- replicate(num_t - 1, P0, simplify = FALSE) %>% append(list(PA)) %>% lapply(sample_sbm, n = num_v, block.sizes = block_sizes, directed = TRUE) scan_stat(graphs = tsg, k = 1, tau = 4, ell = 2) #> $stat #> [1] NA NA NA NA NA NA #> [7] -0.70059800 -0.03245396 -0.36865665 0.38182632 -0.42403811 0.92227692 #> [13] 0.28722389 -1.21113846 1.13178046 1.00841660 -0.44465162 1.94375821 #> [19] -2.29800559 4.51362150 #> #> $arg_max_v #> [1] NA NA NA NA NA NA 15 5 10 16 9 3 8 6 9 1 13 18 5 20 #> scan_stat(graphs = tsg, locality = \"them\", k = 1, tau = 4, ell = 2) #> $stat #> [1] NA NA NA NA NA NA #> [7] -0.5775089 0.5469063 0.7571575 0.7122845 -0.2900635 -1.3289752 #> [13] 0.7694558 0.6444558 1.0000000 3.5000000 -0.9099820 -0.3235519 #> [19] -2.2014850 2.2980970 #> #> $arg_max_v #> [1] NA NA NA NA NA NA 1 5 4 14 11 3 16 20 9 1 11 19 5 16 #>"},{"path":"https://r.igraph.org/reference/sequential_pal.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential palette — sequential_pal","title":"Sequential palette — sequential_pal","text":"‘OrRd’ palette https://colorbrewer2.org/. nine colors.","code":""},{"path":"https://r.igraph.org/reference/sequential_pal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential palette — sequential_pal","text":"","code":"sequential_pal(n)"},{"path":"https://r.igraph.org/reference/sequential_pal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential palette — sequential_pal","text":"n number colors palette. maximum nine currently.","code":""},{"path":"https://r.igraph.org/reference/sequential_pal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential palette — sequential_pal","text":"character vector RGB color codes.","code":""},{"path":"https://r.igraph.org/reference/sequential_pal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sequential palette — sequential_pal","text":"Use palette, vertex colors mark ordinal quantity, e.g. centrality measure, ordinal vertex covariate, like age people, seniority level.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sequential_pal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential palette — sequential_pal","text":"","code":"library(igraphdata) data(karate) karate <- karate %>% add_layout_(with_kk()) %>% set_vertex_attr(\"size\", value = 10) #> This graph was created by an old(er) igraph version. #> ℹ Call `igraph::upgrade_graph()` on it to use with the current igraph version. #> For now we convert it on the fly... V(karate)$color <- scales::dscale(degree(karate) %>% cut(5), sequential_pal) plot(karate)"},{"path":"https://r.igraph.org/reference/set.edge.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Set edge attributes — set.edge.attribute","title":"Set edge attributes — set.edge.attribute","text":"set.edge.attribute() renamed set_edge_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/set.edge.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set edge attributes — set.edge.attribute","text":"","code":"set.edge.attribute(graph, name, index = E(graph), value)"},{"path":"https://r.igraph.org/reference/set.edge.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set edge attributes — set.edge.attribute","text":"graph graph name name attribute set. index optional edge sequence set attributes subset edges. value new value attribute (index) edges. NULL, input returned unchanged.","code":""},{"path":"https://r.igraph.org/reference/set.graph.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Set a graph attribute — set.graph.attribute","title":"Set a graph attribute — set.graph.attribute","text":"set.graph.attribute() renamed set_graph_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/set.graph.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set a graph attribute — set.graph.attribute","text":"","code":"set.graph.attribute(graph, name, value)"},{"path":"https://r.igraph.org/reference/set.graph.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set a graph attribute — set.graph.attribute","text":"graph graph. name name attribute set. value New value attribute.","code":""},{"path":"https://r.igraph.org/reference/set.vertex.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Set vertex attributes — set.vertex.attribute","title":"Set vertex attributes — set.vertex.attribute","text":"set.vertex.attribute() renamed set_vertex_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/set.vertex.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set vertex attributes — set.vertex.attribute","text":"","code":"set.vertex.attribute(graph, name, index = V(graph), value)"},{"path":"https://r.igraph.org/reference/set.vertex.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set vertex attributes — set.vertex.attribute","text":"graph graph. name name attribute set. index optional vertex sequence set attributes subset vertices. value new value attribute (index) vertices. NULL, input returned unchanged.","code":""},{"path":"https://r.igraph.org/reference/set_edge_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Set edge attributes — set_edge_attr","title":"Set edge attributes — set_edge_attr","text":"Set edge attributes","code":""},{"path":"https://r.igraph.org/reference/set_edge_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set edge attributes — set_edge_attr","text":"","code":"set_edge_attr(graph, name, index = E(graph), value)"},{"path":"https://r.igraph.org/reference/set_edge_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set edge attributes — set_edge_attr","text":"graph graph name name attribute set. index optional edge sequence set attributes subset edges. value new value attribute (index) edges. NULL, input returned unchanged.","code":""},{"path":"https://r.igraph.org/reference/set_edge_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set edge attributes — set_edge_attr","text":"graph, edge attribute added set.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/set_edge_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set edge attributes — set_edge_attr","text":"","code":"g <- make_ring(10) %>% set_edge_attr(\"label\", value = LETTERS[1:10]) g #> IGRAPH 2d69f10 U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), label (e/c) #> + edges from 2d69f10: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 plot(g)"},{"path":"https://r.igraph.org/reference/set_graph_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Set a graph attribute — set_graph_attr","title":"Set a graph attribute — set_graph_attr","text":"existing attribute name overwritten.","code":""},{"path":"https://r.igraph.org/reference/set_graph_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set a graph attribute — set_graph_attr","text":"","code":"set_graph_attr(graph, name, value)"},{"path":"https://r.igraph.org/reference/set_graph_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set a graph attribute — set_graph_attr","text":"graph graph. name name attribute set. value New value attribute.","code":""},{"path":"https://r.igraph.org/reference/set_graph_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set a graph attribute — set_graph_attr","text":"graph new graph attribute added set.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/set_graph_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set a graph attribute — set_graph_attr","text":"","code":"g <- make_ring(10) %>% set_graph_attr(\"layout\", layout_with_fr) g #> IGRAPH 0758833 U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), layout (g/x) #> + edges from 0758833: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 plot(g)"},{"path":"https://r.igraph.org/reference/set_vertex_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Set vertex attributes — set_vertex_attr","title":"Set vertex attributes — set_vertex_attr","text":"Set vertex attributes","code":""},{"path":"https://r.igraph.org/reference/set_vertex_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set vertex attributes — set_vertex_attr","text":"","code":"set_vertex_attr(graph, name, index = V(graph), value)"},{"path":"https://r.igraph.org/reference/set_vertex_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set vertex attributes — set_vertex_attr","text":"graph graph. name name attribute set. index optional vertex sequence set attributes subset vertices. value new value attribute (index) vertices. NULL, input returned unchanged.","code":""},{"path":"https://r.igraph.org/reference/set_vertex_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set vertex attributes — set_vertex_attr","text":"graph, vertex attribute added set.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/set_vertex_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set vertex attributes — set_vertex_attr","text":"","code":"g <- make_ring(10) %>% set_vertex_attr(\"label\", value = LETTERS[1:10]) g #> IGRAPH 29c60dd U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), label (v/c) #> + edges from 29c60dd: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 plot(g)"},{"path":"https://r.igraph.org/reference/shapes.html","id":null,"dir":"Reference","previous_headings":"","what":"Various vertex shapes when plotting igraph graphs — shapes","title":"Various vertex shapes when plotting igraph graphs — shapes","text":"Starting version 0.5.1 igraph supports different vertex shapes plotting graphs.","code":""},{"path":"https://r.igraph.org/reference/shapes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Various vertex shapes when plotting igraph graphs — shapes","text":"","code":"shapes(shape = NULL) shape_noclip(coords, el, params, end = c(\"both\", \"from\", \"to\")) shape_noplot(coords, v = NULL, params) add_shape(shape, clip = shape_noclip, plot = shape_noplot, parameters = list())"},{"path":"https://r.igraph.org/reference/shapes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Various vertex shapes when plotting igraph graphs — shapes","text":"shape Character scalar, name vertex shape. NULL shapes(), names defined vertex shapes returned. coords, el, params, end, v See parameters clipping/plotting functions . clip R function object, clipping function. plot R function object, plotting function. parameters Named list, additional plot/vertex/edge parameters. element named define new parameters, elements define default values. Vertex parameters prefix ‘vertex.’, edge parameters prefix ‘edge.’. general plotting parameters prefix ‘plot.’. See Details .","code":""},{"path":"https://r.igraph.org/reference/shapes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Various vertex shapes when plotting igraph graphs — shapes","text":"shapes() returns character vector shape argument NULL. returns named list entries named ‘clip’ ‘plot’, R functions. add_shape() returns TRUE, invisibly. shape_noclip() returns appropriate columns coords argument.","code":""},{"path":"https://r.igraph.org/reference/shapes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Various vertex shapes when plotting igraph graphs — shapes","text":"igraph vertex shape defined two functions: 1) provides information size shape clipping edges 2) plots shape requested. functions called “shape functions” rest manual page. first one clipping function second plotting function. clipping function following arguments: coords matrix four columns, contains coordinates vertices edge list supplied el argument. el matrix two columns, edges end points clipped. number rows coords. params function object can called query vertex/edge/plot graphical parameters. first argument function “vertex”, “edge” “plot” decide type parameter, second character string giving name parameter. E.g. end Character string, gives end points used. Possible values “”, “” “”. “” function expected clip first column el edge list, “” selects second column, “” selects . clipping function return matrix number rows el arguments. end matrix must four columns, otherwise two. matrix contains modified coordinates, clipping applied. plotting function following arguments: coords coordinates vertices, matrix two columns. v ids vertices plot. match number rows coords argument. params clipping function, see . return value plotting function used. shapes() can used list names installed vertex shapes, calling without arguments, setting shape argument NULL. shape name given, clipping plotting functions shape returned named list. add_shape() can used add new vertex shapes igraph. one must give clipping plotting functions new shape. also possible list plot/vertex/edge parameters, parameters argument, clipping /plotting functions can make use . example generic regular polygon shape, can parameter number sides. shape_noclip() simple clipping function user can use shape definitions. clipping, edges drawn exactly listed vertex position coordinates. shape_noplot() simple (probably useful) plotting function, plot anything.","code":"params(\"vertex\", \"size\")"},{"path":"https://r.igraph.org/reference/shapes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Various vertex shapes when plotting igraph graphs — shapes","text":"","code":"# all vertex shapes, minus \"raster\", that might not be available shapes <- setdiff(shapes(), \"\") g <- make_ring(length(shapes)) set.seed(42) plot(g, vertex.shape = shapes, vertex.label = shapes, vertex.label.dist = 1, vertex.size = 15, vertex.size2 = 15, vertex.pie = lapply(shapes, function(x) if (x == \"pie\") 2:6 else 0), vertex.pie.color = list(heat.colors(5)) ) # add new vertex shape, plot nothing with no clipping add_shape(\"nil\") plot(g, vertex.shape = \"nil\") ################################################################# # triangle vertex shape mytriangle <- function(coords, v = NULL, params) { vertex.color <- params(\"vertex\", \"color\") if (length(vertex.color) != 1 && !is.null(v)) { vertex.color <- vertex.color[v] } vertex.size <- 1 / 200 * params(\"vertex\", \"size\") if (length(vertex.size) != 1 && !is.null(v)) { vertex.size <- vertex.size[v] } symbols( x = coords[, 1], y = coords[, 2], bg = vertex.color, stars = cbind(vertex.size, vertex.size, vertex.size), add = TRUE, inches = FALSE ) } # clips as a circle add_shape(\"triangle\", clip = shapes(\"circle\")$clip, plot = mytriangle ) plot(g, vertex.shape = \"triangle\", vertex.color = rainbow(vcount(g)), vertex.size = seq(10, 20, length.out = vcount(g)) ) ################################################################# # generic star vertex shape, with a parameter for number of rays mystar <- function(coords, v = NULL, params) { vertex.color <- params(\"vertex\", \"color\") if (length(vertex.color) != 1 && !is.null(v)) { vertex.color <- vertex.color[v] } vertex.size <- 1 / 200 * params(\"vertex\", \"size\") if (length(vertex.size) != 1 && !is.null(v)) { vertex.size <- vertex.size[v] } norays <- params(\"vertex\", \"norays\") if (length(norays) != 1 && !is.null(v)) { norays <- norays[v] } mapply(coords[, 1], coords[, 2], vertex.color, vertex.size, norays, FUN = function(x, y, bg, size, nor) { symbols( x = x, y = y, bg = bg, stars = matrix(c(size, size / 2), nrow = 1, ncol = nor * 2), add = TRUE, inches = FALSE ) } ) } # no clipping, edges will be below the vertices anyway add_shape(\"star\", clip = shape_noclip, plot = mystar, parameters = list(vertex.norays = 5) ) plot(g, vertex.shape = \"star\", vertex.color = rainbow(vcount(g)), vertex.size = seq(10, 20, length.out = vcount(g)) ) plot(g, vertex.shape = \"star\", vertex.color = rainbow(vcount(g)), vertex.size = seq(10, 20, length.out = vcount(g)), vertex.norays = rep(4:8, length.out = vcount(g)) )"},{"path":"https://r.igraph.org/reference/shortest.paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Shortest (directed or undirected) paths between vertices — shortest.paths","title":"Shortest (directed or undirected) paths between vertices — shortest.paths","text":"shortest.paths() renamed distances() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/shortest.paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shortest (directed or undirected) paths between vertices — shortest.paths","text":"","code":"shortest.paths( graph, v = V(graph), to = V(graph), mode = c(\"all\", \"out\", \"in\"), weights = NULL, algorithm = c(\"automatic\", \"unweighted\", \"dijkstra\", \"bellman-ford\", \"johnson\") )"},{"path":"https://r.igraph.org/reference/shortest.paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shortest (directed or undirected) paths between vertices — shortest.paths","text":"graph graph work . v Numeric vector, vertices shortest paths calculated. Numeric vector, vertices shortest paths calculated. default includes vertices. Note distances() every vertex must included . (required shortest_paths(). mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, graph treated undirected, .e. edge directions taken account. argument ignored undirected graphs. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). weighted graph, length path sum weights constituent edges. algorithm algorithm use calculation. default igraph tries select fastest suitable algorithm. weights, unweighted breadth-first search used, otherwise weights positive, Dijkstra's algorithm used. negative weights calculation 100 sources, Johnson's algorithm used. Otherwise Bellman-Ford algorithm used. can override igraph's choice explicitly giving parameter. Note igraph C core might still override choice obvious cases, .e. edge weights, unweighted algorithm used, regardless argument.","code":""},{"path":"https://r.igraph.org/reference/showtrace.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to deal with the result of network community detection — showtrace","title":"Functions to deal with the result of network community detection — showtrace","text":"showtrace() renamed show_trace() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/showtrace.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to deal with the result of network community detection — showtrace","text":"","code":"showtrace(communities)"},{"path":"https://r.igraph.org/reference/similarity.dice.html","id":null,"dir":"Reference","previous_headings":"","what":"Similarity measures of two vertices (Dice) — similarity.dice","title":"Similarity measures of two vertices (Dice) — similarity.dice","text":"Please use similarity() method = \"dice\" instead.","code":""},{"path":"https://r.igraph.org/reference/similarity.dice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Similarity measures of two vertices (Dice) — similarity.dice","text":"","code":"similarity.dice( graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), loops = FALSE )"},{"path":"https://r.igraph.org/reference/similarity.dice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Similarity measures of two vertices (Dice) — similarity.dice","text":"graph input graph. vids vertex ids similarity calculated. mode type neighboring vertices use calculation, possible values: ‘’, ‘’, ‘’. loops Whether include vertices neighbor sets.","code":""},{"path":"https://r.igraph.org/reference/similarity.html","id":null,"dir":"Reference","previous_headings":"","what":"Similarity measures of two vertices — similarity","title":"Similarity measures of two vertices — similarity","text":"functions calculates similarity scores vertices based connection patterns.","code":""},{"path":"https://r.igraph.org/reference/similarity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Similarity measures of two vertices — similarity","text":"","code":"similarity( graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), loops = FALSE, method = c(\"jaccard\", \"dice\", \"invlogweighted\") )"},{"path":"https://r.igraph.org/reference/similarity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Similarity measures of two vertices — similarity","text":"graph input graph. vids vertex ids similarity calculated. mode type neighboring vertices use calculation, possible values: ‘’, ‘’, ‘’. loops Whether include vertices neighbor sets. method method use.","code":""},{"path":"https://r.igraph.org/reference/similarity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Similarity measures of two vertices — similarity","text":"length(vids) length(vids) numeric matrix containing similarity scores. argument ignored invlogweighted method.","code":""},{"path":"https://r.igraph.org/reference/similarity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Similarity measures of two vertices — similarity","text":"Jaccard similarity coefficient two vertices number common neighbors divided number vertices neighbors least one two vertices considered. jaccard method calculates pairwise Jaccard similarities () vertices. Dice similarity coefficient two vertices twice number common neighbors divided sum degrees vertices. Methof dice calculates pairwise Dice similarities () vertices. inverse log-weighted similarity two vertices number common neighbors, weighted inverse logarithm degrees. based assumption two vertices considered similar share low-degree common neighbor, since high-degree common neighbors likely appear even pure chance. Isolated vertices zero similarity vertex. Self-similarities calculated. See following paper details: Lada . Adamic Eytan Adar: Friends neighbors Web. Social Networks, 25(3):211-230, 2003.","code":""},{"path":"https://r.igraph.org/reference/similarity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Similarity measures of two vertices — similarity","text":"Lada . Adamic Eytan Adar: Friends neighbors Web. Social Networks, 25(3):211-230, 2003.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/similarity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Similarity measures of two vertices — similarity","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com manual page.","code":""},{"path":"https://r.igraph.org/reference/similarity.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Similarity measures of two vertices — similarity","text":"igraph_similarity_jaccard(), igraph_similarity_dice(), igraph_similarity_inverse_log_weighted().","code":""},{"path":"https://r.igraph.org/reference/similarity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Similarity measures of two vertices — similarity","text":"","code":"g <- make_ring(5) similarity(g, method = \"dice\") #> [,1] [,2] [,3] [,4] [,5] #> [1,] 1.0 0.0 0.5 0.5 0.0 #> [2,] 0.0 1.0 0.0 0.5 0.5 #> [3,] 0.5 0.0 1.0 0.0 0.5 #> [4,] 0.5 0.5 0.0 1.0 0.0 #> [5,] 0.0 0.5 0.5 0.0 1.0 similarity(g, method = \"jaccard\") #> [,1] [,2] [,3] [,4] [,5] #> [1,] 1.0000000 0.0000000 0.3333333 0.3333333 0.0000000 #> [2,] 0.0000000 1.0000000 0.0000000 0.3333333 0.3333333 #> [3,] 0.3333333 0.0000000 1.0000000 0.0000000 0.3333333 #> [4,] 0.3333333 0.3333333 0.0000000 1.0000000 0.0000000 #> [5,] 0.0000000 0.3333333 0.3333333 0.0000000 1.0000000"},{"path":"https://r.igraph.org/reference/similarity.invlogweighted.html","id":null,"dir":"Reference","previous_headings":"","what":"Similarity measures of two vertices (inverse log-weighted) — similarity.invlogweighted","title":"Similarity measures of two vertices (inverse log-weighted) — similarity.invlogweighted","text":"Please use similarity() method = \"invlogweighted\" instead.","code":""},{"path":"https://r.igraph.org/reference/similarity.invlogweighted.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Similarity measures of two vertices (inverse log-weighted) — similarity.invlogweighted","text":"","code":"similarity.invlogweighted( graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\") )"},{"path":"https://r.igraph.org/reference/similarity.invlogweighted.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Similarity measures of two vertices (inverse log-weighted) — similarity.invlogweighted","text":"graph input graph. vids vertex ids similarity calculated. mode type neighboring vertices use calculation, possible values: ‘’, ‘’, ‘’.","code":""},{"path":"https://r.igraph.org/reference/similarity.jaccard.html","id":null,"dir":"Reference","previous_headings":"","what":"Similarity measures of two vertices (Jaccard) — similarity.jaccard","title":"Similarity measures of two vertices (Jaccard) — similarity.jaccard","text":"Please use similarity() method = \"jaccard\" instead.","code":""},{"path":"https://r.igraph.org/reference/similarity.jaccard.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Similarity measures of two vertices (Jaccard) — similarity.jaccard","text":"","code":"similarity.jaccard( graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), loops = FALSE )"},{"path":"https://r.igraph.org/reference/similarity.jaccard.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Similarity measures of two vertices (Jaccard) — similarity.jaccard","text":"graph input graph. vids vertex ids similarity calculated. mode type neighboring vertices use calculation, possible values: ‘’, ‘’, ‘’. loops Whether include vertices neighbor sets.","code":""},{"path":"https://r.igraph.org/reference/simplified.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor modifier to drop multiple and loop edges — simplified","title":"Constructor modifier to drop multiple and loop edges — simplified","text":"Constructor modifier drop multiple loop edges","code":""},{"path":"https://r.igraph.org/reference/simplified.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor modifier to drop multiple and loop edges — simplified","text":"","code":"simplified()"},{"path":[]},{"path":"https://r.igraph.org/reference/simplified.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Constructor modifier to drop multiple and loop edges — simplified","text":"","code":"sample_(pa(10, m = 3, algorithm = \"bag\")) #> IGRAPH 8bc3048 D--- 10 27 -- Barabasi graph #> + attr: name (g/c), power (g/n), m (g/n), zero.appeal (g/n), algorithm #> | (g/c) #> + edges from 8bc3048: #> [1] 2->1 2->1 2->1 3->1 3->1 3->2 4->1 4->1 4->1 5->1 5->1 5->1 #> [13] 6->1 6->1 6->2 7->1 7->1 7->1 8->2 8->1 8->1 9->1 9->6 9->2 #> [25] 10->2 10->8 10->1 sample_(pa(10, m = 3, algorithm = \"bag\"), simplified()) #> IGRAPH bffaee1 D--- 10 13 -- Barabasi graph #> + attr: name (g/c), power (g/n), m (g/n), zero.appeal (g/n), algorithm #> | (g/c) #> + edges from bffaee1: #> [1] 2->1 3->1 3->2 4->1 4->2 5->1 5->4 6->1 7->1 8->1 8->2 9->1 #> [13] 10->1"},{"path":"https://r.igraph.org/reference/simplify.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple graphs — simplify","title":"Simple graphs — simplify","text":"Simple graphs graphs contain loop multiple edges.","code":""},{"path":"https://r.igraph.org/reference/simplify.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple graphs — simplify","text":"","code":"simplify( graph, remove.multiple = TRUE, remove.loops = TRUE, edge.attr.comb = igraph_opt(\"edge.attr.comb\") ) is_simple(graph) simplify_and_colorize(graph)"},{"path":"https://r.igraph.org/reference/simplify.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple graphs — simplify","text":"graph graph work . remove.multiple Logical, whether multiple edges removed. remove.loops Logical, whether loop edges removed. edge.attr.comb Specifies edge attributes, remove.multiple=TRUE. case many edges might mapped single one new graph, attributes combined. Please see attribute.combination() details .","code":""},{"path":"https://r.igraph.org/reference/simplify.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simple graphs — simplify","text":"new graph object edges deleted.","code":""},{"path":"https://r.igraph.org/reference/simplify.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simple graphs — simplify","text":"loop edge edge two endpoints vertex. Two edges multiple edges exactly two endpoints (directed graphs order matter). graph simple contain loop edges multiple edges. is_simple() checks whether graph simple. simplify() removes loop /multiple edges graph. remove.loops remove.multiple TRUE function returns simple graph. simplify_and_colorize() constructs new, simple graph graph also sets color attribute vertices edges. colors vertices represent number self-loops originally incident , colors edges represent multiplicities edges original graph. allows one take account edge multiplicities number loop edges VF2 isomorphism algorithm. graph, vertex edge attributes original graph discarded primary purpose function facilitate usage multigraphs VF2 algorithm.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/simplify.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simple graphs — simplify","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/simplify.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Simple graphs — simplify","text":"igraph_simplify(), igraph_is_simple().","code":""},{"path":"https://r.igraph.org/reference/simplify.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simple graphs — simplify","text":"","code":"g <- make_graph(c(1, 2, 1, 2, 3, 3)) is_simple(g) #> [1] FALSE is_simple(simplify(g, remove.loops = FALSE)) #> [1] FALSE is_simple(simplify(g, remove.multiple = FALSE)) #> [1] FALSE is_simple(simplify(g)) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/sir.html","id":null,"dir":"Reference","previous_headings":"","what":"SIR model on graphs — time_bins","title":"SIR model on graphs — time_bins","text":"Run simulations SIR (susceptible-infected-recovered) model, graph","code":""},{"path":"https://r.igraph.org/reference/sir.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"SIR model on graphs — time_bins","text":"","code":"time_bins(x, middle = TRUE) # S3 method for class 'sir' time_bins(x, middle = TRUE) # S3 method for class 'sir' median(x, na.rm = FALSE, ...) # S3 method for class 'sir' quantile(x, comp = c(\"NI\", \"NS\", \"NR\"), prob, ...) sir(graph, beta, gamma, no.sim = 100)"},{"path":"https://r.igraph.org/reference/sir.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"SIR model on graphs — time_bins","text":"x sir object, returned sir() function. middle Logical scalar, whether return middle time bins, boundaries. na.rm Logical scalar, whether ignore NA values. sir objects contain NA values currently, argument effectively ignored. ... Additional arguments, ignored currently. comp Character scalar. component calculate quantile . NI infected agents, NS susceptibles, NR stands recovered. prob Numeric vector probabilities, [0,1], specify quantiles calculate. graph graph run model . directed, edge directions ignored warning given. beta Non-negative scalar. rate infection individual susceptible single infected neighbor. infection rate susceptible individual n infected neighbors n times beta. Formally rate parameter exponential distribution. gamma Positive scalar. rate recovery infected individual. Formally, rate parameter exponential distribution. .sim Integer scalar, number simulation runs perform.","code":""},{"path":"https://r.igraph.org/reference/sir.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"SIR model on graphs — time_bins","text":"sir() results returned object class ‘sir’, list, one element simulation. simulation list following elements. numeric vectors, equal length: times times events. NS number susceptibles population, time. NI number infected individuals population, time. NR number recovered individuals population, time. Function time_bins() returns numeric vector, middle boundaries time bins, depending middle argument. median returns list three named numeric vectors, NS, NI NR. names within vectors created time bins. quantile returns vector median (one, one requested) one quantile requested. multiple quantiles requested, list vectors returned, one quantile.","code":""},{"path":"https://r.igraph.org/reference/sir.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"SIR model on graphs — time_bins","text":"SIR model simple model epidemiology. individuals population might three states: susceptible, infected recovered. Recovered people assumed immune disease. Susceptibles become infected rate depends number infected neighbors. Infected people become recovered constant rate. function sir() simulates model. function runs multiple simulations, starting single uniformly randomly chosen infected individual. simulation stopped infected individuals left. Function time_bins() bins simulation steps, using Freedman-Diaconis heuristics determine bin width. Function median quantile calculate median quantiles results, respectively, bins calculated time_bins().","code":""},{"path":"https://r.igraph.org/reference/sir.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"SIR model on graphs — time_bins","text":"Bailey, Norman T. J. (1975). mathematical theory infectious diseases applications (2nd ed.). London: Griffin.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sir.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"SIR model on graphs — time_bins","text":"Gabor Csardi csardi.gabor@gmail.com. Eric Kolaczyk (http://math.bu.edu/people/kolaczyk/) wrote initial version R.","code":""},{"path":"https://r.igraph.org/reference/sir.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"SIR model on graphs — time_bins","text":"igraph_sir().","code":""},{"path":"https://r.igraph.org/reference/sir.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"SIR model on graphs — time_bins","text":"","code":"g <- sample_gnm(100, 100) sm <- sir(g, beta = 5, gamma = 1) plot(sm)"},{"path":"https://r.igraph.org/reference/spectrum.html","id":null,"dir":"Reference","previous_headings":"","what":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"Calculate selected eigenvalues eigenvectors (supposedly sparse) graph.","code":""},{"path":"https://r.igraph.org/reference/spectrum.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"","code":"spectrum( graph, algorithm = c(\"arpack\", \"auto\", \"lapack\", \"comp_auto\", \"comp_lapack\", \"comp_arpack\"), which = list(), options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/spectrum.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"graph input graph, can directed undirected. algorithm algorithm use. Currently arpack implemented, uses ARPACK solver. See also arpack(). list specify eigenvalues eigenvectors calculate. default leading (.e. largest magnitude) eigenvalue corresponding eigenvector calculated. options Options ARPACK solver. See arpack_defaults().","code":""},{"path":"https://r.igraph.org/reference/spectrum.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"Depends algorithm used. arpack list three entries returned: options See return value arpack() complete description. values Numeric vector, eigenvalues. vectors Numeric matrix, eigenvectors columns.","code":""},{"path":"https://r.igraph.org/reference/spectrum.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"argument list specifies eigenvalues corresponding eigenvectors calculate: eight options: Eigenvalues largest magnitude. Set pos LM, howmany number eigenvalues want. Eigenvalues smallest magnitude. Set pos SM howmany number eigenvalues want. Largest eigenvalues. Set pos LA howmany number eigenvalues want. Smallest eigenvalues. Set pos SA howmany number eigenvalues want. Eigenvalues ends spectrum. Set pos howmany number eigenvalues want. howmany odd, one eigenvalue returned larger end. Selected eigenvalues. (yet) implemented currently. Eigenvalues interval. (yet) implemented. eigenvalues. implemented yet. standard eigen function better job , anyway. Note ARPACK might unstable graphs multiple components, e.g. graphs isolate vertices.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/spectrum.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/spectrum.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"","code":"## Small example graph, leading eigenvector by default kite <- make_graph(\"Krackhardt_kite\") spectrum(kite)[c(\"values\", \"vectors\")] #> $values #> [1] 4.306404 #> #> $vectors #> [,1] #> [1,] -0.35220940 #> [2,] -0.35220940 #> [3,] -0.28583499 #> [4,] -0.48102086 #> [5,] -0.28583499 #> [6,] -0.39769064 #> [7,] -0.39769064 #> [8,] -0.19586058 #> [9,] -0.04807349 #> [10,] -0.01116326 #> ## Double check eigen(as_adjacency_matrix(kite, sparse = FALSE))$vectors[, 1] #> [1] -0.35220940 -0.35220940 -0.28583499 -0.48102086 -0.28583499 -0.39769064 #> [7] -0.39769064 -0.19586058 -0.04807349 -0.01116326 ## Should be the same as 'eigen_centrality' (but rescaled) cor(eigen_centrality(kite)$vector, spectrum(kite)$vectors) #> [,1] #> [1,] -1 ## Smallest eigenvalues spectrum(kite, which = list(pos = \"SM\", howmany = 2))$values #> [1] -0.4043420 0.6403647"},{"path":"https://r.igraph.org/reference/spinglass.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding communities in graphs based on statistical meachanics — spinglass.community","title":"Finding communities in graphs based on statistical meachanics — spinglass.community","text":"spinglass.community() renamed cluster_spinglass() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/spinglass.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding communities in graphs based on statistical meachanics — spinglass.community","text":"","code":"spinglass.community( graph, weights = NULL, vertex = NULL, spins = 25, parupdate = FALSE, start.temp = 1, stop.temp = 0.01, cool.fact = 0.99, update.rule = c(\"config\", \"random\", \"simple\"), gamma = 1, implementation = c(\"orig\", \"neg\"), gamma.minus = 1 )"},{"path":"https://r.igraph.org/reference/spinglass.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding communities in graphs based on statistical meachanics — spinglass.community","text":"graph input graph, can directed direction edges neglected. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. vertex parameter can used calculate community given vertex without calculating communities. Note argument present arguments ignored. spins Integer constant, number spins use. upper limit number communities. problem supply (reasonably) big number , case spin states unpopulated. parupdate Logical constant, whether update spins vertices parallel (synchronously) . argument ignored second form function used (.e. ‘vertex’ argument present). also implemented “neg” implementation. start.temp Real constant, start temperature. argument ignored second form function used (.e. ‘vertex’ argument present). stop.temp Real constant, stop temperature. simulation terminates temperature lowers level. argument ignored second form function used (.e. ‘vertex’ argument present). cool.fact Cooling factor simulated annealing. argument ignored second form function used (.e. ‘vertex’ argument present). update.rule Character constant giving ‘null-model’ simulation. Possible values: “simple” “config”. “simple” uses random graph number edges baseline probability “config” uses random graph vertex degrees input graph. gamma Real constant, gamma argument algorithm. specifies balance importance present non-present edges community. Roughly, comunity set vertices many edges inside community edges outside community. default 1.0 value makes existing non-existing links equally important. Smaller values make existing links, greater values missing links important. implementation Character scalar. Currently igraph contains two implementations Spin-glass community finding algorithm. faster original implementation default. implementation, takes account negative weights, can chosen supplying ‘neg’ . gamma.minus Real constant, gamma.minus parameter algorithm. specifies balance importance present non-present negative weighted edges community. Smaller values gamma.minus, leads communities lesser negative intra-connectivity. argument set zero, algorithm reduces graph coloring algorithm, using number spins number colors. argument ignored ‘orig’ implementation chosen.","code":""},{"path":"https://r.igraph.org/reference/split_join_distance.html","id":null,"dir":"Reference","previous_headings":"","what":"Split-join distance of two community structures — split_join_distance","title":"Split-join distance of two community structures — split_join_distance","text":"split-join distance partitions B sum projection distance B projection distance B . projection distance asymmetric measure defined follows:","code":""},{"path":"https://r.igraph.org/reference/split_join_distance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split-join distance of two community structures — split_join_distance","text":"","code":"split_join_distance(comm1, comm2)"},{"path":"https://r.igraph.org/reference/split_join_distance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split-join distance of two community structures — split_join_distance","text":"comm1 first community structure. comm2 second community structure.","code":""},{"path":"https://r.igraph.org/reference/split_join_distance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split-join distance of two community structures — split_join_distance","text":"Two integer numbers, see details .","code":""},{"path":"https://r.igraph.org/reference/split_join_distance.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Split-join distance of two community structures — split_join_distance","text":"First, set partition evaluated sets partition B. set partition , best matching set partition B found overlap size calculated. (Matching quantified size overlap two sets). , maximal overlap sizes set summed together subtracted number elements . split-join distance returned two numbers, first projection distance first partition second, second number projection distance second partition first. makes easier detect whether partition subpartition , since case, corresponding distance zero.","code":""},{"path":"https://r.igraph.org/reference/split_join_distance.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Split-join distance of two community structures — split_join_distance","text":"van Dongen S: Performance criteria graph clustering Markov cluster experiments. Technical Report INS-R0012, National Research Institute Mathematics Computer Science Netherlands, Amsterdam, May 2000.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/stCuts.html","id":null,"dir":"Reference","previous_headings":"","what":"List all (s,t)-cuts of a graph — stCuts","title":"List all (s,t)-cuts of a graph — stCuts","text":"stCuts() renamed st_cuts() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/stCuts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all (s,t)-cuts of a graph — stCuts","text":"","code":"stCuts(graph, source, target)"},{"path":"https://r.igraph.org/reference/stCuts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List all (s,t)-cuts of a graph — stCuts","text":"graph input graph. must directed. source source vertex. target target vertex.","code":""},{"path":"https://r.igraph.org/reference/stMincuts.html","id":null,"dir":"Reference","previous_headings":"","what":"List all minimum \\((s,t)\\)-cuts of a graph — stMincuts","title":"List all minimum \\((s,t)\\)-cuts of a graph — stMincuts","text":"stMincuts() renamed st_min_cuts() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/stMincuts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all minimum \\((s,t)\\)-cuts of a graph — stMincuts","text":"","code":"stMincuts(graph, source, target, capacity = NULL)"},{"path":"https://r.igraph.org/reference/stMincuts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List all minimum \\((s,t)\\)-cuts of a graph — stMincuts","text":"graph input graph. must directed. source id source vertex. target id target vertex. capacity Numeric vector giving edge capacities. NULL graph weight edge attribute, attribute defines edge capacities. forcing unit edge capacities, even graphs weight edge attribute, supply NA .","code":""},{"path":"https://r.igraph.org/reference/st_cuts.html","id":null,"dir":"Reference","previous_headings":"","what":"List all (s,t)-cuts of a graph — st_cuts","title":"List all (s,t)-cuts of a graph — st_cuts","text":"List (s,t)-cuts directed graph.","code":""},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all (s,t)-cuts of a graph — st_cuts","text":"","code":"st_cuts(graph, source, target)"},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List all (s,t)-cuts of a graph — st_cuts","text":"graph input graph. must directed. source source vertex. target target vertex.","code":""},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List all (s,t)-cuts of a graph — st_cuts","text":"list entries: cuts list numeric vectors containing edge ids. vector \\((s,t)\\)-cut. partition1s list numeric vectors containing vertex ids, correspond edge cuts. vertex set generator corresponding cut, .e. graph \\(G=(V,E)\\), vertex set \\(X\\) complementer \\(V-X\\), generates cut contains exactly edges go \\(X\\) \\(V-X\\).","code":""},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List all (s,t)-cuts of a graph — st_cuts","text":"Given \\(G\\) directed graph two, different non-ajacent vertices, \\(s\\) \\(t\\), \\((s,t)\\)-cut set edges, removing edges \\(G\\) directed path \\(s\\) \\(t\\).","code":""},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"List all (s,t)-cuts of a graph — st_cuts","text":"JS Provan DR Shier: Paradigm listing (s,t)-cuts graphs, Algorithmica 15, 351–372, 1996.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"List all (s,t)-cuts of a graph — st_cuts","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"List all (s,t)-cuts of a graph — st_cuts","text":"igraph_all_st_cuts().","code":""},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List all (s,t)-cuts of a graph — st_cuts","text":"","code":"# A very simple graph g <- graph_from_literal(a -+ b -+ c -+ d -+ e) st_cuts(g, source = \"a\", target = \"e\") #> $cuts #> $cuts[[1]] #> + 1/4 edge from d798d1c (vertex names): #> [1] a->b #> #> $cuts[[2]] #> + 1/4 edge from d798d1c (vertex names): #> [1] b->c #> #> $cuts[[3]] #> + 1/4 edge from d798d1c (vertex names): #> [1] c->d #> #> $cuts[[4]] #> + 1/4 edge from d798d1c (vertex names): #> [1] d->e #> #> #> $partition1s #> $partition1s[[1]] #> + 1/5 vertex, named, from d798d1c: #> [1] a #> #> $partition1s[[2]] #> + 2/5 vertices, named, from d798d1c: #> [1] a b #> #> $partition1s[[3]] #> + 3/5 vertices, named, from d798d1c: #> [1] a b c #> #> $partition1s[[4]] #> + 4/5 vertices, named, from d798d1c: #> [1] a b c d #> #> # A somewhat more difficult graph g2 <- graph_from_literal( s --+ a:b, a:b --+ t, a --+ 1:2:3, 1:2:3 --+ b ) st_cuts(g2, source = \"s\", target = \"t\") #> $cuts #> $cuts[[1]] #> + 2/10 edges from 5505418 (vertex names): #> [1] s->a s->b #> #> $cuts[[2]] #> + 2/10 edges from 5505418 (vertex names): #> [1] s->a b->t #> #> $cuts[[3]] #> + 5/10 edges from 5505418 (vertex names): #> [1] s->b a->t a->1 a->2 a->3 #> #> $cuts[[4]] #> + 5/10 edges from 5505418 (vertex names): #> [1] s->b a->t a->1 a->2 3->b #> #> $cuts[[5]] #> + 5/10 edges from 5505418 (vertex names): #> [1] s->b a->t a->1 a->3 2->b #> #> $cuts[[6]] #> + 5/10 edges from 5505418 (vertex names): #> [1] s->b a->t a->1 2->b 3->b #> #> $cuts[[7]] #> + 5/10 edges from 5505418 (vertex names): #> [1] s->b a->t a->2 a->3 1->b #> #> $cuts[[8]] #> + 5/10 edges from 5505418 (vertex names): #> [1] s->b a->t a->2 1->b 3->b #> #> $cuts[[9]] #> + 5/10 edges from 5505418 (vertex names): #> [1] s->b a->t a->3 1->b 2->b #> #> $cuts[[10]] #> + 5/10 edges from 5505418 (vertex names): #> [1] s->b a->t 1->b 2->b 3->b #> #> $cuts[[11]] #> + 2/10 edges from 5505418 (vertex names): #> [1] a->t b->t #> #> #> $partition1s #> $partition1s[[1]] #> + 1/7 vertex, named, from 5505418: #> [1] s #> #> $partition1s[[2]] #> + 2/7 vertices, named, from 5505418: #> [1] s b #> #> $partition1s[[3]] #> + 2/7 vertices, named, from 5505418: #> [1] s a #> #> $partition1s[[4]] #> + 3/7 vertices, named, from 5505418: #> [1] s a 3 #> #> $partition1s[[5]] #> + 3/7 vertices, named, from 5505418: #> [1] s a 2 #> #> $partition1s[[6]] #> + 4/7 vertices, named, from 5505418: #> [1] s a 2 3 #> #> $partition1s[[7]] #> + 3/7 vertices, named, from 5505418: #> [1] s a 1 #> #> $partition1s[[8]] #> + 4/7 vertices, named, from 5505418: #> [1] s a 1 3 #> #> $partition1s[[9]] #> + 4/7 vertices, named, from 5505418: #> [1] s a 1 2 #> #> $partition1s[[10]] #> + 5/7 vertices, named, from 5505418: #> [1] s a 1 2 3 #> #> $partition1s[[11]] #> + 6/7 vertices, named, from 5505418: #> [1] s a 1 2 3 b #> #>"},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":null,"dir":"Reference","previous_headings":"","what":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"Listing minimum \\((s,t)\\)-cuts directed graph, given \\(s\\) \\(t\\).","code":""},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"","code":"st_min_cuts(graph, source, target, capacity = NULL)"},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"graph input graph. must directed. source id source vertex. target id target vertex. capacity Numeric vector giving edge capacities. NULL graph weight edge attribute, attribute defines edge capacities. forcing unit edge capacities, even graphs weight edge attribute, supply NA .","code":""},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"list entries: value Numeric scalar, size minimum cut(s). cuts list numeric vectors containing edge ids. vector minimum \\((s,t)\\)-cut. partition1s list numeric vectors containing vertex ids, correspond edge cuts. vertex set generator corresponding cut, .e. graph \\(G=(V,E)\\), vertex set \\(X\\) complementer \\(V-X\\), generates cut contains exactly edges go \\(X\\) \\(V-X\\).","code":""},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"Given \\(G\\) directed graph two, different non-ajacent vertices, \\(s\\) \\(t\\), \\((s,t)\\)-cut set edges, removing edges \\(G\\) directed path \\(s\\) \\(t\\). size \\((s,t)\\)-cut defined sum capacities (weights) cut. unweighted (=equally weighted) graphs, simply number edges. \\((s,t)\\)-cut minimum smallest possible size.","code":""},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"JS Provan DR Shier: Paradigm listing (s,t)-cuts graphs, Algorithmica 15, 351–372, 1996.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"igraph_all_st_mincuts().","code":""},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"","code":"# A difficult graph, from the Provan-Shier paper g <- graph_from_literal( s --+ a:b, a:b --+ t, a --+ 1:2:3:4:5, 1:2:3:4:5 --+ b ) st_min_cuts(g, source = \"s\", target = \"t\") #> $value #> [1] 2 #> #> $cuts #> $cuts[[1]] #> + 2/14 edges from dea04fc (vertex names): #> [1] s->a s->b #> #> $cuts[[2]] #> + 2/14 edges from dea04fc (vertex names): #> [1] s->a b->t #> #> $cuts[[3]] #> + 2/14 edges from dea04fc (vertex names): #> [1] a->t b->t #> #> #> $partition1s #> $partition1s[[1]] #> + 1/9 vertex, named, from dea04fc: #> [1] s #> #> $partition1s[[2]] #> + 2/9 vertices, named, from dea04fc: #> [1] s b #> #> $partition1s[[3]] #> + 8/9 vertices, named, from dea04fc: #> [1] s b a 5 4 3 2 1 #> #>"},{"path":"https://r.igraph.org/reference/static.fitness.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Random graphs from vertex fitness scores — static.fitness.game","title":"Random graphs from vertex fitness scores — static.fitness.game","text":"static.fitness.game() renamed sample_fitness() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/static.fitness.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random graphs from vertex fitness scores — static.fitness.game","text":"","code":"static.fitness.game( no.of.edges, fitness.out, fitness.in = NULL, loops = FALSE, multiple = FALSE )"},{"path":"https://r.igraph.org/reference/static.fitness.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random graphs from vertex fitness scores — static.fitness.game","text":"..edges number edges generated graph. fitness.numeric vector containing fitness vertex. directed graphs, specifies -fitness vertex. fitness.NULL (default), generated graph undirected. NULL, numeric vector specifies -fitness vertex. argument NULL, directed graph generated, otherwise undirected one. loops Logical scalar, whether allow loop edges graph. multiple Logical scalar, whether allow multiple edges graph.","code":""},{"path":"https://r.igraph.org/reference/static.power.law.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Scale-free random graphs, from vertex fitness scores — static.power.law.game","title":"Scale-free random graphs, from vertex fitness scores — static.power.law.game","text":"static.power.law.game() renamed sample_fitness_pl() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/static.power.law.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scale-free random graphs, from vertex fitness scores — static.power.law.game","text":"","code":"static.power.law.game( no.of.nodes, no.of.edges, exponent.out, exponent.in = -1, loops = FALSE, multiple = FALSE, finite.size.correction = TRUE )"},{"path":"https://r.igraph.org/reference/static.power.law.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scale-free random graphs, from vertex fitness scores — static.power.law.game","text":"..nodes number vertices generated graph. ..edges number edges generated graph. exponent.Numeric scalar, power law exponent degree distribution. directed graphs, specifies exponent -degree distribution. must greater equal 2. pass Inf , get back Erdős-Rényi random network. exponent.Numeric scalar. negative, generated graph undirected. greater equal 2, argument specifies exponent -degree distribution. non-negative less 2, error generated. loops Logical scalar, whether allow loop edges generated graph. multiple Logical scalar, whether allow multiple edges generated graph. finite.size.correction Logical scalar, whether use proposed finite size correction Cho et al., see references .","code":""},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Stochastic matrix of a graph — stochastic_matrix","title":"Stochastic matrix of a graph — stochastic_matrix","text":"Retrieves stochastic matrix graph class igraph.","code":""},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stochastic matrix of a graph — stochastic_matrix","text":"","code":"stochastic_matrix( graph, column.wise = FALSE, sparse = igraph_opt(\"sparsematrices\") )"},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stochastic matrix of a graph — stochastic_matrix","text":"graph input graph. Must class igraph. column.wise FALSE, rows stochastic matrix sum one; otherwise columns. sparse Logical scalar, whether return sparse matrix. Matrix package needed sparse matrices.","code":""},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Stochastic matrix of a graph — stochastic_matrix","text":"regular matrix matrix class Matrix sparse argument TRUE.","code":""},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Stochastic matrix of a graph — stochastic_matrix","text":"Let \\(M\\) \\(n \\times n\\) adjacency matrix real non-negative entries. Let us define \\(D = \\textrm{diag}(\\sum_{}M_{1i}, \\dots, \\sum_{}M_{ni})\\) (row) stochastic matrix defined $$W = D^{-1}M,$$ assumed \\(D\\) non-singular. Column stochastic matrices defined symmetric way.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Stochastic matrix of a graph — stochastic_matrix","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Stochastic matrix of a graph — stochastic_matrix","text":"","code":"library(Matrix) ## g is a large sparse graph g <- sample_pa(n = 10^5, power = 2, directed = FALSE) W <- stochastic_matrix(g, sparse = TRUE) ## a dense matrix here would probably not fit in the memory class(W) #> [1] \"dgCMatrix\" #> attr(,\"package\") #> [1] \"Matrix\" ## may not be exactly 1, due to numerical errors max(abs(rowSums(W)) - 1) #> [1] 5.651035e-13"},{"path":"https://r.igraph.org/reference/strength.html","id":null,"dir":"Reference","previous_headings":"","what":"Strength or weighted vertex degree — strength","title":"Strength or weighted vertex degree — strength","text":"Summing edge weights adjacent edges vertex.","code":""},{"path":"https://r.igraph.org/reference/strength.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Strength or weighted vertex degree — strength","text":"","code":"strength( graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), loops = TRUE, weights = NULL )"},{"path":"https://r.igraph.org/reference/strength.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Strength or weighted vertex degree — strength","text":"graph input graph. vids vertices strength calculated. mode Character string, “” -degree, “” -degree “” sum two. undirected graphs argument ignored. loops Logical; whether loop edges also counted. weights Weight vector. graph weight edge attribute, used default. graph weight edge attribute argument NULL, degree() called. NA, edge weights used (even graph weight edge attribute).","code":""},{"path":"https://r.igraph.org/reference/strength.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Strength or weighted vertex degree — strength","text":"numeric vector giving strength vertices.","code":""},{"path":"https://r.igraph.org/reference/strength.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Strength or weighted vertex degree — strength","text":"Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras, Alessandro Vespignani: architecture complex weighted networks, Proc. Natl. Acad. Sci. USA 101, 3747 (2004)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/strength.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Strength or weighted vertex degree — strength","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/strength.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Strength or weighted vertex degree — strength","text":"igraph_strength().","code":""},{"path":"https://r.igraph.org/reference/strength.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Strength or weighted vertex degree — strength","text":"","code":"g <- make_star(10) E(g)$weight <- seq(ecount(g)) strength(g) #> [1] 45 1 2 3 4 5 6 7 8 9 strength(g, mode = \"out\") #> [1] 0 1 2 3 4 5 6 7 8 9 strength(g, mode = \"in\") #> [1] 45 0 0 0 0 0 0 0 0 0 # No weights g <- make_ring(10) strength(g) #> [1] 2 2 2 2 2 2 2 2 2 2"},{"path":"https://r.igraph.org/reference/sub-.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Query and manipulate a graph as it were an adjacency matrix — [.igraph","title":"Query and manipulate a graph as it were an adjacency matrix — [.igraph","text":"Query manipulate graph adjacency matrix","code":""},{"path":"https://r.igraph.org/reference/sub-.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query and manipulate a graph as it were an adjacency matrix — [.igraph","text":"","code":"# S3 method for class 'igraph' `[`( x, i, j, ..., from, to, sparse = igraph_opt(\"sparsematrices\"), edges = FALSE, drop = TRUE, attr = if (is_weighted(x)) \"weight\" else NULL )"},{"path":"https://r.igraph.org/reference/sub-.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query and manipulate a graph as it were an adjacency matrix — [.igraph","text":"x graph. Index. Vertex ids names logical vectors. See details . j Index. Vertex ids names logical vectors. See details . ... Currently ignored. numeric character vector giving vertex ids names. Together argument, can used query/set sequence edges. See details . argument present together j arguments present, argument must present well. numeric character vector giving vertex ids names. Together argument, can used query/set sequence edges. See details . argument present together j arguments present, argument must present well. sparse Logical scalar, whether return sparse matrices. edges Logical scalar, whether return edge ids. drop Ignored. attr NULL, name edge attribute. attribute queried returned.","code":""},{"path":"https://r.igraph.org/reference/sub-.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query and manipulate a graph as it were an adjacency matrix — [.igraph","text":"scalar matrix. See details .","code":""},{"path":"https://r.igraph.org/reference/sub-.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Query and manipulate a graph as it were an adjacency matrix — [.igraph","text":"single bracket indexes (possibly weighted) adjacency matrix graph. can : Check whether edge two vertices (\\(v\\) \\(w\\)) graph: numeric scalar returned, one edge exists, zero otherwise. Extract (sparse) adjacency matrix graph, part : first variants returns full adjacency matrix, two return part . arguments can used check existence many edges. case, must present must length. must contain vertex ids names. numeric vector returned, length , contains ones existing edges edges zeros non-existing ones. Example: . weighted graphs, [ operator returns edge weights. non-esistent edges zero weights returned. edge attributes can queried well, giving attr argument. Querying edge ids instead existance edges edge attributes. E.g. returns id edge vertices 1 2, zero edge. Adding one edges graph. element(s) imaginary adjacency matrix must set non-zero numeric value (TRUE): affect edges already present graph, .e. multiple edges created. Adding weighted edges graph. attr argument contains name edge attribute set, ‘weight’: edge already present network, weights attribute updated. graph already weighted, attr=\"weight\" setting implicit, one need give explicitly. Deleting edges. replacement syntax allow deletion edges, specifying FALSE NULL replacement value: removes edge vertex \\(v\\) vertex \\(w\\). can used delete edges two sets vertices, either pairwise: : \\(v\\) \\(w\\) vectors edge ids names. ‘[’ allows logical indices negative indices well, usual R semantics. E.g. adds edge every isolate vertex vertex one, creates star graph. course, indexing operators support vertex names, instead numeric vertex id vertex can also given ‘[’ ‘[[’.","code":"graph[v, w] graph[] graph[1:3,5:6] graph[c(1,3,5),] graph[from=1:3, to=c(2,3,5)] graph[1, 2, edges=TRUE] graph[1, 2] <- 1 graph[1:3,1] <- 1 graph[from=1:3, to=c(2,3,5)] <- TRUE graph[1, 2, attr=\"weight\"]<- 5 graph[from=1:3, to=c(2,3,5)] <- c(1,-1,4) graph[v, w] <- FALSE graph[from=v, to=w] <- FALSE graph[v, w] <- FALSE graph[degree(graph)==0, 1] <- 1 G <- make_empty_graph(10) G[-1,1] <- TRUE"},{"path":[]},{"path":"https://r.igraph.org/reference/sub-sub-.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Query and manipulate a graph as it were an adjacency list — [[.igraph","title":"Query and manipulate a graph as it were an adjacency list — [[.igraph","text":"Query manipulate graph adjacency list","code":""},{"path":"https://r.igraph.org/reference/sub-sub-.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query and manipulate a graph as it were an adjacency list — [[.igraph","text":"","code":"# S3 method for class 'igraph' x[[i, j, from, to, ..., directed = TRUE, edges = FALSE, exact = TRUE]]"},{"path":"https://r.igraph.org/reference/sub-sub-.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query and manipulate a graph as it were an adjacency list — [[.igraph","text":"x graph. Index, integer, character logical, see details . j Index, integer, character logical, see details . numeric character vector giving vertex ids names. Together argument, can used query/set sequence edges. See details . argument present together j arguments present, argument must present well. numeric character vector giving vertex ids names. Together argument, can used query/set sequence edges. See details . argument present together j arguments present, argument must present well. ... Additional arguments used currently. directed Logical scalar, whether consider edge directions directed graphs. ignored undirected graphs. edges Logical scalar, whether return edge ids. exact Ignored.","code":""},{"path":"https://r.igraph.org/reference/sub-sub-.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Query and manipulate a graph as it were an adjacency list — [[.igraph","text":"double bracket operator indexes (imaginary) adjacency list graph. can used following operations: Querying adjacent vertices one vertices: first form gives successors, second predecessors 1:3 vertices. (undirected graphs equivalent.) Querying incident edges one vertices, edges argument set TRUE: Querying edge ids two sets vertices, indices used. E.g. gives edge ids edges exist vertices \\(v\\) vertices \\(w\\). alternative argument names can used instead usual j, make code readable: ‘[[’ operators allows logical indices negative indices well, usual R semantics. Vertex names also supported, instead numeric vertex id vertex can also given ‘[’ ‘[[’.","code":"graph[[1:3,]] graph[[,1:3]] graph[[1:3, , edges=TRUE]] graph[[, 1:3, edges=TRUE]] graph[[v, w, edges=TRUE]] graph[[from = 1:3]] graph[[from = v, to = w, edges = TRUE]]"},{"path":[]},{"path":"https://r.igraph.org/reference/subcomponent.html","id":null,"dir":"Reference","previous_headings":"","what":"In- or out- component of a vertex — subcomponent","title":"In- or out- component of a vertex — subcomponent","text":"Finds vertices reachable given vertex, opposite: vertices given vertex reachable via directed path.","code":""},{"path":"https://r.igraph.org/reference/subcomponent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"In- or out- component of a vertex — subcomponent","text":"","code":"subcomponent(graph, v, mode = c(\"all\", \"out\", \"in\"))"},{"path":"https://r.igraph.org/reference/subcomponent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"In- or out- component of a vertex — subcomponent","text":"graph graph analyze. v vertex start search . mode Character string, either “”, “” “”. “” vertices v reachable listed. “” vertices reachable v returned. “” returns union . ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/subcomponent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"In- or out- component of a vertex — subcomponent","text":"Numeric vector, ids vertices component v.","code":""},{"path":"https://r.igraph.org/reference/subcomponent.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"In- or out- component of a vertex — subcomponent","text":"breadth-first search conducted starting vertex v.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/subcomponent.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"In- or out- component of a vertex — subcomponent","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/subcomponent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"In- or out- component of a vertex — subcomponent","text":"","code":"g <- sample_gnp(100, 1 / 200) subcomponent(g, 1, \"in\") #> + 1/100 vertex, from b217a90: #> [1] 1 subcomponent(g, 1, \"out\") #> + 1/100 vertex, from b217a90: #> [1] 1 subcomponent(g, 1, \"all\") #> + 1/100 vertex, from b217a90: #> [1] 1"},{"path":"https://r.igraph.org/reference/subgraph.centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Find subgraph centrality scores of network positions — subgraph.centrality","title":"Find subgraph centrality scores of network positions — subgraph.centrality","text":"subgraph.centrality() renamed subgraph_centrality() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/subgraph.centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find subgraph centrality scores of network positions — subgraph.centrality","text":"","code":"subgraph.centrality(graph, diag = FALSE)"},{"path":"https://r.igraph.org/reference/subgraph.centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find subgraph centrality scores of network positions — subgraph.centrality","text":"graph input graph. treated undirected. diag Boolean scalar, whether include diagonal adjacency matrix analysis. Giving FALSE effectively eliminates loops edges graph calculation.","code":""},{"path":"https://r.igraph.org/reference/subgraph.edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Subgraph of a graph — subgraph.edges","title":"Subgraph of a graph — subgraph.edges","text":"subgraph.edges() renamed subgraph_from_edges() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/subgraph.edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subgraph of a graph — subgraph.edges","text":"","code":"subgraph.edges(graph, eids, delete.vertices = TRUE)"},{"path":"https://r.igraph.org/reference/subgraph.edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subgraph of a graph — subgraph.edges","text":"graph original graph. eids edge ids edges kept result graph. delete.vertices Logical scalar, whether remove vertices adjacent edges eids.","code":""},{"path":"https://r.igraph.org/reference/subgraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Subgraph of a graph — subgraph","title":"Subgraph of a graph — subgraph","text":"subgraph() creates subgraph graph, containing specified vertices edges among .","code":""},{"path":"https://r.igraph.org/reference/subgraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subgraph of a graph — subgraph","text":"","code":"subgraph(graph, vids) induced_subgraph( graph, vids, impl = c(\"auto\", \"copy_and_delete\", \"create_from_scratch\") ) subgraph_from_edges(graph, eids, delete.vertices = TRUE)"},{"path":"https://r.igraph.org/reference/subgraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subgraph of a graph — subgraph","text":"graph original graph. vids Numeric vector, vertices original graph form subgraph. impl Character scalar, choose two implementation subgraph calculation. ‘copy_and_delete’ copies graph first, deletes vertices edges included result graph. ‘create_from_scratch’ searches vertices edges must kept uses create graph scratch. ‘auto’ chooses two implementations automatically, using heuristics based size original result graph. eids edge ids edges kept result graph. delete.vertices Logical scalar, whether remove vertices adjacent edges eids.","code":""},{"path":"https://r.igraph.org/reference/subgraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subgraph of a graph — subgraph","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/subgraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Subgraph of a graph — subgraph","text":"induced_subgraph() calculates induced subgraph set vertices graph. means exactly specified vertices edges kept result graph. subgraph_from_edges() calculates subgraph graph. function one can specify vertices edges keep. function renamed subgraph() next major version igraph. subgraph() function currently induced_subgraph() (assuming ‘auto’ impl argument), behaviour deprecated. next major version, subgraph() overtake functionality subgraph_from_edges().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/subgraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subgraph of a graph — subgraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/subgraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subgraph of a graph — subgraph","text":"","code":"g <- make_ring(10) g2 <- induced_subgraph(g, 1:7) g3 <- subgraph_from_edges(g, 1:5)"},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Find subgraph centrality scores of network positions — subgraph_centrality","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"Subgraph centrality vertex measures number subgraphs vertex participates , weighting according size.","code":""},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"","code":"subgraph_centrality(graph, diag = FALSE)"},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"graph input graph. treated undirected. diag Boolean scalar, whether include diagonal adjacency matrix analysis. Giving FALSE effectively eliminates loops edges graph calculation.","code":""},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"numeric vector, subgraph centrality scores vertices.","code":""},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"subgraph centrality vertex defined number closed walks originating vertex, longer walks downweighted factorial length. Currently calculation performed explicitly calculating eigenvalues eigenvectors adjacency matrix graph. effectively means measure can calculated small graphs.","code":""},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"Ernesto Estrada, Juan . Rodriguez-Velazquez: Subgraph centrality Complex Networks. Physical Review E 71, 056103 (2005).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"Gabor Csardi csardi.gabor@gmail.com based Matlab code Ernesto Estrada","code":""},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"","code":"g <- sample_pa(100, m = 4, dir = FALSE) sc <- subgraph_centrality(g) cor(degree(g), sc) #> [1] 0.929038"},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"Decide graph subgraph isomorphic another one","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"","code":"subgraph_isomorphic(pattern, target, method = c(\"auto\", \"lad\", \"vf2\"), ...) is_subgraph_isomorphic_to( pattern, target, method = c(\"auto\", \"lad\", \"vf2\"), ... )"},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"pattern smaller graph, might directed undirected. Undirected graphs treated directed graphs mutual edges. target bigger graph, might directed undirected. Undirected graphs treated directed graphs mutual edges. method method use. Possible values: ‘auto’, ‘lad’, ‘vf2’. See details . ... Additional arguments, passed various methods.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"Logical scalar, TRUE pattern isomorphic (possibly induced) subgraph target.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"-auto-method","dir":"Reference","previous_headings":"","what":"‘auto’ method","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"method currently selects ‘lad’, always, seems superior graphs.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"-lad-method","dir":"Reference","previous_headings":"","what":"‘lad’ method","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"LAD algorithm Solnon, see reference . following extra arguments: domains NULL, specifies matching restrictions. must list target vertex sets, given numeric vertex ids symbolic vertex names. length list must vcount(pattern) vertex pattern gives allowed matching vertices target. Defaults NULL. induced Logical scalar, whether search induced subgraph. FALSE default. time.limit processor time limit computation, seconds. defaults Inf, means limit.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"-vf-method","dir":"Reference","previous_headings":"","what":"‘vf2’ method","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"method uses VF2 algorithm Cordella, Foggia et al., see references . supports vertex edge colors following extra arguments: vertex.color1, vertex.color2 Optional integer vectors giving colors vertices colored graph isomorphism. given, graph “color” vertex attribute, used. want ignore attributes, supply NULL arguments. See also examples . edge.color1, edge.color2 Optional integer vectors giving colors edges edge-colored (sub)graph isomorphism. given, graph “color” edge attribute, used. want ignore attributes, supply NULL arguments.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"LP Cordella, P Foggia, C Sansone, M Vento: improved algorithm matching large graphs, Proc. 3rd IAPR TC-15 Workshop Graphbased Representations Pattern Recognition, 149–159, 2001. C. Solnon: AllDifferent-based Filtering Subgraph Isomorphism, Artificial Intelligence 174(12-13):850–864, 2010.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"","code":"# A LAD example pattern <- make_graph( ~ 1:2:3:4:5, 1 - 2:5, 2 - 1:5:3, 3 - 2:4, 4 - 3:5, 5 - 4:2:1 ) target <- make_graph( ~ 1:2:3:4:5:6:7:8:9, 1 - 2:5:7, 2 - 1:5:3, 3 - 2:4, 4 - 3:5:6:8:9, 5 - 1:2:4:6:7, 6 - 7:5:4:9, 7 - 1:5:6, 8 - 4:9, 9 - 6:4:8 ) domains <- list( `1` = c(1, 3, 9), `2` = c(5, 6, 7, 8), `3` = c(2, 4, 6, 7, 8, 9), `4` = c(1, 3, 9), `5` = c(2, 4, 8, 9) ) subgraph_isomorphisms(pattern, target) #> [[1]] #> + 5/9 vertices, named, from ed3052d: #> [1] 2 1 7 6 5 #> #> [[2]] #> + 5/9 vertices, named, from ed3052d: #> [1] 1 2 3 4 5 #> #> [[3]] #> + 5/9 vertices, named, from ed3052d: #> [1] 6 4 3 2 5 #> #> [[4]] #> + 5/9 vertices, named, from ed3052d: #> [1] 8 4 5 6 9 #> #> [[5]] #> + 5/9 vertices, named, from ed3052d: #> [1] 5 4 8 9 6 #> #> [[6]] #> + 5/9 vertices, named, from ed3052d: #> [1] 9 4 5 7 6 #> #> [[7]] #> + 5/9 vertices, named, from ed3052d: #> [1] 1 5 4 6 7 #> #> [[8]] #> + 5/9 vertices, named, from ed3052d: #> [1] 1 5 4 3 2 #> #> [[9]] #> + 5/9 vertices, named, from ed3052d: #> [1] 4 5 1 7 6 #> #> [[10]] #> + 5/9 vertices, named, from ed3052d: #> [1] 7 5 4 9 6 #> #> [[11]] #> + 5/9 vertices, named, from ed3052d: #> [1] 6 5 2 3 4 #> #> [[12]] #> + 5/9 vertices, named, from ed3052d: #> [1] 6 5 2 1 7 #> #> [[13]] #> + 5/9 vertices, named, from ed3052d: #> [1] 2 5 6 7 1 #> #> [[14]] #> + 5/9 vertices, named, from ed3052d: #> [1] 9 6 7 5 4 #> #> [[15]] #> + 5/9 vertices, named, from ed3052d: #> [1] 5 6 9 8 4 #> #> [[16]] #> + 5/9 vertices, named, from ed3052d: #> [1] 4 6 7 1 5 #> #> [[17]] #> + 5/9 vertices, named, from ed3052d: #> [1] 7 6 9 4 5 #> #> [[18]] #> + 5/9 vertices, named, from ed3052d: #> [1] 1 7 6 4 5 #> #> [[19]] #> + 5/9 vertices, named, from ed3052d: #> [1] 6 7 1 2 5 #> #> [[20]] #> + 5/9 vertices, named, from ed3052d: #> [1] 8 9 6 5 4 #> subgraph_isomorphisms(pattern, target, induced = TRUE) #> [[1]] #> + 5/9 vertices, named, from ed3052d: #> [1] 1 2 3 4 5 #> #> [[2]] #> + 5/9 vertices, named, from ed3052d: #> [1] 6 4 3 2 5 #> #> [[3]] #> + 5/9 vertices, named, from ed3052d: #> [1] 6 5 2 3 4 #> #> [[4]] #> + 5/9 vertices, named, from ed3052d: #> [1] 1 5 4 3 2 #> subgraph_isomorphisms(pattern, target, domains = domains) #> [[1]] #> + 5/9 vertices, named, from ed3052d: #> [1] 1 5 4 3 2 #> # Directed LAD example pattern <- make_graph(~ 1:2:3, 1 -+ 2:3) dring <- make_ring(10, directed = TRUE) subgraph_isomorphic(pattern, dring) #> [1] FALSE"},{"path":"https://r.igraph.org/reference/subgraph_isomorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","title":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","text":"isomorphic mappings graph subgraphs another graph","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","text":"","code":"subgraph_isomorphisms(pattern, target, method = c(\"lad\", \"vf2\"), ...)"},{"path":"https://r.igraph.org/reference/subgraph_isomorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","text":"pattern smaller graph, might directed undirected. Undirected graphs treated directed graphs mutual edges. target bigger graph, might directed undirected. Undirected graphs treated directed graphs mutual edges. method method use. Possible values: ‘auto’, ‘lad’, ‘vf2’. See details . ... Additional arguments, passed various methods.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphisms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","text":"list vertex sequences, corresponding mappings first graph second.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphisms.html","id":"-lad-method","dir":"Reference","previous_headings":"","what":"‘lad’ method","title":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","text":"LAD algorithm Solnon, see reference . following extra arguments: domains NULL, specifies matching restrictions. must list target vertex sets, given numeric vertex ids symbolic vertex names. length list must vcount(pattern) vertex pattern gives allowed matching vertices target. Defaults NULL. induced Logical scalar, whether search induced subgraph. FALSE default. time.limit processor time limit computation, seconds. defaults Inf, means limit.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphisms.html","id":"-vf-method","dir":"Reference","previous_headings":"","what":"‘vf2’ method","title":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","text":"method uses VF2 algorithm Cordella, Foggia et al., see references . supports vertex edge colors following extra arguments: vertex.color1, vertex.color2 Optional integer vectors giving colors vertices colored graph isomorphism. given, graph “color” vertex attribute, used. want ignore attributes, supply NULL arguments. See also examples . edge.color1, edge.color2 Optional integer vectors giving colors edges edge-colored (sub)graph isomorphism. given, graph “color” edge attribute, used. want ignore attributes, supply NULL arguments.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/tail_of.html","id":null,"dir":"Reference","previous_headings":"","what":"Tails of the edge(s) in a graph — tail_of","title":"Tails of the edge(s) in a graph — tail_of","text":"undirected graphs, head tail defined. case tail_of() returns vertices incident supplied edges, head_of() returns end(s) edge(s).","code":""},{"path":"https://r.igraph.org/reference/tail_of.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tails of the edge(s) in a graph — tail_of","text":"","code":"tail_of(graph, es)"},{"path":"https://r.igraph.org/reference/tail_of.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tails of the edge(s) in a graph — tail_of","text":"graph input graph. es edges query.","code":""},{"path":"https://r.igraph.org/reference/tail_of.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tails of the edge(s) in a graph — tail_of","text":"vertex sequence tail(s) edge(s).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/tkigraph.html","id":null,"dir":"Reference","previous_headings":"","what":"tkigraph — tkigraph","title":"tkigraph — tkigraph","text":"Find tkigraph https://github.com/igraph/tkigraph.","code":""},{"path":"https://r.igraph.org/reference/tkplot.canvas.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.canvas","title":"Interactive plotting of graphs — tkplot.canvas","text":"tkplot.canvas() renamed tk_canvas() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.canvas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.canvas","text":"","code":"tkplot.canvas(tkp.id)"},{"path":"https://r.igraph.org/reference/tkplot.canvas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.canvas","text":"tkp.id id tkplot window close/reshape/etc.","code":""},{"path":"https://r.igraph.org/reference/tkplot.center.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.center","title":"Interactive plotting of graphs — tkplot.center","text":"tkplot.center() renamed tk_center() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.center.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.center","text":"","code":"tkplot.center(tkp.id)"},{"path":"https://r.igraph.org/reference/tkplot.center.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.center","text":"tkp.id id tkplot window close/reshape/etc.","code":""},{"path":"https://r.igraph.org/reference/tkplot.close.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.close","title":"Interactive plotting of graphs — tkplot.close","text":"tkplot.close() renamed tk_close() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.close.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.close","text":"","code":"tkplot.close(tkp.id, window.close = TRUE)"},{"path":"https://r.igraph.org/reference/tkplot.close.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.close","text":"tkp.id id tkplot window close/reshape/etc. window.close Leave default value.","code":""},{"path":"https://r.igraph.org/reference/tkplot.export.postscript.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.export.postscript","title":"Interactive plotting of graphs — tkplot.export.postscript","text":"tkplot.export.postscript() renamed tk_postscript() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.export.postscript.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.export.postscript","text":"","code":"tkplot.export.postscript(tkp.id)"},{"path":"https://r.igraph.org/reference/tkplot.export.postscript.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.export.postscript","text":"tkp.id id tkplot window close/reshape/etc.","code":""},{"path":"https://r.igraph.org/reference/tkplot.fit.to.screen.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.fit.to.screen","title":"Interactive plotting of graphs — tkplot.fit.to.screen","text":"tkplot.fit..screen() renamed tk_fit() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.fit.to.screen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.fit.to.screen","text":"","code":"tkplot.fit.to.screen(tkp.id, width = NULL, height = NULL)"},{"path":"https://r.igraph.org/reference/tkplot.fit.to.screen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.fit.to.screen","text":"tkp.id id tkplot window close/reshape/etc. width width rectangle generating new coordinates. height height rectangle generating new coordinates.","code":""},{"path":"https://r.igraph.org/reference/tkplot.getcoords.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.getcoords","title":"Interactive plotting of graphs — tkplot.getcoords","text":"tkplot.getcoords() renamed tk_coords() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.getcoords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.getcoords","text":"","code":"tkplot.getcoords(tkp.id, norm = FALSE)"},{"path":"https://r.igraph.org/reference/tkplot.getcoords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.getcoords","text":"tkp.id id tkplot window close/reshape/etc. norm Logical, norm coordinates.","code":""},{"path":"https://r.igraph.org/reference/tkplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot","title":"Interactive plotting of graphs — tkplot","text":"tkplot() companion functions serve interactive graph drawing facility. parameters plot can changed interactively right now though, e.g. colors vertices, edges, also others pre-defined.","code":""},{"path":"https://r.igraph.org/reference/tkplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot","text":"","code":"tkplot(graph, canvas.width = 450, canvas.height = 450, ...) tk_close(tkp.id, window.close = TRUE) tk_off() tk_fit(tkp.id, width = NULL, height = NULL) tk_center(tkp.id) tk_reshape(tkp.id, newlayout, ..., params) tk_postscript(tkp.id) tk_coords(tkp.id, norm = FALSE) tk_set_coords(tkp.id, coords) tk_rotate(tkp.id, degree = NULL, rad = NULL) tk_canvas(tkp.id)"},{"path":"https://r.igraph.org/reference/tkplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot","text":"graph graph plot. canvas.width, canvas.height size tkplot drawing area. ... Additional plotting parameters. See igraph.plotting complete list. tkp.id id tkplot window close/reshape/etc. window.close Leave default value. width width rectangle generating new coordinates. height height rectangle generating new coordinates. newlayout new layout, see layout parameter tkplot. params Extra parameters list, pass layout function. norm Logical, norm coordinates. coords Two-column numeric matrix, new coordinates vertices, absolute coordinates. degree degree rotate plot. rad degree rotate plot, radian.","code":""},{"path":"https://r.igraph.org/reference/tkplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Interactive plotting of graphs — tkplot","text":"tkplot() returns integer, id plot, can used manipulate command line. tk_canvas() returns tkwin object, Tk canvas. tk_coords() returns matrix coordinates. tk_close(), tk_off(), tk_fit(), tk_reshape(), tk_postscript(), tk_center() tk_rotate() return NULL invisibly.","code":""},{"path":"https://r.igraph.org/reference/tkplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Interactive plotting of graphs — tkplot","text":"tkplot() interactive graph drawing facility. well developed stage, still useful. handling quite straightforward time, remarks hints. different popup menus, activated right mouse button, vertices edges. operate current selection vertex/edge cursor part selection operate vertex/edge cursor . One selection can active time, either vertex edge selection. vertex/edge can added selection holding control key clicking left mouse button. deselect vertex/edge. Selections can made also \"Select\" menu. \"Select vertices\" dialog allows give expression vertices selected: can list numeric R expessions separated commas, like 1,2:10,12,14,15 example. Similarly \"Select edges\" dialog two lists can given edges connecting vertex first list one second list selected. color dialog color name like 'orange' RGB notation can also used. tkplot() command creates new Tk window graphical representation graph. command returns integer number, tkplot id. commands utilize id able query manipulate plot. tk_close() closes Tk plot id tkp.id. tk_off() closes Tk plots. tk_fit() fits plot given rectangle (width height), NULL actual physical width od height plot window used. tk_reshape() applies new layout plot, optional parameters collected list analogous layout.par. tk_postscript() creates dialog window saving plot postscript format. tk_canvas() returns Tk canvas object belongs graph plot. canvas can directly manipulated , e.g. labels can added, saved file programmatically, etc. See example . tk_coords() returns coordinates vertices matrix. row corresponds one vertex. tk_set_coords() sets coordinates vertices. two-column matrix specifies new positions, row corresponding single vertex. tk_center() shifts figure center plot window. tk_rotate() rotates figure, parameter can given either degrees radians. tkplot.center tkplot.rotate","code":""},{"path":"https://r.igraph.org/reference/tkplot.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Interactive plotting of graphs — tkplot","text":"","code":"g <- make_ring(10) tkplot(g) ## Saving a tkplot() to a file programmatically g <- make_star(10, center=10) E(g)$width <- sample(1:10, ecount(g), replace=TRUE) lay <- layout_nicely(g) id <- tkplot(g, layout=lay) canvas <- tk_canvas(id) tcltk::tkpostscript(canvas, file=\"/tmp/output.eps\") tk_close(id) ## Setting the coordinates and adding a title label g <- make_ring(10) id <- tkplot(make_ring(10), canvas.width=450, canvas.height=500) canvas <- tk_canvas(id) padding <- 20 coords <- norm_coords(layout_in_circle(g), 0+padding, 450-padding, 50+padding, 500-padding) tk_set_coords(id, coords) width <- as.numeric(tkcget(canvas, \"-width\")) height <- as.numeric(tkcget(canvas, \"-height\")) tkcreate(canvas, \"text\", width/2, 25, text=\"My title\", justify=\"center\", font=tcltk::tkfont.create(family=\"helvetica\", size=20,weight=\"bold\"))"},{"path":[]},{"path":"https://r.igraph.org/reference/tkplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Interactive plotting of graphs — tkplot","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/tkplot.off.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.off","title":"Interactive plotting of graphs — tkplot.off","text":"tkplot.() renamed tk_off() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.off.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.off","text":"","code":"tkplot.off()"},{"path":"https://r.igraph.org/reference/tkplot.reshape.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.reshape","title":"Interactive plotting of graphs — tkplot.reshape","text":"tkplot.reshape() renamed tk_reshape() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.reshape.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.reshape","text":"","code":"tkplot.reshape(tkp.id, newlayout, ..., params)"},{"path":"https://r.igraph.org/reference/tkplot.reshape.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.reshape","text":"tkp.id id tkplot window close/reshape/etc. newlayout new layout, see layout parameter tkplot. ... Additional plotting parameters. See igraph.plotting complete list. params Extra parameters list, pass layout function.","code":""},{"path":"https://r.igraph.org/reference/tkplot.rotate.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.rotate","title":"Interactive plotting of graphs — tkplot.rotate","text":"tkplot.rotate() renamed tk_rotate() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.rotate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.rotate","text":"","code":"tkplot.rotate(tkp.id, degree = NULL, rad = NULL)"},{"path":"https://r.igraph.org/reference/tkplot.rotate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.rotate","text":"tkp.id id tkplot window close/reshape/etc. degree degree rotate plot. rad degree rotate plot, radian.","code":""},{"path":"https://r.igraph.org/reference/tkplot.setcoords.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.setcoords","title":"Interactive plotting of graphs — tkplot.setcoords","text":"tkplot.setcoords() renamed tk_set_coords() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.setcoords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.setcoords","text":"","code":"tkplot.setcoords(tkp.id, coords)"},{"path":"https://r.igraph.org/reference/tkplot.setcoords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.setcoords","text":"tkp.id id tkplot window close/reshape/etc. coords Two-column numeric matrix, new coordinates vertices, absolute coordinates.","code":""},{"path":"https://r.igraph.org/reference/to_prufer.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a tree graph to its Prüfer sequence — to_prufer","title":"Convert a tree graph to its Prüfer sequence — to_prufer","text":"to_prufer() converts tree graph Prüfer sequence.","code":""},{"path":"https://r.igraph.org/reference/to_prufer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a tree graph to its Prüfer sequence — to_prufer","text":"","code":"to_prufer(graph)"},{"path":"https://r.igraph.org/reference/to_prufer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a tree graph to its Prüfer sequence — to_prufer","text":"graph graph convert Prüfer sequence","code":""},{"path":"https://r.igraph.org/reference/to_prufer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a tree graph to its Prüfer sequence — to_prufer","text":"Prüfer sequence graph, represented numeric vector vertex IDs sequence.","code":""},{"path":"https://r.igraph.org/reference/to_prufer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert a tree graph to its Prüfer sequence — to_prufer","text":"Prüfer sequence tree graph n labeled vertices sequence n-2 numbers, constructed follows. graph two vertices, find vertex degree one, remove tree add label vertex connected sequence. Repeat two vertices remaining graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/to_prufer.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Convert a tree graph to its Prüfer sequence — to_prufer","text":"igraph_to_prufer().","code":""},{"path":"https://r.igraph.org/reference/to_prufer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a tree graph to its Prüfer sequence — to_prufer","text":"","code":"g <- make_tree(13, 3) to_prufer(g) #> [1] 2 2 2 1 3 3 3 1 4 4 4"},{"path":"https://r.igraph.org/reference/topo_sort.html","id":null,"dir":"Reference","previous_headings":"","what":"Topological sorting of vertices in a graph — topo_sort","title":"Topological sorting of vertices in a graph — topo_sort","text":"topological sorting directed acyclic graph linear ordering nodes node comes nodes edges.","code":""},{"path":"https://r.igraph.org/reference/topo_sort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Topological sorting of vertices in a graph — topo_sort","text":"","code":"topo_sort(graph, mode = c(\"out\", \"all\", \"in\"))"},{"path":"https://r.igraph.org/reference/topo_sort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Topological sorting of vertices in a graph — topo_sort","text":"graph input graph, directed mode Specifies use direction edges. “”, sorting order ensures node comes nodes edges, nodes incoming edges go first. “”, quite opposite: node comes nodes receives edges. Nodes outgoing edges go first.","code":""},{"path":"https://r.igraph.org/reference/topo_sort.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Topological sorting of vertices in a graph — topo_sort","text":"vertex sequence (default, see return.vs.es option igraph_options()) containing vertices topologically sorted order.","code":""},{"path":"https://r.igraph.org/reference/topo_sort.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Topological sorting of vertices in a graph — topo_sort","text":"Every DAG least one topological sort, may many. function returns possible topological sort among . graph acyclic (least one cycle), partial topological sort returned warning issued.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/topo_sort.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Topological sorting of vertices in a graph — topo_sort","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com R interface","code":""},{"path":"https://r.igraph.org/reference/topo_sort.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Topological sorting of vertices in a graph — topo_sort","text":"","code":"g <- sample_pa(100) topo_sort(g) #> + 100/100 vertices, from 0f51475: #> [1] 6 9 12 13 18 19 20 22 23 24 30 31 32 34 35 36 37 38 #> [19] 39 40 41 44 46 47 50 51 52 53 54 55 56 60 61 62 63 64 #> [37] 66 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 #> [55] 85 86 87 88 89 90 91 92 93 94 95 97 98 99 100 14 28 15 #> [73] 45 10 48 4 67 17 29 16 59 33 58 49 43 42 65 11 96 57 #> [91] 3 21 26 8 25 27 7 5 2 1"},{"path":"https://r.igraph.org/reference/topological.sort.html","id":null,"dir":"Reference","previous_headings":"","what":"Topological sorting of vertices in a graph — topological.sort","title":"Topological sorting of vertices in a graph — topological.sort","text":"topological.sort() renamed topo_sort() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/topological.sort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Topological sorting of vertices in a graph — topological.sort","text":"","code":"topological.sort(graph, mode = c(\"out\", \"all\", \"in\"))"},{"path":"https://r.igraph.org/reference/topological.sort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Topological sorting of vertices in a graph — topological.sort","text":"graph input graph, directed mode Specifies use direction edges. “”, sorting order ensures node comes nodes edges, nodes incoming edges go first. “”, quite opposite: node comes nodes receives edges. Nodes outgoing edges go first.","code":""},{"path":"https://r.igraph.org/reference/transitivity.html","id":null,"dir":"Reference","previous_headings":"","what":"Transitivity of a graph — transitivity","title":"Transitivity of a graph — transitivity","text":"Transitivity measures probability adjacent vertices vertex connected. sometimes also called clustering coefficient.","code":""},{"path":"https://r.igraph.org/reference/transitivity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transitivity of a graph — transitivity","text":"","code":"transitivity( graph, type = c(\"undirected\", \"global\", \"globalundirected\", \"localundirected\", \"local\", \"average\", \"localaverage\", \"localaverageundirected\", \"barrat\", \"weighted\"), vids = NULL, weights = NULL, isolates = c(\"NaN\", \"zero\") )"},{"path":"https://r.igraph.org/reference/transitivity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transitivity of a graph — transitivity","text":"graph graph analyze. type type transitivity calculate. Possible values: \"global\" global transitivity undirected graph. simply ratio count triangles connected triples graph. directed graphs, edge directions ignored. \"local\" local transitivity undirected graph. calculated vertex given vids argument. local transitivity vertex ratio count triangles connected vertex triples centered vertex. directed graphs, edge directions ignored. \"undirected\" global. \"globalundirected\" global. \"localundirected\" local. \"barrat\" weighted transitivity defined . Barrat. See details . \"weighted\" barrat. vids vertex ids local transitivity calculated. ignored global transitivity types. default value NULL, case vertices considered. slightly faster supply NULL V(graph). weights Optional weights weighted transitivity. ignored transitivity measures. NULL (default) graph weight edge attribute, used automatically. isolates Character scalar, local versions transitivity, defines treat vertices degree zero one. ‘NaN’ local transitivity reported NaN included averaging, transitivity types calculate average. vertices degree two higher, averaging still result NaN. ‘zero’, report 0 transitivity , included averaging, average calculated. global transitivity, controls handle graphs connected triplets: NaN zero returned according respective setting.","code":""},{"path":"https://r.igraph.org/reference/transitivity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Transitivity of a graph — transitivity","text":"‘global’ single number, NaN connected triples graph. ‘local’ vector transitivity scores, one vertex ‘vids’.","code":""},{"path":"https://r.igraph.org/reference/transitivity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Transitivity of a graph — transitivity","text":"Note essentially two classes transitivity measures, one vertex-level, graph level property. several generalizations transitivity weighted graphs, use definition . Barrat, local vertex-level quantity, formula $$C_i^w=\\frac{1}{s_i(k_i-1)}\\sum_{j,h}\\frac{w_{ij}+w_{ih}}{2}a_{ij}a_{ih}a_{jh}$$ \\(s_i\\) strength vertex \\(\\), see strength(), \\(a_{ij}\\) elements adjacency matrix, \\(k_i\\) vertex degree, \\(w_{ij}\\) weights. formula gives back normal -weighted local transitivity edge weights . barrat type transitivity work graphs multiple /loop edges. want calculate directed graph, call as_undirected() collapse mode first.","code":""},{"path":"https://r.igraph.org/reference/transitivity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Transitivity of a graph — transitivity","text":"Wasserman, S., Faust, K. (1994). Social Network Analysis: Methods Applications. Cambridge: Cambridge University Press. Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras, Alessandro Vespignani: architecture complex weighted networks, Proc. Natl. Acad. Sci. USA 101, 3747 (2004)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/transitivity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Transitivity of a graph — transitivity","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/transitivity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Transitivity of a graph — transitivity","text":"","code":"g <- make_ring(10) transitivity(g) #> [1] 0 g2 <- sample_gnp(1000, 10 / 1000) transitivity(g2) # this is about 10/1000 #> [1] 0.01046946 # Weighted version, the figure from the Barrat paper gw <- graph_from_literal(A - B:C:D:E, B - C:D, C - D) E(gw)$weight <- 1 E(gw)[V(gw)[name == \"A\"] %--% V(gw)[name == \"E\"]]$weight <- 5 transitivity(gw, vids = \"A\", type = \"local\") #> A #> 0.5 transitivity(gw, vids = \"A\", type = \"weighted\") #> A #> 0.25 # Weighted reduces to \"local\" if weights are the same gw2 <- sample_gnp(1000, 10 / 1000) E(gw2)$weight <- 1 t1 <- transitivity(gw2, type = \"local\") t2 <- transitivity(gw2, type = \"weighted\") all(is.na(t1) == is.na(t2)) #> [1] TRUE all(na.omit(t1 == t2)) #> [1] FALSE"},{"path":"https://r.igraph.org/reference/triad.census.html","id":null,"dir":"Reference","previous_headings":"","what":"Triad census, subgraphs with three vertices — triad.census","title":"Triad census, subgraphs with three vertices — triad.census","text":"triad.census() renamed triad_census() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/triad.census.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Triad census, subgraphs with three vertices — triad.census","text":"","code":"triad.census(graph)"},{"path":"https://r.igraph.org/reference/triad.census.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Triad census, subgraphs with three vertices — triad.census","text":"graph input graph, directed. undirected graph results warning, undefined results.","code":""},{"path":"https://r.igraph.org/reference/triad_census.html","id":null,"dir":"Reference","previous_headings":"","what":"Triad census, subgraphs with three vertices — triad_census","title":"Triad census, subgraphs with three vertices — triad_census","text":"function counts different induced subgraphs three vertices graph.","code":""},{"path":"https://r.igraph.org/reference/triad_census.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Triad census, subgraphs with three vertices — triad_census","text":"","code":"triad_census(graph)"},{"path":"https://r.igraph.org/reference/triad_census.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Triad census, subgraphs with three vertices — triad_census","text":"graph input graph, directed. undirected graph results warning, undefined results.","code":""},{"path":"https://r.igraph.org/reference/triad_census.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Triad census, subgraphs with three vertices — triad_census","text":"numeric vector, subgraph counts, order given description.","code":""},{"path":"https://r.igraph.org/reference/triad_census.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Triad census, subgraphs with three vertices — triad_census","text":"Triad census defined David Leinhardt (see References ). Every triple vertices (, B, C) classified 16 possible states: 003 ,B,C, empty graph. 012 ->B, C, graph single directed edge. 102 <->B, C, graph mutual connection two vertices. 021D <-B->C, -star. 021U ->B<-C, -star. 021C ->B->C, directed line. 111D <->B<-C. 111U <->B->C. 030T ->B<-C, ->C. 030C <-B<-C, ->C. 201 <->B<->C. 120D <-B->C, <->C. 120U ->B<-C, <->C. 120C ->B->C, <->C. 210 ->B<->C, <->C. 300 <->B<->C, <->C, complete graph. functions uses RANDESU motif finder algorithm find count subgraphs, see motifs().","code":""},{"path":"https://r.igraph.org/reference/triad_census.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Triad census, subgraphs with three vertices — triad_census","text":"See also Davis, J.. Leinhardt, S. (1972). Structure Positive Interpersonal Relations Small Groups. J. Berger (Ed.), Sociological Theories Progress, Volume 2, 218-251. Boston: Houghton Mifflin.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/triad_census.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Triad census, subgraphs with three vertices — triad_census","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/triad_census.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Triad census, subgraphs with three vertices — triad_census","text":"igraph_triad_census().","code":""},{"path":"https://r.igraph.org/reference/triad_census.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Triad census, subgraphs with three vertices — triad_census","text":"","code":"g <- sample_gnm(15, 45, directed = TRUE) triad_census(g) #> [1] 90 198 21 20 21 57 11 15 12 5 0 2 1 2 0 0"},{"path":"https://r.igraph.org/reference/unfold.tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a general graph into a forest — unfold.tree","title":"Convert a general graph into a forest — unfold.tree","text":"unfold.tree() renamed unfold_tree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/unfold.tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a general graph into a forest — unfold.tree","text":"","code":"unfold.tree(graph, mode = c(\"all\", \"out\", \"in\", \"total\"), roots)"},{"path":"https://r.igraph.org/reference/unfold.tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a general graph into a forest — unfold.tree","text":"graph input graph, can either directed undirected. mode Character string, defined types paths used breadth-first search. “” follows outgoing, “” incoming edges, “” “total” . argument ignored undirected graphs. roots vector giving vertices breadth-first search performed. Typically contains one vertex per component.","code":""},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a general graph into a forest — unfold_tree","title":"Convert a general graph into a forest — unfold_tree","text":"Perform breadth-first search graph convert tree forest replicating vertices found .","code":""},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a general graph into a forest — unfold_tree","text":"","code":"unfold_tree(graph, mode = c(\"all\", \"out\", \"in\", \"total\"), roots)"},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a general graph into a forest — unfold_tree","text":"graph input graph, can either directed undirected. mode Character string, defined types paths used breadth-first search. “” follows outgoing, “” incoming edges, “” “total” . argument ignored undirected graphs. roots vector giving vertices breadth-first search performed. Typically contains one vertex per component.","code":""},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a general graph into a forest — unfold_tree","text":"list two components: tree result, igraph object, tree forest. vertex_index numeric vector, gives mapping vertices new graph vertices old graph.","code":""},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert a general graph into a forest — unfold_tree","text":"forest graph, whose components trees. roots vector can calculated simply topological sort components graph, see examples .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert a general graph into a forest — unfold_tree","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a general graph into a forest — unfold_tree","text":"","code":"g <- make_tree(10) %du% make_tree(10) V(g)$id <- seq_len(vcount(g)) - 1 roots <- sapply(decompose(g), function(x) { V(x)$id[topo_sort(x)[1] + 1] }) tree <- unfold_tree(g, roots = roots)"},{"path":"https://r.igraph.org/reference/union.html","id":null,"dir":"Reference","previous_headings":"","what":"Union of two or more sets — union","title":"Union of two or more sets — union","text":"S3 generic function. See methods(\"union\") actual implementations various S3 classes. Initially implemented igraph graphs igraph vertex edge sequences. See union.igraph(), union.igraph.vs().","code":""},{"path":"https://r.igraph.org/reference/union.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Union of two or more sets — union","text":"","code":"union(...)"},{"path":"https://r.igraph.org/reference/union.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Union of two or more sets — union","text":"... Arguments, number interpretation depends function implements union().","code":""},{"path":"https://r.igraph.org/reference/union.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Union of two or more sets — union","text":"Depends function implements method.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/union.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Union of edge sequences — union.igraph.es","title":"Union of edge sequences — union.igraph.es","text":"Union edge sequences","code":""},{"path":"https://r.igraph.org/reference/union.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Union of edge sequences — union.igraph.es","text":"","code":"# S3 method for class 'igraph.es' union(...)"},{"path":"https://r.igraph.org/reference/union.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Union of edge sequences — union.igraph.es","text":"... edge sequences take union .","code":""},{"path":"https://r.igraph.org/reference/union.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Union of edge sequences — union.igraph.es","text":"edge sequence contains edges given sequences, exactly .","code":""},{"path":"https://r.igraph.org/reference/union.igraph.es.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Union of edge sequences — union.igraph.es","text":"must belong graph. Note function ‘set’ semantics multiplicity edges lost result. (match behavior based unique function.)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/union.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Union of edge sequences — union.igraph.es","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) union(E(g)[1:6], E(g)[5:9], E(g)[\"A|J\"]) #> + 10/10 edges from a0582b9 (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J"},{"path":"https://r.igraph.org/reference/union.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Union of graphs — union.igraph","title":"Union of graphs — union.igraph","text":"union two graphs created. graphs may identical overlapping vertex sets.","code":""},{"path":"https://r.igraph.org/reference/union.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Union of graphs — union.igraph","text":"","code":"# S3 method for class 'igraph' union(..., byname = \"auto\")"},{"path":"https://r.igraph.org/reference/union.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Union of graphs — union.igraph","text":"... Graph objects lists graph objects. byname logical scalar, character scalar auto. Whether perform operation based symbolic vertex names. auto, means TRUE graphs named FALSE otherwise. warning generated auto () graphs named.","code":""},{"path":"https://r.igraph.org/reference/union.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Union of graphs — union.igraph","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/union.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Union of graphs — union.igraph","text":"union() creates union two graphs. Edges included least one graph part new graph. function can also used via %u% operator. byname argument TRUE (auto graphs named), operation performed symbolic vertex names instead internal numeric vertex ids. union() keeps attributes graphs. graph, vertex edge attributes copied result. attribute present multiple graphs result name clash, attribute renamed adding suffixes: _1, _2, etc. name vertex attribute treated specially operation performed based symbolic vertex names. case name must present graphs, renamed result graph. error generated input graphs directed others undirected.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/union.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Union of graphs — union.igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/union.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Union of graphs — union.igraph","text":"","code":"## Union of two social networks with overlapping sets of actors net1 <- graph_from_literal( D - A:B:F:G, A - C - F - A, B - E - G - B, A - B, F - G, H - F:G, H - I - J ) net2 <- graph_from_literal(D - A:F:Y, B - A - X - F - H - Z, F - Y) print_all(net1 %u% net2) #> IGRAPH 38a06f8 UN-- 13 21 -- #> + attr: name (v/c) #> + vertex attributes: #> | name #> | [1] D #> | [2] A #> | [3] B #> | [4] F #> | [5] G #> | [6] C #> | [7] E #> | [8] H #> | [9] I #> | [10] J #> | [11] Y #> | [12] X #> | [13] Z #> + edges from 38a06f8 (vertex names): #> [1] I--J H--Z H--I G--H G--E F--X F--Y F--H F--C F--G B--E B--G A--X A--C A--F #> [16] A--B D--Y D--G D--F D--B D--A"},{"path":"https://r.igraph.org/reference/union.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Union of vertex sequences — union.igraph.vs","title":"Union of vertex sequences — union.igraph.vs","text":"Union vertex sequences","code":""},{"path":"https://r.igraph.org/reference/union.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Union of vertex sequences — union.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' union(...)"},{"path":"https://r.igraph.org/reference/union.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Union of vertex sequences — union.igraph.vs","text":"... vertex sequences take union .","code":""},{"path":"https://r.igraph.org/reference/union.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Union of vertex sequences — union.igraph.vs","text":"vertex sequence contains vertices given sequences, exactly .","code":""},{"path":"https://r.igraph.org/reference/union.igraph.vs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Union of vertex sequences — union.igraph.vs","text":"must belong graph. Note function ‘set’ semantics multiplicity vertices lost result. (match behavior based unique function.)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/union.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Union of vertex sequences — union.igraph.vs","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) union(V(g)[1:6], V(g)[5:10]) #> + 10/10 vertices, named, from 6554229: #> [1] A B C D E F G H I J"},{"path":"https://r.igraph.org/reference/unique.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove duplicate edges from an edge sequence — unique.igraph.es","title":"Remove duplicate edges from an edge sequence — unique.igraph.es","text":"Remove duplicate edges edge sequence","code":""},{"path":"https://r.igraph.org/reference/unique.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove duplicate edges from an edge sequence — unique.igraph.es","text":"","code":"# S3 method for class 'igraph.es' unique(x, incomparables = FALSE, ...)"},{"path":"https://r.igraph.org/reference/unique.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove duplicate edges from an edge sequence — unique.igraph.es","text":"x edge sequence. incomparables vector values compared. Passed base function duplicated. See details . ... Passed base function duplicated().","code":""},{"path":"https://r.igraph.org/reference/unique.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove duplicate edges from an edge sequence — unique.igraph.es","text":"edge sequence duplicate vertices removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/unique.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove duplicate edges from an edge sequence — unique.igraph.es","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) E(g)[1, 1:5, 1:10, 5:10] #> + 22/10 edges from 00421c6 (vertex names): #> [1] A--B A--B B--C C--D D--E E--F A--B B--C C--D D--E E--F F--G G--H H--I I--J #> [16] A--J E--F F--G G--H H--I I--J A--J E(g)[1, 1:5, 1:10, 5:10] %>% unique() #> + 10/10 edges from 00421c6 (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J"},{"path":"https://r.igraph.org/reference/unique.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove duplicate vertices from a vertex sequence — unique.igraph.vs","title":"Remove duplicate vertices from a vertex sequence — unique.igraph.vs","text":"Remove duplicate vertices vertex sequence","code":""},{"path":"https://r.igraph.org/reference/unique.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove duplicate vertices from a vertex sequence — unique.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' unique(x, incomparables = FALSE, ...)"},{"path":"https://r.igraph.org/reference/unique.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove duplicate vertices from a vertex sequence — unique.igraph.vs","text":"x vertex sequence. incomparables vector values compared. Passed base function duplicated. See details . ... Passed base function duplicated().","code":""},{"path":"https://r.igraph.org/reference/unique.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove duplicate vertices from a vertex sequence — unique.igraph.vs","text":"vertex sequence duplicate vertices removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/unique.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove duplicate vertices from a vertex sequence — unique.igraph.vs","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) V(g)[1, 1:5, 1:10, 5:10] #> + 22/10 vertices, named, from 6aa6b04: #> [1] A A B C D E A B C D E F G H I J E F G H I J V(g)[1, 1:5, 1:10, 5:10] %>% unique() #> + 10/10 vertices, named, from 6aa6b04: #> [1] A B C D E F G H I J"},{"path":"https://r.igraph.org/reference/upgrade_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"igraph data structure versions — upgrade_graph","title":"igraph data structure versions — upgrade_graph","text":"igraph's internal data representation changes sometimes versions. means possible use igraph objects created (possibly saved file) older igraph version.","code":""},{"path":"https://r.igraph.org/reference/upgrade_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"igraph data structure versions — upgrade_graph","text":"","code":"upgrade_graph(graph)"},{"path":"https://r.igraph.org/reference/upgrade_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"igraph data structure versions — upgrade_graph","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/upgrade_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"igraph data structure versions — upgrade_graph","text":"graph current format.","code":""},{"path":"https://r.igraph.org/reference/upgrade_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"igraph data structure versions — upgrade_graph","text":"graph_version() queries current data format, data format possibly older igraph graph. upgrade_graph() can convert older data format current one.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex.connectivity.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex connectivity — vertex.connectivity","title":"Vertex connectivity — vertex.connectivity","text":"vertex.connectivity() renamed vertex_connectivity() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/vertex.connectivity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex connectivity — vertex.connectivity","text":"","code":"vertex.connectivity(graph, source = NULL, target = NULL, checks = TRUE)"},{"path":"https://r.igraph.org/reference/vertex.connectivity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex connectivity — vertex.connectivity","text":"source id source vertex, vertex_connectivity() can NULL, see details . target id target vertex, vertex_connectivity() can NULL, see details . checks Logical constant. Whether check graph connected also degree vertices. graph (strongly) connected connectivity obviously zero. Otherwise minimum degree one vertex connectivity also one. good idea perform checks, can done quickly compared connectivity calculation . suggested Peter McMahan, thanks Peter.","code":""},{"path":"https://r.igraph.org/reference/vertex.disjoint.paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex connectivity — vertex.disjoint.paths","title":"Vertex connectivity — vertex.disjoint.paths","text":"vertex.disjoint.paths() renamed vertex_disjoint_paths() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/vertex.disjoint.paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex connectivity — vertex.disjoint.paths","text":"","code":"vertex.disjoint.paths(graph, source = NULL, target = NULL)"},{"path":"https://r.igraph.org/reference/vertex.disjoint.paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex connectivity — vertex.disjoint.paths","text":"source id source vertex, vertex_connectivity() can NULL, see details . target id target vertex, vertex_connectivity() can NULL, see details .","code":""},{"path":"https://r.igraph.org/reference/vertex.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper function for adding and deleting vertices — vertex","title":"Helper function for adding and deleting vertices — vertex","text":"helper function simplifies adding deleting vertices /graphs.","code":""},{"path":"https://r.igraph.org/reference/vertex.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper function for adding and deleting vertices — vertex","text":"","code":"vertex(...) vertices(...)"},{"path":"https://r.igraph.org/reference/vertex.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper function for adding and deleting vertices — vertex","text":"... See details .","code":""},{"path":"https://r.igraph.org/reference/vertex.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper function for adding and deleting vertices — vertex","text":"special object can used together igraph graphs plus minus operators.","code":""},{"path":"https://r.igraph.org/reference/vertex.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Helper function for adding and deleting vertices — vertex","text":"vertices() alias vertex(). adding vertices via +, unnamed arguments interpreted vertex names new vertices. Named arguments interpreted vertex attributes new vertices. deleting vertices via -, arguments vertex() (vertices()) concatenated via c() passed delete_vertices().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper function for adding and deleting vertices — vertex","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) + vertices(\"X\", \"Y\") g #> IGRAPH a8e4da5 UN-- 12 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from a8e4da5 (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J plot(g)"},{"path":"https://r.igraph.org/reference/vertex.shape.pie.html","id":null,"dir":"Reference","previous_headings":"","what":"Using pie charts as vertices in graph plots — Pie charts as vertices","title":"Using pie charts as vertices in graph plots — Pie charts as vertices","text":"complex vertex images can used express addtional information vertices. E.g. pie charts can used vertices, denote vertex classes, fuzzy classification vertices, etc.","code":""},{"path":"https://r.igraph.org/reference/vertex.shape.pie.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Using pie charts as vertices in graph plots — Pie charts as vertices","text":"vertex shape ‘pie’ makes igraph draw pie chart every vertex. extra graphical vertex parameters specify pie charts look like: pie Numeric vector, gives sizes pie slices. pie.color list color vectors use pies. list single vector, used pies. color vector shorter number areas pie, recycled. pie.angle slope shading lines, given angle degrees (counter-clockwise). pie.density density shading lines, lines per inch. Non-positive values inhibit drawing shading lines. pie.lty line type border slices.","code":""},{"path":"https://r.igraph.org/reference/vertex.shape.pie.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Using pie charts as vertices in graph plots — Pie charts as vertices","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex.shape.pie.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Using pie charts as vertices in graph plots — Pie charts as vertices","text":"","code":"g <- make_ring(10) values <- lapply(1:10, function(x) sample(1:10,3)) if (interactive()) { plot(g, vertex.shape=\"pie\", vertex.pie=values, vertex.pie.color=list(heat.colors(5)), vertex.size=seq(10,30,length.out=10), vertex.label=NA) }"},{"path":"https://r.igraph.org/reference/vertex.shapes.html","id":null,"dir":"Reference","previous_headings":"","what":"Various vertex shapes when plotting igraph graphs — vertex.shapes","title":"Various vertex shapes when plotting igraph graphs — vertex.shapes","text":"vertex.shapes() renamed shapes() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/vertex.shapes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Various vertex shapes when plotting igraph graphs — vertex.shapes","text":"","code":"vertex.shapes(shape = NULL)"},{"path":"https://r.igraph.org/reference/vertex.shapes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Various vertex shapes when plotting igraph graphs — vertex.shapes","text":"shape Character scalar, name vertex shape. NULL shapes(), names defined vertex shapes returned.","code":""},{"path":"https://r.igraph.org/reference/vertex_attr-set.html","id":null,"dir":"Reference","previous_headings":"","what":"Set one or more vertex attributes — vertex_attr<-","title":"Set one or more vertex attributes — vertex_attr<-","text":"Set one vertex attributes","code":""},{"path":"https://r.igraph.org/reference/vertex_attr-set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set one or more vertex attributes — vertex_attr<-","text":"","code":"vertex_attr(graph, name, index = V(graph)) <- value"},{"path":"https://r.igraph.org/reference/vertex_attr-set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set one or more vertex attributes — vertex_attr<-","text":"graph graph. name name vertex attribute set. missing, value must named list, entries set vertex attributes. index optional vertex sequence set attributes subset vertices. value new value attribute(s) (index) vertices.","code":""},{"path":"https://r.igraph.org/reference/vertex_attr-set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set one or more vertex attributes — vertex_attr<-","text":"graph, vertex attribute(s) added set.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex_attr-set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set one or more vertex attributes — vertex_attr<-","text":"","code":"g <- make_ring(10) vertex_attr(g) <- list( name = LETTERS[1:10], color = rep(\"yellow\", gorder(g)) ) vertex_attr(g, \"label\") <- V(g)$name g #> IGRAPH 362c137 UN-- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c), color #> | (v/c), label (v/c) #> + edges from 362c137 (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J plot(g)"},{"path":"https://r.igraph.org/reference/vertex_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Query vertex attributes of a graph — vertex_attr","title":"Query vertex attributes of a graph — vertex_attr","text":"Query vertex attributes graph","code":""},{"path":"https://r.igraph.org/reference/vertex_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query vertex attributes of a graph — vertex_attr","text":"","code":"vertex_attr(graph, name, index = V(graph))"},{"path":"https://r.igraph.org/reference/vertex_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query vertex attributes of a graph — vertex_attr","text":"graph graph. name Name attribute query. missing, vertex attributes returned list. index optional vertex sequence query attribute vertices.","code":""},{"path":"https://r.igraph.org/reference/vertex_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query vertex attributes of a graph — vertex_attr","text":"value vertex attribute, list vertex attributes, name missing.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query vertex attributes of a graph — vertex_attr","text":"","code":"g <- make_ring(10) %>% set_vertex_attr(\"color\", value = \"red\") %>% set_vertex_attr(\"label\", value = letters[1:10]) vertex_attr(g, \"label\") #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" vertex_attr(g) #> $color #> [1] \"red\" \"red\" \"red\" \"red\" \"red\" \"red\" \"red\" \"red\" \"red\" \"red\" #> #> $label #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" #> plot(g)"},{"path":"https://r.igraph.org/reference/vertex_attr_names.html","id":null,"dir":"Reference","previous_headings":"","what":"List names of vertex attributes — vertex_attr_names","title":"List names of vertex attributes — vertex_attr_names","text":"List names vertex attributes","code":""},{"path":"https://r.igraph.org/reference/vertex_attr_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List names of vertex attributes — vertex_attr_names","text":"","code":"vertex_attr_names(graph)"},{"path":"https://r.igraph.org/reference/vertex_attr_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List names of vertex attributes — vertex_attr_names","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/vertex_attr_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List names of vertex attributes — vertex_attr_names","text":"Character vector, names vertex attributes.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex_attr_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List names of vertex attributes — vertex_attr_names","text":"","code":"g <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) %>% set_vertex_attr(\"color\", value = rep(\"green\", 10)) vertex_attr_names(g) #> [1] \"name\" \"color\" plot(g)"},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex connectivity — vertex_connectivity","title":"Vertex connectivity — vertex_connectivity","text":"vertex connectivity graph two vertices, recently also called group cohesion.","code":""},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex connectivity — vertex_connectivity","text":"","code":"vertex_connectivity(graph, source = NULL, target = NULL, checks = TRUE) vertex_disjoint_paths(graph, source = NULL, target = NULL) # S3 method for class 'igraph' cohesion(x, checks = TRUE, ...)"},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex connectivity — vertex_connectivity","text":"graph, x input graph. source id source vertex, vertex_connectivity() can NULL, see details . target id target vertex, vertex_connectivity() can NULL, see details . checks Logical constant. Whether check graph connected also degree vertices. graph (strongly) connected connectivity obviously zero. Otherwise minimum degree one vertex connectivity also one. good idea perform checks, can done quickly compared connectivity calculation . suggested Peter McMahan, thanks Peter. ... Ignored.","code":""},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Vertex connectivity — vertex_connectivity","text":"scalar real value.","code":""},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Vertex connectivity — vertex_connectivity","text":"vertex connectivity two vertices (source target) graph minimum number vertices must deleted eliminate (directed) paths source target. vertex_connectivity() calculates quantity source target arguments given NULL. vertex connectivity pair number different (.e. node-independent) paths source target, assuming direct edges . vertex connectivity graph minimum vertex connectivity (ordered) pairs vertices graph. words minimum number vertices needed remove make graph strongly connected. (graph strongly connected zero.) vertex_connectivity() calculates quantity neither source target arguments given. (.e. NULL.) set vertex disjoint directed paths source vertex set directed paths whose vertices contain common vertices (apart source target). maximum number vertex disjoint paths two vertices vertex connectivity cases (two vertices connected edge). cohesion graph (defined White Harary, see references), vertex connectivity graph. calculated cohesion(). three functions essentially calculate measure(s), precisely vertex_connectivity() general, two included ease using descriptive function names.","code":""},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Vertex connectivity — vertex_connectivity","text":"White, Douglas R Frank Harary 2001. Cohesiveness Blocks Social Networks: Node Connectivity Conditional Density. Sociological Methodology 31 (1) : 305-359.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Vertex connectivity — vertex_connectivity","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Vertex connectivity — vertex_connectivity","text":"","code":"g <- sample_pa(100, m = 1) g <- delete_edges(g, E(g)[100 %--% 1]) g2 <- sample_pa(100, m = 5) g2 <- delete_edges(g2, E(g2)[100 %--% 1]) vertex_connectivity(g, 100, 1) #> [1] 1 vertex_connectivity(g2, 100, 1) #> [1] 5 vertex_disjoint_paths(g2, 100, 1) #> [1] 5 g <- sample_gnp(50, 5 / 50) g <- as_directed(g) g <- induced_subgraph(g, subcomponent(g, 1)) cohesion(g) #> [1] 2"},{"path":"https://r.igraph.org/reference/voronoi_cells.html","id":null,"dir":"Reference","previous_headings":"","what":"Voronoi partitioning of a graph — voronoi_cells","title":"Voronoi partitioning of a graph — voronoi_cells","text":"function partitions vertices graph based set generator vertices. vertex assigned generator vertex () closest. groups() may used output function.","code":""},{"path":"https://r.igraph.org/reference/voronoi_cells.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Voronoi partitioning of a graph — voronoi_cells","text":"","code":"voronoi_cells( graph, generators, ..., weights = NULL, mode = c(\"out\", \"in\", \"all\", \"total\"), tiebreaker = c(\"random\", \"first\", \"last\") )"},{"path":"https://r.igraph.org/reference/voronoi_cells.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Voronoi partitioning of a graph — voronoi_cells","text":"graph graph partition Voronoi cells. generators generator vertices Voronoi cells. ... dots future extensions must empty. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). weighted graph, length path sum weights constituent edges. mode Character string. directed graphs, whether compute distances generator vertices vertices (\"\"), generator vertices vertices (\"\"), ignore edge directions entirely (\"\"). Ignored undirected graphs. tiebreaker Character string specifies vertex distance multiple generators. \"random\" assigns minimal-distance generator randomly, \"first\" takes first one, \"last\" takes last one.","code":""},{"path":"https://r.igraph.org/reference/voronoi_cells.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Voronoi partitioning of a graph — voronoi_cells","text":"named list two components: membership numeric vector giving cluster id vertex belongs. distances numeric vector giving distance vertex generator","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/voronoi_cells.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Voronoi partitioning of a graph — voronoi_cells","text":"igraph_voronoi().","code":""},{"path":"https://r.igraph.org/reference/voronoi_cells.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Voronoi partitioning of a graph — voronoi_cells","text":"","code":"g <- make_lattice(c(10,10)) clu <- voronoi_cells(g, c(25, 43, 67)) groups(clu) #> $`0` #> [1] 2 4 5 6 7 8 9 10 11 14 15 16 17 18 19 20 23 24 25 26 27 28 29 30 35 #> [26] 36 37 40 45 55 #> #> $`1` #> [1] 1 3 12 13 21 22 31 32 33 34 41 42 43 44 51 52 53 54 61 62 63 71 72 73 81 #> [26] 82 83 84 91 92 93 94 #> #> $`2` #> [1] 38 39 46 47 48 49 50 56 57 58 59 60 64 65 66 67 68 69 70 #> [20] 74 75 76 77 78 79 80 85 86 87 88 89 90 95 96 97 98 99 100 #> plot(g, vertex.color=clu$membership)"},{"path":"https://r.igraph.org/reference/walktrap.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure via short random walks — walktrap.community","title":"Community structure via short random walks — walktrap.community","text":"walktrap.community() renamed cluster_walktrap() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/walktrap.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure via short random walks — walktrap.community","text":"","code":"walktrap.community( graph, weights = NULL, steps = 4, merges = TRUE, modularity = TRUE, membership = TRUE )"},{"path":"https://r.igraph.org/reference/walktrap.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure via short random walks — walktrap.community","text":"graph input graph, edge directions ignored directed graphs. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. Larger edge weights increase probability edge selected random walker. words, larger edge weights correspond stronger connections. steps length random walks perform. merges Logical scalar, whether include merge matrix result. modularity Logical scalar, whether include vector modularity scores result. membership argument true, always calculated. membership Logical scalar, whether calculate membership vector split corresponding highest modularity value.","code":""},{"path":"https://r.igraph.org/reference/watts.strogatz.game.html","id":null,"dir":"Reference","previous_headings":"","what":"The Watts-Strogatz small-world model — watts.strogatz.game","title":"The Watts-Strogatz small-world model — watts.strogatz.game","text":"watts.strogatz.game() renamed sample_smallworld() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/watts.strogatz.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Watts-Strogatz small-world model — watts.strogatz.game","text":"","code":"watts.strogatz.game(dim, size, nei, p, loops = FALSE, multiple = FALSE)"},{"path":"https://r.igraph.org/reference/watts.strogatz.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Watts-Strogatz small-world model — watts.strogatz.game","text":"dim Integer constant, dimension starting lattice. size Integer constant, size lattice along dimension. nei Integer constant, neighborhood within vertices lattice connected. p Real constant zero one, rewiring probability. loops Logical scalar, whether loops edges allowed generated graph. multiple Logical scalar, whether multiple edges allowed int generated graph.","code":""},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"functions find , largest maximal weighted cliques undirected graph. weight clique sum weights vertices.","code":""},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"","code":"weighted_cliques( graph, vertex.weights = NULL, min.weight = 0, max.weight = 0, maximal = FALSE )"},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"graph input graph, directed graphs considered undirected ones, multiple edges loops ignored. vertex.weights Vertex weight vector. graph weight vertex attribute, used default. graph weight vertex attribute argument NULL, every vertex assumed weight 1. Note current implementation weighted clique finder supports positive integer weights . min.weight Numeric constant, lower limit weight cliques find. NULL means limit, .e. 0. max.weight Numeric constant, upper limit weight cliques find. NULL means limit. maximal Specifies whether look weighted cliques (FALSE) maximal ones (TRUE).","code":""},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"weighted_cliques() largest_weighted_cliques() return list containing numeric vectors vertex IDs. list element weighted clique, .e. vertex sequence class igraph.vs(). weighted_clique_num() returns integer scalar.","code":""},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"weighted_cliques() finds complete subgraphs input graph, obeying weight limitations given min max arguments. largest_weighted_cliques() finds largest weighted cliques input graph. clique largest clique whose total weight larger weight clique. weighted_clique_num() calculates weight largest weighted clique(s).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"igraph_weighted_cliques().","code":""},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"","code":"g <- make_graph(\"zachary\") V(g)$weight <- 1 V(g)[c(1, 2, 3, 4, 14)]$weight <- 3 weighted_cliques(g) #> [[1]] #> + 1/34 vertex, from 35ab65a: #> [1] 34 #> #> [[2]] #> + 1/34 vertex, from 35ab65a: #> [1] 33 #> #> [[3]] #> + 2/34 vertices, from 35ab65a: #> [1] 33 34 #> #> [[4]] #> + 1/34 vertex, from 35ab65a: #> [1] 8 #> #> [[5]] #> + 1/34 vertex, from 35ab65a: #> [1] 9 #> #> [[6]] #> + 2/34 vertices, from 35ab65a: #> [1] 9 33 #> #> [[7]] #> + 3/34 vertices, from 35ab65a: #> [1] 9 33 34 #> #> [[8]] #> + 2/34 vertices, from 35ab65a: #> [1] 9 34 #> #> [[9]] #> + 1/34 vertex, from 35ab65a: #> [1] 32 #> #> [[10]] #> + 2/34 vertices, from 35ab65a: #> [1] 32 33 #> #> [[11]] #> + 3/34 vertices, from 35ab65a: #> [1] 32 33 34 #> #> [[12]] #> + 2/34 vertices, from 35ab65a: #> [1] 32 34 #> #> [[13]] #> + 1/34 vertex, from 35ab65a: #> [1] 22 #> #> [[14]] #> + 1/34 vertex, from 35ab65a: #> [1] 20 #> #> [[15]] #> + 2/34 vertices, from 35ab65a: #> [1] 20 34 #> #> [[16]] #> + 1/34 vertex, from 35ab65a: #> [1] 18 #> #> [[17]] #> + 1/34 vertex, from 35ab65a: #> [1] 13 #> #> [[18]] #> + 1/34 vertex, from 35ab65a: #> [1] 7 #> #> [[19]] #> + 1/34 vertex, from 35ab65a: #> [1] 28 #> #> [[20]] #> + 2/34 vertices, from 35ab65a: #> [1] 28 34 #> #> [[21]] #> + 1/34 vertex, from 35ab65a: #> [1] 11 #> #> [[22]] #> + 1/34 vertex, from 35ab65a: #> [1] 6 #> #> [[23]] #> + 2/34 vertices, from 35ab65a: #> [1] 6 11 #> #> [[24]] #> + 2/34 vertices, from 35ab65a: #> [1] 6 7 #> #> [[25]] #> + 1/34 vertex, from 35ab65a: #> [1] 31 #> #> [[26]] #> + 2/34 vertices, from 35ab65a: #> [1] 9 31 #> #> [[27]] #> + 3/34 vertices, from 35ab65a: #> [1] 9 31 33 #> #> [[28]] #> + 4/34 vertices, from 35ab65a: #> [1] 9 31 33 34 #> #> [[29]] #> + 3/34 vertices, from 35ab65a: #> [1] 9 31 34 #> #> [[30]] #> + 2/34 vertices, from 35ab65a: #> [1] 31 33 #> #> [[31]] #> + 3/34 vertices, from 35ab65a: #> [1] 31 33 34 #> #> [[32]] #> + 2/34 vertices, from 35ab65a: #> [1] 31 34 #> #> [[33]] #> + 1/34 vertex, from 35ab65a: #> [1] 29 #> #> [[34]] #> + 2/34 vertices, from 35ab65a: #> [1] 29 32 #> #> [[35]] #> + 3/34 vertices, from 35ab65a: #> [1] 29 32 34 #> #> [[36]] #> + 2/34 vertices, from 35ab65a: #> [1] 29 34 #> #> [[37]] #> + 1/34 vertex, from 35ab65a: #> [1] 12 #> #> [[38]] #> + 1/34 vertex, from 35ab65a: #> [1] 10 #> #> [[39]] #> + 2/34 vertices, from 35ab65a: #> [1] 10 34 #> #> [[40]] #> + 1/34 vertex, from 35ab65a: #> [1] 5 #> #> [[41]] #> + 2/34 vertices, from 35ab65a: #> [1] 5 11 #> #> [[42]] #> + 2/34 vertices, from 35ab65a: #> [1] 5 7 #> #> [[43]] #> + 1/34 vertex, from 35ab65a: #> [1] 30 #> #> [[44]] #> + 2/34 vertices, from 35ab65a: #> [1] 30 33 #> #> [[45]] #> + 3/34 vertices, from 35ab65a: #> [1] 30 33 34 #> #> [[46]] #> + 2/34 vertices, from 35ab65a: #> [1] 30 34 #> #> [[47]] #> + 1/34 vertex, from 35ab65a: #> [1] 26 #> #> [[48]] #> + 2/34 vertices, from 35ab65a: #> [1] 26 32 #> #> [[49]] #> + 1/34 vertex, from 35ab65a: #> [1] 27 #> #> [[50]] #> + 2/34 vertices, from 35ab65a: #> [1] 27 30 #> #> [[51]] #> + 3/34 vertices, from 35ab65a: #> [1] 27 30 34 #> #> [[52]] #> + 2/34 vertices, from 35ab65a: #> [1] 27 34 #> #> [[53]] #> + 1/34 vertex, from 35ab65a: #> [1] 25 #> #> [[54]] #> + 2/34 vertices, from 35ab65a: #> [1] 25 26 #> #> [[55]] #> + 3/34 vertices, from 35ab65a: #> [1] 25 26 32 #> #> [[56]] #> + 2/34 vertices, from 35ab65a: #> [1] 25 28 #> #> [[57]] #> + 2/34 vertices, from 35ab65a: #> [1] 25 32 #> #> [[58]] #> + 1/34 vertex, from 35ab65a: #> [1] 24 #> #> [[59]] #> + 2/34 vertices, from 35ab65a: #> [1] 24 26 #> #> [[60]] #> + 2/34 vertices, from 35ab65a: #> [1] 24 30 #> #> [[61]] #> + 3/34 vertices, from 35ab65a: #> [1] 24 30 33 #> #> [[62]] #> + 4/34 vertices, from 35ab65a: #> [1] 24 30 33 34 #> #> [[63]] #> + 3/34 vertices, from 35ab65a: #> [1] 24 30 34 #> #> [[64]] #> + 2/34 vertices, from 35ab65a: #> [1] 24 28 #> #> [[65]] #> + 3/34 vertices, from 35ab65a: #> [1] 24 28 34 #> #> [[66]] #> + 2/34 vertices, from 35ab65a: #> [1] 24 33 #> #> [[67]] #> + 3/34 vertices, from 35ab65a: #> [1] 24 33 34 #> #> [[68]] #> + 2/34 vertices, from 35ab65a: #> [1] 24 34 #> #> [[69]] #> + 1/34 vertex, from 35ab65a: #> [1] 23 #> #> [[70]] #> + 2/34 vertices, from 35ab65a: #> [1] 23 33 #> #> [[71]] #> + 3/34 vertices, from 35ab65a: #> [1] 23 33 34 #> #> [[72]] #> + 2/34 vertices, from 35ab65a: #> [1] 23 34 #> #> [[73]] #> + 1/34 vertex, from 35ab65a: #> [1] 21 #> #> [[74]] #> + 2/34 vertices, from 35ab65a: #> [1] 21 33 #> #> [[75]] #> + 3/34 vertices, from 35ab65a: #> [1] 21 33 34 #> #> [[76]] #> + 2/34 vertices, from 35ab65a: #> [1] 21 34 #> #> [[77]] #> + 1/34 vertex, from 35ab65a: #> [1] 19 #> #> [[78]] #> + 2/34 vertices, from 35ab65a: #> [1] 19 33 #> #> [[79]] #> + 3/34 vertices, from 35ab65a: #> [1] 19 33 34 #> #> [[80]] #> + 2/34 vertices, from 35ab65a: #> [1] 19 34 #> #> [[81]] #> + 1/34 vertex, from 35ab65a: #> [1] 17 #> #> [[82]] #> + 2/34 vertices, from 35ab65a: #> [1] 6 17 #> #> [[83]] #> + 3/34 vertices, from 35ab65a: #> [1] 6 7 17 #> #> [[84]] #> + 2/34 vertices, from 35ab65a: #> [1] 7 17 #> #> [[85]] #> + 1/34 vertex, from 35ab65a: #> [1] 16 #> #> [[86]] #> + 2/34 vertices, from 35ab65a: #> [1] 16 33 #> #> [[87]] #> + 3/34 vertices, from 35ab65a: #> [1] 16 33 34 #> #> [[88]] #> + 2/34 vertices, from 35ab65a: #> [1] 16 34 #> #> [[89]] #> + 1/34 vertex, from 35ab65a: #> [1] 15 #> #> [[90]] #> + 2/34 vertices, from 35ab65a: #> [1] 15 33 #> #> [[91]] #> + 3/34 vertices, from 35ab65a: #> [1] 15 33 34 #> #> [[92]] #> + 2/34 vertices, from 35ab65a: #> [1] 15 34 #> #> [[93]] #> + 1/34 vertex, from 35ab65a: #> [1] 14 #> #> [[94]] #> + 2/34 vertices, from 35ab65a: #> [1] 14 34 #> #> [[95]] #> + 1/34 vertex, from 35ab65a: #> [1] 4 #> #> [[96]] #> + 2/34 vertices, from 35ab65a: #> [1] 4 14 #> #> [[97]] #> + 2/34 vertices, from 35ab65a: #> [1] 4 13 #> #> [[98]] #> + 2/34 vertices, from 35ab65a: #> [1] 4 8 #> #> [[99]] #> + 1/34 vertex, from 35ab65a: #> [1] 3 #> #> [[100]] #> + 2/34 vertices, from 35ab65a: #> [1] 3 4 #> #> [[101]] #> + 3/34 vertices, from 35ab65a: #> [1] 3 4 14 #> #> [[102]] #> + 3/34 vertices, from 35ab65a: #> [1] 3 4 8 #> #> [[103]] #> + 2/34 vertices, from 35ab65a: #> [1] 3 14 #> #> [[104]] #> + 2/34 vertices, from 35ab65a: #> [1] 3 10 #> #> [[105]] #> + 2/34 vertices, from 35ab65a: #> [1] 3 29 #> #> [[106]] #> + 2/34 vertices, from 35ab65a: #> [1] 3 28 #> #> [[107]] #> + 2/34 vertices, from 35ab65a: #> [1] 3 9 #> #> [[108]] #> + 3/34 vertices, from 35ab65a: #> [1] 3 9 33 #> #> [[109]] #> + 2/34 vertices, from 35ab65a: #> [1] 3 8 #> #> [[110]] #> + 2/34 vertices, from 35ab65a: #> [1] 3 33 #> #> [[111]] #> + 1/34 vertex, from 35ab65a: #> [1] 2 #> #> [[112]] #> + 2/34 vertices, from 35ab65a: #> [1] 2 3 #> #> [[113]] #> + 3/34 vertices, from 35ab65a: #> [1] 2 3 4 #> #> [[114]] #> + 4/34 vertices, from 35ab65a: #> [1] 2 3 4 14 #> #> [[115]] #> + 4/34 vertices, from 35ab65a: #> [1] 2 3 4 8 #> #> [[116]] #> + 3/34 vertices, from 35ab65a: #> [1] 2 3 14 #> #> [[117]] #> + 3/34 vertices, from 35ab65a: #> [1] 2 3 8 #> #> [[118]] #> + 2/34 vertices, from 35ab65a: #> [1] 2 4 #> #> [[119]] #> + 3/34 vertices, from 35ab65a: #> [1] 2 4 14 #> #> [[120]] #> + 3/34 vertices, from 35ab65a: #> [1] 2 4 8 #> #> [[121]] #> + 2/34 vertices, from 35ab65a: #> [1] 2 14 #> #> [[122]] #> + 2/34 vertices, from 35ab65a: #> [1] 2 31 #> #> [[123]] #> + 2/34 vertices, from 35ab65a: #> [1] 2 18 #> #> [[124]] #> + 2/34 vertices, from 35ab65a: #> [1] 2 20 #> #> [[125]] #> + 2/34 vertices, from 35ab65a: #> [1] 2 22 #> #> [[126]] #> + 2/34 vertices, from 35ab65a: #> [1] 2 8 #> #> [[127]] #> + 1/34 vertex, from 35ab65a: #> [1] 1 #> #> [[128]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 2 #> #> [[129]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 2 3 #> #> [[130]] #> + 4/34 vertices, from 35ab65a: #> [1] 1 2 3 4 #> #> [[131]] #> + 5/34 vertices, from 35ab65a: #> [1] 1 2 3 4 14 #> #> [[132]] #> + 5/34 vertices, from 35ab65a: #> [1] 1 2 3 4 8 #> #> [[133]] #> + 4/34 vertices, from 35ab65a: #> [1] 1 2 3 14 #> #> [[134]] #> + 4/34 vertices, from 35ab65a: #> [1] 1 2 3 8 #> #> [[135]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 2 4 #> #> [[136]] #> + 4/34 vertices, from 35ab65a: #> [1] 1 2 4 14 #> #> [[137]] #> + 4/34 vertices, from 35ab65a: #> [1] 1 2 4 8 #> #> [[138]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 2 14 #> #> [[139]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 2 18 #> #> [[140]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 2 20 #> #> [[141]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 2 22 #> #> [[142]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 2 8 #> #> [[143]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 3 #> #> [[144]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 3 4 #> #> [[145]] #> + 4/34 vertices, from 35ab65a: #> [1] 1 3 4 14 #> #> [[146]] #> + 4/34 vertices, from 35ab65a: #> [1] 1 3 4 8 #> #> [[147]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 3 14 #> #> [[148]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 3 9 #> #> [[149]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 3 8 #> #> [[150]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 4 #> #> [[151]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 4 14 #> #> [[152]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 4 13 #> #> [[153]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 4 8 #> #> [[154]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 14 #> #> [[155]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 5 #> #> [[156]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 5 11 #> #> [[157]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 5 7 #> #> [[158]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 12 #> #> [[159]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 6 #> #> [[160]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 6 11 #> #> [[161]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 6 7 #> #> [[162]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 11 #> #> [[163]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 7 #> #> [[164]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 13 #> #> [[165]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 18 #> #> [[166]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 20 #> #> [[167]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 22 #> #> [[168]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 32 #> #> [[169]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 9 #> #> [[170]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 8 #> weighted_cliques(g, maximal = TRUE) #> [[1]] #> + 3/34 vertices, from 35ab65a: #> [1] 32 33 34 #> #> [[2]] #> + 2/34 vertices, from 35ab65a: #> [1] 20 34 #> #> [[3]] #> + 4/34 vertices, from 35ab65a: #> [1] 9 31 33 34 #> #> [[4]] #> + 3/34 vertices, from 35ab65a: #> [1] 29 32 34 #> #> [[5]] #> + 2/34 vertices, from 35ab65a: #> [1] 10 34 #> #> [[6]] #> + 3/34 vertices, from 35ab65a: #> [1] 27 30 34 #> #> [[7]] #> + 3/34 vertices, from 35ab65a: #> [1] 25 26 32 #> #> [[8]] #> + 2/34 vertices, from 35ab65a: #> [1] 25 28 #> #> [[9]] #> + 2/34 vertices, from 35ab65a: #> [1] 24 26 #> #> [[10]] #> + 4/34 vertices, from 35ab65a: #> [1] 24 30 33 34 #> #> [[11]] #> + 3/34 vertices, from 35ab65a: #> [1] 24 28 34 #> #> [[12]] #> + 3/34 vertices, from 35ab65a: #> [1] 23 33 34 #> #> [[13]] #> + 3/34 vertices, from 35ab65a: #> [1] 21 33 34 #> #> [[14]] #> + 3/34 vertices, from 35ab65a: #> [1] 19 33 34 #> #> [[15]] #> + 3/34 vertices, from 35ab65a: #> [1] 6 7 17 #> #> [[16]] #> + 3/34 vertices, from 35ab65a: #> [1] 16 33 34 #> #> [[17]] #> + 3/34 vertices, from 35ab65a: #> [1] 15 33 34 #> #> [[18]] #> + 2/34 vertices, from 35ab65a: #> [1] 14 34 #> #> [[19]] #> + 2/34 vertices, from 35ab65a: #> [1] 3 10 #> #> [[20]] #> + 2/34 vertices, from 35ab65a: #> [1] 3 29 #> #> [[21]] #> + 2/34 vertices, from 35ab65a: #> [1] 3 28 #> #> [[22]] #> + 3/34 vertices, from 35ab65a: #> [1] 3 9 33 #> #> [[23]] #> + 2/34 vertices, from 35ab65a: #> [1] 2 31 #> #> [[24]] #> + 5/34 vertices, from 35ab65a: #> [1] 1 2 3 4 14 #> #> [[25]] #> + 5/34 vertices, from 35ab65a: #> [1] 1 2 3 4 8 #> #> [[26]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 2 18 #> #> [[27]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 2 20 #> #> [[28]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 2 22 #> #> [[29]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 3 9 #> #> [[30]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 4 13 #> #> [[31]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 5 11 #> #> [[32]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 5 7 #> #> [[33]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 12 #> #> [[34]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 6 11 #> #> [[35]] #> + 3/34 vertices, from 35ab65a: #> [1] 1 6 7 #> #> [[36]] #> + 2/34 vertices, from 35ab65a: #> [1] 1 32 #> largest_weighted_cliques(g) #> [[1]] #> + 5/34 vertices, from 35ab65a: #> [1] 1 2 3 4 14 #> weighted_clique_num(g) #> [1] 15"},{"path":"https://r.igraph.org/reference/which_multiple.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the multiple or loop edges in a graph — which_multiple","title":"Find the multiple or loop edges in a graph — which_multiple","text":"loop edge edge vertex . edge multiple edge exactly head tail vertices another edge. graph without multiple loop edges called simple graph.","code":""},{"path":"https://r.igraph.org/reference/which_multiple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the multiple or loop edges in a graph — which_multiple","text":"","code":"which_multiple(graph, eids = E(graph)) any_multiple(graph) count_multiple(graph, eids = E(graph)) which_loop(graph, eids = E(graph)) any_loop(graph)"},{"path":"https://r.igraph.org/reference/which_multiple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the multiple or loop edges in a graph — which_multiple","text":"graph input graph. eids edges query restricted. default edges graph.","code":""},{"path":"https://r.igraph.org/reference/which_multiple.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the multiple or loop edges in a graph — which_multiple","text":"any_loop() any_multiple() return logical scalar. which_loop() which_multiple() return logical vector. count_multiple() returns numeric vector.","code":""},{"path":"https://r.igraph.org/reference/which_multiple.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find the multiple or loop edges in a graph — which_multiple","text":"any_loop() decides whether graph loop edges. which_loop() decides whether edges graph loop edges. any_multiple() decides whether graph multiple edges. which_multiple() decides whether edges graph multiple edges. count_multiple() counts multiplicity edge graph. Note semantics which_multiple() count_multiple() different. which_multiple() gives TRUE occurrences multiple edge except one. .e. three -j edges graph which_multiple() returns TRUE two count_multiple() returns ‘3’ three. See examples getting rid multiple edges keeping original multiplicity edge attribute.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/which_multiple.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find the multiple or loop edges in a graph — which_multiple","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/which_multiple.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Find the multiple or loop edges in a graph — which_multiple","text":"igraph_is_multiple(), igraph_has_multiple(), igraph_count_multiple(), igraph_is_loop(), igraph_has_loop().","code":""},{"path":"https://r.igraph.org/reference/which_multiple.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find the multiple or loop edges in a graph — which_multiple","text":"","code":"# Loops g <- make_graph(c(1, 1, 2, 2, 3, 3, 4, 5)) any_loop(g) #> [1] TRUE which_loop(g) #> [1] TRUE TRUE TRUE FALSE # Multiple edges g <- sample_pa(10, m = 3, algorithm = \"bag\") any_multiple(g) #> [1] TRUE which_multiple(g) #> [1] FALSE TRUE TRUE FALSE TRUE FALSE FALSE TRUE TRUE FALSE TRUE TRUE #> [13] FALSE TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE #> [25] FALSE TRUE TRUE count_multiple(g) #> [1] 3 3 3 2 2 1 3 3 3 3 3 3 3 3 3 2 1 2 3 3 3 1 1 1 3 3 3 which_multiple(simplify(g)) #> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [13] FALSE all(count_multiple(simplify(g)) == 1) #> [1] TRUE # Direction of the edge is important which_multiple(make_graph(c(1, 2, 2, 1))) #> [1] FALSE FALSE which_multiple(make_graph(c(1, 2, 2, 1), dir = FALSE)) #> [1] FALSE TRUE # Remove multiple edges but keep multiplicity g <- sample_pa(10, m = 3, algorithm = \"bag\") E(g)$weight <- count_multiple(g) g <- simplify(g, edge.attr.comb = list(weight = \"min\")) any(which_multiple(g)) #> [1] FALSE E(g)$weight #> [1] 3 3 2 1 3 1 1 1 2 1 1 1 1 2 1 2 1"},{"path":"https://r.igraph.org/reference/which_mutual.html","id":null,"dir":"Reference","previous_headings":"","what":"Find mutual edges in a directed graph — which_mutual","title":"Find mutual edges in a directed graph — which_mutual","text":"function checks reciprocal pair supplied edges.","code":""},{"path":"https://r.igraph.org/reference/which_mutual.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find mutual edges in a directed graph — which_mutual","text":"","code":"which_mutual(graph, eids = E(graph), loops = TRUE)"},{"path":"https://r.igraph.org/reference/which_mutual.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find mutual edges in a directed graph — which_mutual","text":"graph input graph. eids Edge sequence, edges probed. default includes edges order ids. loops Logical, whether consider directed self-loops mutual.","code":""},{"path":"https://r.igraph.org/reference/which_mutual.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find mutual edges in a directed graph — which_mutual","text":"logical vector length number edges supplied.","code":""},{"path":"https://r.igraph.org/reference/which_mutual.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find mutual edges in a directed graph — which_mutual","text":"directed graph (,B) edge mutual graph also includes (B,) directed edge. Note multi-graphs handled properly, .e. graph contains two copies (,B) one copy (B,), three edges considered mutual. Undirected graphs contain mutual edges definition.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/which_mutual.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find mutual edges in a directed graph — which_mutual","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/which_mutual.html","id":"related-documentation-in-the-c-library","dir":"Reference","previous_headings":"","what":"Related documentation in the C library","title":"Find mutual edges in a directed graph — which_mutual","text":"igraph_is_mutual().","code":""},{"path":"https://r.igraph.org/reference/which_mutual.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find mutual edges in a directed graph — which_mutual","text":"","code":"g <- sample_gnm(10, 50, directed = TRUE) reciprocity(g) #> [1] 0.52 dyad_census(g) #> $mut #> [1] 13 #> #> $asym #> [1] 24 #> #> $null #> [1] 8 #> which_mutual(g) #> [1] FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE TRUE TRUE TRUE FALSE #> [13] TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE FALSE FALSE #> [25] FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE #> [37] FALSE TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE TRUE #> [49] TRUE TRUE sum(which_mutual(g)) / 2 == dyad_census(g)$mut #> [1] TRUE"},{"path":"https://r.igraph.org/reference/with_edge_.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor modifier to add edge attributes — with_edge_","title":"Constructor modifier to add edge attributes — with_edge_","text":"Constructor modifier add edge attributes","code":""},{"path":"https://r.igraph.org/reference/with_edge_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor modifier to add edge attributes — with_edge_","text":"","code":"with_edge_(...)"},{"path":"https://r.igraph.org/reference/with_edge_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Constructor modifier to add edge attributes — with_edge_","text":"... attributes add. must named.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/with_edge_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Constructor modifier to add edge attributes — with_edge_","text":"","code":"make_( ring(10), with_edge_( color = \"red\", weight = rep(1:2, 5) ) ) %>% plot()"},{"path":"https://r.igraph.org/reference/with_graph_.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor modifier to add graph attributes — with_graph_","title":"Constructor modifier to add graph attributes — with_graph_","text":"Constructor modifier add graph attributes","code":""},{"path":"https://r.igraph.org/reference/with_graph_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor modifier to add graph attributes — with_graph_","text":"","code":"with_graph_(...)"},{"path":"https://r.igraph.org/reference/with_graph_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Constructor modifier to add graph attributes — with_graph_","text":"... attributes add. must named.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/with_graph_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Constructor modifier to add graph attributes — with_graph_","text":"","code":"make_(ring(10), with_graph_(name = \"10-ring\")) #> IGRAPH 5923784 U--- 10 10 -- 10-ring #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from 5923784: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10"},{"path":"https://r.igraph.org/reference/with_igraph_opt.html","id":null,"dir":"Reference","previous_headings":"","what":"Run code with a temporary igraph options setting — with_igraph_opt","title":"Run code with a temporary igraph options setting — with_igraph_opt","text":"Run code temporary igraph options setting","code":""},{"path":"https://r.igraph.org/reference/with_igraph_opt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run code with a temporary igraph options setting — with_igraph_opt","text":"","code":"with_igraph_opt(options, code)"},{"path":"https://r.igraph.org/reference/with_igraph_opt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run code with a temporary igraph options setting — with_igraph_opt","text":"options named list options change. code code run.","code":""},{"path":"https://r.igraph.org/reference/with_igraph_opt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run code with a temporary igraph options setting — with_igraph_opt","text":"result code.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/with_igraph_opt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run code with a temporary igraph options setting — with_igraph_opt","text":"","code":"with_igraph_opt( list(sparsematrices = FALSE), make_ring(10)[] ) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> [1,] 0 1 0 0 0 0 0 0 0 1 #> [2,] 1 0 1 0 0 0 0 0 0 0 #> [3,] 0 1 0 1 0 0 0 0 0 0 #> [4,] 0 0 1 0 1 0 0 0 0 0 #> [5,] 0 0 0 1 0 1 0 0 0 0 #> [6,] 0 0 0 0 1 0 1 0 0 0 #> [7,] 0 0 0 0 0 1 0 1 0 0 #> [8,] 0 0 0 0 0 0 1 0 1 0 #> [9,] 0 0 0 0 0 0 0 1 0 1 #> [10,] 1 0 0 0 0 0 0 0 1 0 igraph_opt(\"sparsematrices\") #> [1] TRUE"},{"path":"https://r.igraph.org/reference/with_vertex_.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor modifier to add vertex attributes — with_vertex_","title":"Constructor modifier to add vertex attributes — with_vertex_","text":"Constructor modifier add vertex attributes","code":""},{"path":"https://r.igraph.org/reference/with_vertex_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor modifier to add vertex attributes — with_vertex_","text":"","code":"with_vertex_(...)"},{"path":"https://r.igraph.org/reference/with_vertex_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Constructor modifier to add vertex attributes — with_vertex_","text":"... attributes add. must named.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/with_vertex_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Constructor modifier to add vertex attributes — with_vertex_","text":"","code":"make_( ring(10), with_vertex_( color = \"#7fcdbb\", frame.color = \"#7fcdbb\", name = LETTERS[1:10] ) ) %>% plot()"},{"path":"https://r.igraph.org/reference/without_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Construtor modifier to remove all attributes from a graph — without_attr","title":"Construtor modifier to remove all attributes from a graph — without_attr","text":"Construtor modifier remove attributes graph","code":""},{"path":"https://r.igraph.org/reference/without_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construtor modifier to remove all attributes from a graph — without_attr","text":"","code":"without_attr()"},{"path":[]},{"path":"https://r.igraph.org/reference/without_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Construtor modifier to remove all attributes from a graph — without_attr","text":"","code":"g1 <- make_ring(10) g1 #> IGRAPH b995390 U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from b995390: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 g2 <- make_(ring(10), without_attr()) g2 #> IGRAPH 6f1f0c2 U--- 10 10 -- #> + edges from 6f1f0c2: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10"},{"path":"https://r.igraph.org/reference/without_loops.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor modifier to drop loop edges — without_loops","title":"Constructor modifier to drop loop edges — without_loops","text":"Constructor modifier drop loop edges","code":""},{"path":"https://r.igraph.org/reference/without_loops.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor modifier to drop loop edges — without_loops","text":"","code":"without_loops()"},{"path":[]},{"path":"https://r.igraph.org/reference/without_loops.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Constructor modifier to drop loop edges — without_loops","text":"","code":"# An artificial example make_(full_graph(5, loops = TRUE)) #> IGRAPH b3af27e U--- 5 15 -- Full graph #> + attr: name (g/c), loops (g/l) #> + edges from b3af27e: #> [1] 1--1 1--2 1--3 1--4 1--5 2--2 2--3 2--4 2--5 3--3 3--4 3--5 4--4 4--5 5--5 make_(full_graph(5, loops = TRUE), without_loops()) #> IGRAPH e81bf27 U--- 5 10 -- Full graph #> + attr: name (g/c), loops (g/l) #> + edges from e81bf27: #> [1] 1--2 1--3 1--4 1--5 2--3 2--4 2--5 3--4 3--5 4--5"},{"path":"https://r.igraph.org/reference/without_multiples.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor modifier to drop multiple edges — without_multiples","title":"Constructor modifier to drop multiple edges — without_multiples","text":"Constructor modifier drop multiple edges","code":""},{"path":"https://r.igraph.org/reference/without_multiples.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor modifier to drop multiple edges — without_multiples","text":"","code":"without_multiples()"},{"path":[]},{"path":"https://r.igraph.org/reference/without_multiples.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Constructor modifier to drop multiple edges — without_multiples","text":"","code":"sample_(pa(10, m = 3, algorithm = \"bag\")) #> IGRAPH 7b2a90a D--- 10 27 -- Barabasi graph #> + attr: name (g/c), power (g/n), m (g/n), zero.appeal (g/n), algorithm #> | (g/c) #> + edges from 7b2a90a: #> [1] 2->1 2->1 2->1 3->2 3->2 3->1 4->1 4->3 4->1 5->3 5->1 5->3 #> [13] 6->1 6->3 6->1 7->1 7->3 7->3 8->1 8->1 8->3 9->1 9->3 9->1 #> [25] 10->1 10->1 10->2 sample_(pa(10, m = 3, algorithm = \"bag\"), without_multiples()) #> IGRAPH 6e012b0 D--- 10 16 -- Barabasi graph #> + attr: name (g/c), power (g/n), m (g/n), zero.appeal (g/n), algorithm #> | (g/c) #> + edges from 6e012b0: #> [1] 2->1 3->1 4->1 4->2 4->3 5->1 5->2 6->3 7->1 7->3 8->1 8->6 #> [13] 9->1 9->2 9->8 10->1"},{"path":"https://r.igraph.org/reference/write.graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Writing the graph to a file in some format — write.graph","title":"Writing the graph to a file in some format — write.graph","text":"write.graph() renamed write_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/write.graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Writing the graph to a file in some format — write.graph","text":"","code":"write.graph( graph, file, format = c(\"edgelist\", \"pajek\", \"ncol\", \"lgl\", \"graphml\", \"dimacs\", \"gml\", \"dot\", \"leda\"), ... )"},{"path":"https://r.igraph.org/reference/write.graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Writing the graph to a file in some format — write.graph","text":"graph graph export. file connection string giving file name write graph . format Character string giving file format. Right now pajek, graphml, dot, gml, edgelist, lgl, ncol dimacs implemented. igraph 0.4 argument case insensitive. ... , format specific arguments, see .","code":""},{"path":"https://r.igraph.org/reference/write_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Writing the graph to a file in some format — write_graph","title":"Writing the graph to a file in some format — write_graph","text":"write_graph() general function exporting graphs foreign file formats, however many formats implemented right now.","code":""},{"path":"https://r.igraph.org/reference/write_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Writing the graph to a file in some format — write_graph","text":"","code":"write_graph( graph, file, format = c(\"edgelist\", \"pajek\", \"ncol\", \"lgl\", \"graphml\", \"dimacs\", \"gml\", \"dot\", \"leda\"), ... )"},{"path":"https://r.igraph.org/reference/write_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Writing the graph to a file in some format — write_graph","text":"graph graph export. file connection string giving file name write graph . format Character string giving file format. Right now pajek, graphml, dot, gml, edgelist, lgl, ncol dimacs implemented. igraph 0.4 argument case insensitive. ... , format specific arguments, see .","code":""},{"path":"https://r.igraph.org/reference/write_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Writing the graph to a file in some format — write_graph","text":"NULL, invisibly.","code":""},{"path":"https://r.igraph.org/reference/write_graph.html","id":"edge-list-format","dir":"Reference","previous_headings":"","what":"Edge list format","title":"Writing the graph to a file in some format — write_graph","text":"edgelist format simple text file, one edge line, two vertex ids separated space character. file sorted first second column. format additional arguments.","code":""},{"path":"https://r.igraph.org/reference/write_graph.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Writing the graph to a file in some format — write_graph","text":"Adai , Date SV, Wieland S, Marcotte EM. LGL: creating map protein function algorithm visualizing large biological networks. J Mol Biol. 2004 Jun 25;340(1):179-90.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/write_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Writing the graph to a file in some format — write_graph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/write_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Writing the graph to a file in some format — write_graph","text":"","code":"g <- make_ring(10) file <- tempfile(fileext = \".txt\") write_graph(g, file, \"edgelist\") if (!interactive()) { unlink(file) }"},{"path":"https://r.igraph.org/news/index.html","id":"igraph-211","dir":"Changelog","previous_headings":"","what":"igraph 2.1.1","title":"igraph 2.1.1","text":"See https://github.com/igraph/rigraph/blob/9828d7b11be330f994f07ae93a071b356eced903/src/vendor/cigraph/CHANGELOG.md complete changelog, particular section “Breaking changes”.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"features-2-1-1","dir":"Changelog","previous_headings":"","what":"Features","title":"igraph 2.1.1","text":"Add p.value p.precision arguments fit_power_law() control computation p-value (#1546).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-2-1-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 2.1.1","text":"Preserve .undirected() signature thanks @jhollway, regression introduced igraph 2.1.0 (#1536).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"lifecycle-2-1-1","dir":"Changelog","previous_headings":"","what":"Lifecycle","title":"igraph 2.1.1","text":"Deprecate eigen_centrality(scale = ) (#1543). Put deprecation message beginning end similarity functions (#1549).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-2-1-1","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 2.1.1","text":"Update allcontributors table (#1552). Use mathjax now (#1538).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-2-1-1","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 2.1.1","text":"Prepare libxml2 depending bcrypt, use pkg-config (#1556, @kalibera).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-210","dir":"Changelog","previous_headings":"","what":"igraph 2.1.0","title":"igraph 2.1.0","text":"See https://github.com/igraph/rigraph/blob/05973441b83decdeab8cc9c500a642c00b924770/src/vendor/cigraph/CHANGELOG.md complete changelog, particular section “Breaking changes”.","code":""},{"path":[]},{"path":"https://r.igraph.org/news/index.html","id":"breaking-changes-2-1-0","dir":"Changelog","previous_headings":"Lifecycle","what":"Breaking changes","title":"igraph 2.1.0","text":"Breaking change: remove tkigraph {igraph} proper (#1474). Breaking change: Hard-deprecate get.edge() layout.grid.3d() deprecated 10 years (#1398). Breaking change: use rlang::arg_match() igraph.match.arg() (#1165).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"in-progress-deprecations-2-1-0","dir":"Changelog","previous_headings":"Lifecycle","what":"In-progress deprecations","title":"igraph 2.1.0","text":"working towards consistent interface, especially regards function naming: ultimately want igraph functions use snake case. Please update scripts codebases soon can. Add independence_number() alias ivs_size() (#1522). Add get_edge_ids() alias get.edge.ids() (#1510). Increase deprecation signal warning hub.score() authority.score() replaced hits_scores() (#1352). Soft-deprecate erdos.renyi.game() random.graph.game() (#1509).","code":""},{"path":[]},{"path":"https://r.igraph.org/news/index.html","id":"c-library-2-1-0","dir":"Changelog","previous_headings":"Features","what":"C library","title":"igraph 2.1.0","text":"Update vendored C/igraph sources igraph/igraph@d2e0f4eb567dfc505227c346a015bef574c4ccd1.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-functionality-2-1-0","dir":"Changelog","previous_headings":"Features","what":"New functionality","title":"igraph 2.1.0","text":"Support fit_power_law(implementation = \"plfit.p\") compute P-value (#1386). Add max_degree() (#1403). Add experimental sample_chung_lu() (#1416). Rename methods available sample_degseq() add \"edge.switching.simple\" method (#1376). Weight support eccentricity() radius() (#1211). Add argument checking add_shape() (#1478).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"more-informative-errors-2-1-0","dir":"Changelog","previous_headings":"Features","what":"More informative errors","title":"igraph 2.1.0","text":"Export .() etc. behavior similar dplyr::across() (#1436): functions like .() meant used inside [ now user misuses , error informative.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-2-1-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 2.1.0","text":"Fix including diagonal elements dense adjacency matrices (#1437). Align body graph.lattice() replacement make_lattice() (#1439). Use deprecated() default value circular argument make_lattice() (#1431). subgraph_centrality() now ignores edge directions (#1414). Remove unintended type conversions using disjoint_union() (#1375). Add missing PROTECT() (#1382). Fix reading LGL NCOL files (broken 2.0.0) (#1347). Fixed potential memory leak R_igraph_community_to_membership2() (#1367).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-2-1-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 2.1.0","text":"Improve manual page sample_() (#1477). Improve cross-links make_() manual page (#1476). Update is_separator() documentation based C docs (#1467). Add DOI citation (#1450). Improve documentation normalization methods laplacian_matrix() (#1420). Fix typos ?plot.common (@gvegayon) (#1413). Fix sample_degseq() example (#1297). Fix graph_from_adjacency_matrix() examples avoid warnings (#1302). Replace \\dontrun{} @examplesIf (#1307). Improve sample_gnp() examples. Improve centralization docs. clarifications betweenness() (#1489). Clarify betweenness cutoff normalized. Fix centr_eigen_tmax() docs. Make edge_density() examples relevant. Improve eigen_centrality() documentation. Improved cluster_edge_betweenness() documentation. sample_forestfire() tests example (#1318).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"developer-facing-docs-2-1-0","dir":"Changelog","previous_headings":"Documentation","what":"Developer-facing docs","title":"igraph 2.1.0","text":"Add slightly tweaked boilerplate CONTRIBUTING.md (#1423). Update troubleshooting document. Use {devtag} internal function docs (#1507). Make .igraph.progress() .igraph.status() internal (#1516).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-203","dir":"Changelog","previous_headings":"","what":"igraph 2.0.3","title":"igraph 2.0.3","text":"CRAN release: 2024-03-13 See https://github.com/igraph/rigraph/blob/3299d31/src/vendor/cigraph/CHANGELOG.md complete changelog bundled C core, https://github.com/igraph/rigraph/compare/f3fa58b..3299d31#diff-aeb78e0159780a9b26daabaf6f95f450b0cfec7161fc735f27ad69145a57dc84 changes since igraph 2.0.1. (permanent link recent changelog C core used R package https://github.com/igraph/rigraph/blob/main/src/vendor/cigraph/CHANGELOG.md.)","code":""},{"path":"https://r.igraph.org/news/index.html","id":"features-2-0-3","dir":"Changelog","previous_headings":"","what":"Features","title":"igraph 2.0.3","text":"GMP longer dependency (#1256), libxml2 (#1282) glpk optional. Update vendored sources igraph/igraph@857a125069c226f266562b3781b82833fe1d59d9. New voronoi_cells() compute Voronoi partitioning graph (#1173).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-2-0-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 2.0.3","text":"Fix rglplot(edge_label = ) (#1267).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"continuous-integration-2-0-3","dir":"Changelog","previous_headings":"","what":"Continuous integration","title":"igraph 2.0.3","text":"Run examples sanitizer (#1288). Add scheduled builds.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-2-0-3","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 2.0.3","text":"Make x11() usage example happen interactive sessions (#1301). Remove misleading comment warning given warning given (#1294). Improve min_st_separators() documentation (#1264). Add link discussion forum (#1279) logo (#1280). Add code finding duplicate @seealso, use (#1270). Remove duplicate @seealso ?sample_pa (#1268). Remove incorrect claim handling complete graphs is_separator() is_min_separator() (#1263). Fix error messages mentioning mention upgrade_graph() instead nonexisting upgrade_version() (#1252). Split is_bipartite() manual page manual page (#1230). Improve bug report template. CITATION.cff contains first three version components. Install lock workflow lock stale discussions one year (#1304).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-2-0-3","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 2.0.3","text":"Replace use deprecated barabasi.game() sample_pa() (#1291). Auto-generate are_adjacent(), avoid deprecated igraph_are_connected() C function (#1254).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-202","dir":"Changelog","previous_headings":"","what":"igraph 2.0.2","title":"igraph 2.0.2","text":"CRAN release: 2024-02-17 See https://github.com/igraph/rigraph/blob/f3fa58b/src/vendor/cigraph/CHANGELOG.md complete changelog bundled C core, https://github.com/igraph/rigraph/compare/1bd2bf79..f3fa58b#diff-aeb78e0159780a9b26daabaf6f95f450b0cfec7161fc735f27ad69145a57dc84 changes since igraph 2.0.1. (permanent link recent changelog C core used R package https://github.com/igraph/rigraph/blob/main/src/vendor/cigraph/CHANGELOG.md.)","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-2-0-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 2.0.2","text":"g + vertices(1, 2, foo = 3) works , regression introduced igraph 2.0.0 (#1247). sample_pa() respects .seq .dist arguments , regression introduced igraph 2.0.0 (#1226). isomorphisms() subgraph_isomorphisims(method = \"vf2\") work , regression introduced 2.0.0 (#1219). biconnected_components() now returns edge vertex sequences , regression introduced 2.0.0 (#1213). Remove zeros order order.components returned dfs(), regression introduced 2.0.0 (#1179). Memory leaks converting data C (#1196).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"features-2-0-2","dir":"Changelog","previous_headings":"","what":"Features","title":"igraph 2.0.2","text":"realize_bipartite_degseq() creates bipartite graph two degree sequences (#1212). is_biconnected() checks graph biconnected (#1204). distances() now supports Floyd-Warshall algorithm (#1186).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-2-0-2","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 2.0.2","text":"Use culturally diverse names intro vignettes (#1246). Formatting tweaks introductory vignettes (#1243). Recommend {pak} instead {remotes} (#1228). Fix typo mean_distance() docs. Update troubleshooting document, emphasize issues Anaconda environments (#1209). Improved docs shortest path functions (#1201). Document \"dsatur\" heuristic greedy_vertex_coloring() (#1206). Remove scg related docs (#1167). Fix typo ?articulation_points (#1191). Improve installation troubleshooting instructions (#1184). Improve docs assortativity (#1151).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"testing-2-0-2","dir":"Changelog","previous_headings":"","what":"Testing","title":"igraph 2.0.2","text":"Add tests isomorphisms() subgraph_isomorphisms() (#1225).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"packaging-2-0-2","dir":"Changelog","previous_headings":"","what":"Packaging","title":"igraph 2.0.2","text":"Always use bundled mini-gmp (#1233). config.h defines HAVE___UINT128_T (#1216). rely program configuration (#1232). configure manage libxml multiple include paths (#1197). Remove empty string configure (#1235). Link Fortran runtime Windows needed arpack. (#1215). Workaround deprecated enum values supported old GCC (#1205). HAVE_GFORTRAN flag win ucrt (#1171). make_empty_graph() now fully auto-generated (#1068). Eliminate manual edits autogenerated files (#1207). Add read-comments RStudio IDE (#1152).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-2-0-2","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 2.0.2","text":"Remove unused patch files (#1234). Update stimulus 0.21.4 (#1210). Avoid duplicate objects (#1223). Eliminate compiler warning simpleraytracer (#1185).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-2011","dir":"Changelog","previous_headings":"","what":"igraph 2.0.1.1","title":"igraph 2.0.1.1","text":"CRAN release: 2024-01-30","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-2-0-1-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 2.0.1.1","text":"Avoid .R() deprecated R 4.4.0.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-201","dir":"Changelog","previous_headings":"","what":"igraph 2.0.1","title":"igraph 2.0.1","text":"CRAN release: 2024-01-29","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-2-0-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 2.0.1","text":"Use cpp11 simpleraytracer glue avoid -Wlto warnings (#1163).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-200","dir":"Changelog","previous_headings":"","what":"igraph 2.0.0","title":"igraph 2.0.0","text":"major release brings development line C core https://github.com/igraph/igraph. See https://github.com/igraph/rigraph/blob/1bd2bf79/src/vendor/cigraph/CHANGELOG.md complete changelog, particular section “Breaking changes”. (permanent link recent changelog C core used R package https://github.com/igraph/rigraph/blob/main/src/vendor/cigraph/CHANGELOG.md.) Version 1.6.0 R package used version 0.9.9 C core. changes 0.10 series C core relevant version 2.0.0 R package, C core functions exposed R interface. Changes implementation functions C core may reflected functions R package. change log summary additional changes R interface.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"breaking-changes-2-0-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"igraph 2.0.0","text":"get.edge.ids(multi = TRUE) as_adjacency_matrix(edges = ) longer supported (#1101, #1080). Remove NA padding dfs(unreachable = FALSE)$order $order.bfs(unreachable = FALSE)$order, also igraph_options(return.vs.es = FALSE) (#1062, #1124). laplacian_matrix(normalized = TRUE) uses different normalization method (#1102). fit_power_law() longer returns KS.p component. Remove default value loops argument centr_degree_tmax() (#1114). as_adjacency_matrix() longer supports attributes type character (#1072). Remove graph.isomorphic.34() (#1065, #1067). Use lifecycle::deprecate_soft() deprecated functions (#1024, #1025, #1104). system libraries GLPK, GMP, libxml2 now mandatory compiling source.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-2-0-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 2.0.0","text":"Add scalar conversion checks critical places (#1069). Check receive scalar expecting scalar C code (#1051). Check matrix sizes supported range passing R (#1066). transitivity() now produces named vector local (weighted) case (#1057). plot() correctly computes intersections edges rectangle vertices (#1021). Fix compilation Windows spaces Rtools path (#1000).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"features-2-0-0","dir":"Changelog","previous_headings":"","what":"Features","title":"igraph 2.0.0","text":"Use 30 bits R’s RNG (#1079). Breaking change: Remove NA padding dfs(unreachable = FALSE)$order $order.bfs(unreachable = FALSE)$order, also igraph_options(return.vs.es = FALSE) (#1062, #1124). New k_shortest_paths() compute first k shortest paths two vertices (#1028).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-2-0-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 2.0.0","text":"Add GitHub bug report form. New vignette(\"deprecated-dot-case\") lists deprecated functions alternatives (#1013). Move deprecation badge top doc pages. Remove usage get.adjacency() intro vignettes (#1084). Fix math formatting fit_power_law() docs. Fix incorrect usage subgraph.edges() example. Clarify Infomap considers edge directions. Improve edge connectivity docs (#1119). Add missing diacritics.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-2-0-0","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 2.0.0","text":"Use [] assignment converting matrices (#1035). Move towards autogenerating bindings (#1043). Use %||% rlang (#1112). Replace loop lapply() returning vertex edge sets (#1033). duplicate prototypes, use common header rinterface.c rinterface_extra.c (#1055). Clean auto-generation code (#1031), remove unused parts code generation (#1032), eliminate use deprecated C functions. Use integers mode enum cluster_label_prop(). Standardize handling stimulus enum types (#1064). Remove unused vectorlist / matrixlist destructors (#1070). Remove unused stimulus type VERTEXSETLIST_INT (#1049). Remove unused types (#1060). Fix Stimulus definitions (#997). Avoid deprecated R_igraph_automorphisms() (#999). Use new ARPACK_DEFAULTS symbol C core default arpack options. Ignore upstream CITATION file avoid R CMD check NOTE (#1007). Add Aviator configuration.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"testing-2-0-0","dir":"Changelog","previous_headings":"","what":"Testing","title":"igraph 2.0.0","text":"Add as_biadjacency_matrix() tests named vectors (#1154, #1155). Test transferring colors isomorphism functions (#1050).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-160","dir":"Changelog","previous_headings":"","what":"igraph 1.6.0","title":"igraph 1.6.0","text":"CRAN release: 2023-12-11","code":""},{"path":"https://r.igraph.org/news/index.html","id":"breaking-changes-1-6-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"igraph 1.6.0","text":"New arpack_defaults() replaces igraph.arpack.default arpack_defaults lists (#800), consistent usage checks (#966). Define methods ape::.phylo() instead as_phylo() generic, remove deprecated asPhylo() (#763). bfs() unreachable nodes returns zero instead NaN rank (#956), negative instead NaN dist (#926). random_walk() adds one step, resulting list vertices length steps + 1 (#934). girth() returns Inf acyclic graphs (#931). Remove behaviour / parameters deprecated 1.3 (#842). Remove scg_eps(), scg_group() scg_semi_proj(), broken longer maintained (#946).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-1-6-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 1.6.0","text":"Fix printf() warning (#975). Fix calls isSymmetric() matrix objects class (#965). Reduce frequency interruption checks (#957).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"features-1-6-0","dir":"Changelog","previous_headings":"","what":"Features","title":"igraph 1.6.0","text":"Change “incidence matrix” naming “biadjacency matrix” (#962). Add aliases using neighborhood terminology ego functions: (#950). Rename arguments assortativity(values, values.) types1 types2 (#952). Add ellipsis cluster_label_prop() (#954). Placeholders is_acyclic() is_forest(), implemented igraph 2.0.0 (#945). is_tree(details = TRUE) designates first vertex root non-trees (#935). all_shortest_paths() returns vertex list res vpaths components (#930). Improve symmetry check adjacency matrices input (#911). Warn non-symmetric undirected adjacency matrix (#904).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-1-6-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 1.6.0","text":"Remove duplicate \\seealso{} (#948). Update knnk() sir() docs. Fix formula reciprocity() docs. strength() give warning weights given. Update sample_smallworld() manual page (#895). Correct documentation weighted cliques. Update Erdos-Renyi model docs.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"testing-1-6-0","dir":"Changelog","previous_headings":"","what":"Testing","title":"igraph 1.6.0","text":"Clean tests (#967). Stabilize tests cluster_label_prop() (#932), sample_pa() (#927), cluster_louvain() (#933), SIR (#936), sample_forestfire() (#929). Hard-code graph used test (#928). Update GML test file (#925). Improve test sampling Dirichlet distribution (#923). Omit test longer holds igraph 0.10 (#922). Stabilize test preparation upgrade (#920). Stabilize plot test (#919). Fix checks.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-151","dir":"Changelog","previous_headings":"","what":"igraph 1.5.1","title":"igraph 1.5.1","text":"CRAN release: 2023-08-10","code":""},{"path":"https://r.igraph.org/news/index.html","id":"breaking-changes-1-5-1","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"igraph 1.5.1","text":"Breaking change: start deprecation estimate_betweenness(), estimate_edge_betweenness(), estimate_closeness() (#852).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-1-5-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 1.5.1","text":"identical_graphs() now correctly detects identical graphs without node edge attributes (#757).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-1-5-1","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 1.5.1","text":"Change ownership rules attribute objects (#870). R_SEXP_to_igraph() R_SEXP_to_igraph_copy() get igraph_t object external pointer (#865). Remove ETIME() call Fortran code, already CRAN version 1.5.0.1 (#858). Ensure _GNU_SOURCE always defined (#877). Fix make clean (#860). Fix generation code functions VERTEX_COLOR -arguments (#850). Use -lquadmath Makevars.win, compatibility alternative R distributions Microsoft R Open (#855). getRversion() uses strings.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-1-5-1","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 1.5.1","text":"Add cffr file GHA workflow updates automatically (#873). Undeprecate neighborhood() (#851). Remove redundant reference AUTHORS DESCRIPTION.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"refactoring-1-5-1","dir":"Changelog","previous_headings":"","what":"Refactoring","title":"igraph 1.5.1","text":"Breaking change: start deprecation estimate_betweenness(), estimate_edge_betweenness(), estimate_closeness() (#852).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-150","dir":"Changelog","previous_headings":"","what":"igraph 1.5.0","title":"igraph 1.5.0","text":"CRAN release: 2023-06-16","code":""},{"path":"https://r.igraph.org/news/index.html","id":"breaking-changes-1-5-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"igraph 1.5.0","text":"internal format graph objects changed mostly backward-compatible way, prepare upgrading C core 0.10. Details described https://github.com/igraph/rigraph/wiki/-igraph-object-format. Accessing graph objects created older igraph version give clean error message instructions (#832). new format read igraph 1.4.3 older, following error raised trying : supported remedy upgrade igraph package version 1.5.0 later. graph_version() now returns integer scalar (#832, #847), 4 igraph 1.5.0 (#835).","code":"This graph was created by an old(er) igraph version. Call upgrade_graph() on it to use with the current igraph version For now we convert it on the fly... Error in is_directed(object) : REAL() can only be applied to a 'numeric', not a 'NULL'"},{"path":"https://r.igraph.org/news/index.html","id":"features-1-5-0","dir":"Changelog","previous_headings":"","what":"Features","title":"igraph 1.5.0","text":"Vertex edge sequences converted numeric vectors used attributes (#808). New largest_component() returns largest connected component (#786, @ngmaclaren).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-1-5-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 1.5.0","text":"Fix error message make_graph() simplify = ... used non-formula (#834).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"testing-1-5-0","dir":"Changelog","previous_headings":"","what":"Testing","title":"igraph 1.5.0","text":"Add tests graph_from_literal() (#826). Reenable serialization test tests dyad_census(), stabilize tests (#809, #822, #823).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-1-5-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 1.5.0","text":"documentation R package now hosted https://r.igraph.org/ (#780). Update vignette(\"installation-troubleshooting\"). Fix use deprecated functions examples, e.g., replace gsize() ecount() (#827). Fix typos ?eigen_centrality docs (@JJ). Update CONTRIBUTING.md ORCID information (#791, #774). Add DOI CITATION (#773).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-1-5-0","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 1.5.0","text":"Add data old igraph versions constructed objects, tests (#838). Ensure ’re always using named indexes access internal data structure (#784). Prepare migration igraph/C 0.10 (#781). Update generated interface (#765).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-143","dir":"Changelog","previous_headings":"","what":"igraph 1.4.3","title":"igraph 1.4.3","text":"CRAN release: 2023-05-22","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-1-4-3","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 1.4.3","text":"Fix tests dev waldo (#779, @hadley). Fix linking Windows: gfortran needs quadmath. (#778).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-1-4-3","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 1.4.3","text":"Mention limitation Pajek reader (#776).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-142","dir":"Changelog","previous_headings":"","what":"igraph 1.4.2","title":"igraph 1.4.2","text":"CRAN release: 2023-04-07","code":""},{"path":"https://r.igraph.org/news/index.html","id":"breaking-changes-1-4-2","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"igraph 1.4.2","text":"Remove igraph.eigen.default() eigen_defaults, introduce internal eigen_defaults() function (#741). Remove broken nexus*() functions (#705), srand() (#701).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"c-core-1-4-2","dir":"Changelog","previous_headings":"","what":"C core","title":"igraph 1.4.2","text":"Update C core. ARPACK-based calculations now interruptible. shortest_paths() all_shortest_paths() longer crash invalid vertex passed weights used. See diff details.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"printing-1-4-2","dir":"Changelog","previous_headings":"","what":"Printing","title":"igraph 1.4.2","text":"Use true vertex names printing vertex sets. vertex set captures relationship vertices (e.g., father component bfs()), vertex set printed named vector (#754). Suggest restarting R session fatal error (#745).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-1-4-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 1.4.2","text":"as_long_data_frame() now correctly processes vertex attributes works graphs without vertex attributes (#748). .hclust(hrg.fit(g)) works (#721).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-1-4-2","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 1.4.2","text":"documentation now available https://igraph.org/ (#743). Reorganize function reference (#662). Replace graph() make_graph() examples (#738). Add docs .hclust.igraphHRG() (#733). Merged man page hub_score() authority_score() (#698). Refactor contributors listing (#647). Improve “family” titles (#679). Improve docs ego/neighborhood functions. Improve transitivity() docs.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-1-4-2","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 1.4.2","text":"Introduce cpp11 package improve error handling long run (#720). Avoid longjmp error handling interrupts (#751). .hclust.igraphHRG uses .Call() interface (#727).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-141","dir":"Changelog","previous_headings":"","what":"igraph 1.4.1","title":"igraph 1.4.1","text":"CRAN release: 2023-02-24","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-1-4-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 1.4.1","text":"console() now works provides Tcl/Tk based UI igraph can post status messages progress info (#664). Fix errors printing long vertex names (#677, @ahmohamed). Fix regression broke builds systems (e.g., GCC version 5 earlier), introduced igraph 1.4.0 (#670, #671). fit_hrg() crash called graph less three vertices.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-1-4-1","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 1.4.1","text":"Various improvements (#663, @maelle; #667).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-1-4-1","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 1.4.1","text":"Fix warning yyget_leng() returning wrong type using LTO (#676). Don’t mention C++11 C++17 best compatibility newest R older compilers, still requesting C++ compiler linking. Don’t ignore build/ building package vignette index built . Skip plot test entirely R-devel. Avoid submodules building igraph (#674). Makevars cleanup (#671). Add Zenodo configuration file.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-140","dir":"Changelog","previous_headings":"","what":"igraph 1.4.0","title":"igraph 1.4.0","text":"CRAN release: 2023-02-10","code":""},{"path":"https://r.igraph.org/news/index.html","id":"breaking-changes-1-4-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"igraph 1.4.0","text":"Breaking change: Allow change attribute type setting attribute vertices edges; attributes length 1 length target set allowed (#633).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"added-1-4-0","dir":"Changelog","previous_headings":"","what":"Added","title":"igraph 1.4.0","text":"tkplot() gained palette argument now using palette plot() default, sake consistency. plot.igraph() gained loop.size argument can used scale common radius loop edges.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"fixed-1-4-0","dir":"Changelog","previous_headings":"","what":"Fixed","title":"igraph 1.4.0","text":"default maximum number iterations ARPACK increased 3000 match igraph C core. Rare convergence problems corrected cluster_leading_eigen(). ARPACK-based functions now respect random seeds set R generating random starting vector. igraph_version() returned invalid value 1.3.4, now corrected. value par(xpd=...) now restored plotting graph. Fixed bug .dendrogram.communities() large dendrograms, thanks @pkharchenko (see PR #292). Fixed two bugs graph_from_incidence_matrix() prevented creation directed graphs mode=\"\" dense sparse matrices. dfs() accidentally returned zero-based root vertex indices result object; now fixed indices now 1-based. as_graphnel() duplicate loop edges . as_graphnel() now checks input graph multi-edges. Multi-edges supported graphNEL class. convex_hull() now returns vertices convex hull 1-based indexing. rgl.*() function calls codebase replaced equivalent *3d() function calls preparation upcoming deprecations rgl (see PR #619) plot.igraph() use frame=... partial argument calling plot.default(). default NULL value frame.plot now also handled correctly. hub_score() authority_score() considered self-loops diagonal adjacency matrix undirected graphs, thus result identical obtained eigen_centrality() loopy undirected graphs. now corrected. distances() longer ignores mode parameter algorithm='johnson'.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"deprecated-1-4-0","dir":"Changelog","previous_headings":"","what":"Deprecated","title":"igraph 1.4.0","text":"automorphisms() renamed count_automorphisms(); old name still available, deprecated.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"other-1-4-0","dir":"Changelog","previous_headings":"","what":"Other","title":"igraph 1.4.0","text":"Documentation improvements. Github repository now moved single-branch setup package can built main branch directly. Added igraph extended tutorial R vignette (#587). igraph now homepage based pkgdown thanks @maelle (see #645). eventually become official homepage.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-135","dir":"Changelog","previous_headings":"","what":"igraph 1.3.5","title":"igraph 1.3.5","text":"CRAN release: 2022-09-22 Added: mark.groups=... argument plot.igraph() now accepts communities objects Fixed: Negative degree exponents allowed sample_pa() sample_aging_pa(). Package updated compatible Matrix 1.5. : Documentation improvements fixes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-134","dir":"Changelog","previous_headings":"","what":"igraph 1.3.4","title":"igraph 1.3.4","text":"CRAN release: 2022-07-19 Added: sample_asym_pref() now returns generated types vertices vertex attributes named outtype intype. Fixed: layout_nicely() recurse infinitely assigned layout attribute graph layout_nicely() now ignores edge weights non-positive edge weights. needed igraph 1.3.3 started validating edge weights layout_with_fr() layout_with_drl(), resulting errors layout_nicely() used weighted graphs negative weights. Since layout_nicely() default layout algorithm plot(), users even aware using FR DrL layouts behind scenes. Now policy layout_nicely() attempts get job done without errors possible, even means edge weights must ignored. warning printed case.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-133","dir":"Changelog","previous_headings":"","what":"igraph 1.3.3","title":"igraph 1.3.3","text":"CRAN release: 2022-07-14 Added: reverse_edges() reverses specific edges graph. Single-bracket indexing V() E() resolves attribute names indexing expressions default (instance, E(g)[weight > x] matches edges weight larger threshold). can problematic attribute masks one variables local evaluation context. now pronoun called .env (similarly rlang::.env) allows force attribute name lookup calling environment. sake completeness, also provide .data (similarly rlang::.data) force attribute name lookup vertex / edge attributes . pronouns automatically injected environment indexing expression evaluated. Deprecated: Names functions can used inside V() E() indexing start dot since igraph 1.1.1; however, old dotless names print deprecation warning may gone unnoticed years. introducting deprecation warning nei(), innei(), outnei(), inc(), () () inside single-bracket indexing vertex edge sequences remove old variants soon.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-132","dir":"Changelog","previous_headings":"","what":"igraph 1.3.2","title":"igraph 1.3.2","text":"CRAN release: 2022-06-13 C core updated 0.9.9, fixing range bugs. Fixed: length size-zero communities objects now reported correctly. layout_with_kk() fail produce reasonable results default initial coordinates. corrected, however, function longer produces precisely output given graph . restore previous behaviour, use layout_with_kk(g, coord=layout_in_circle(g)) 2D layout_with_kk(g, dim=3, coord=layout_on_sphere(g)) 3D. Indexing igraph.vs object v[x, na_ok=T] now correctly handles na_ok argument cases; previous versions ignored x single number. : Documentation improvements fixes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-131","dir":"Changelog","previous_headings":"","what":"igraph 1.3.1","title":"igraph 1.3.1","text":"CRAN release: 2022-04-20 Fixed: graph_from_adjacency_matrix() now works sparse matrices even cell values sparse matrix unspecified. Fixed crash cluster_walktrap() modularity=FALSE membership=FALSE. cluster_walktrap() longer accepts invalid weight vectors. cluster_walktrap() longer returns modularity vector invalid length disconnected graphs. also fixes rare failures function weighted disconnected graphs. edge_attr() ignore index=... argument . automorphisms(), automorphism_group() canonical_permutation() now allow possible values supported C core sh argument. Earlier versions supported \"fm\". vertex.frame.width plotting parameter now allows zero negative values; simply remove outline corresponding vertex. documentation sh argument BLISS isomorphism algorithm isomorphic() fixed; earlier versions incorrectly referred sh1 sh2. dominator_tree() now conforms documentation respect dom component result: contains indices dominator vertices vertex -1 root dominator tree. Mentions \"power\" algorithm page_rank() removed documentation, method longer available. Several documentation fixes bring docs date new behaviours igraph 1.3.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-130","dir":"Changelog","previous_headings":"","what":"igraph 1.3.0","title":"igraph 1.3.0","text":"CRAN release: 2022-04-01 C core updated 0.9.7, fixing range bugs introducing number new functions. Added: has_eulerian_path() has_eulerian_cycle() decides whether Eulerian path cycle graph. eulerian_path() eulerian_cycle() returns edges vertices Eulerian path cycle graph. any_loop() checks whether graph contains least one loop edge. is_tree() checks whether graph tree also finds possible root to_prufer() converts tree graph Prufer sequence make_from_prufer() creates tree graph Prufer sequence sample_tree() sample labelled trees uniformly random sample_spanning_tree() sample spanning trees undirected graph uniformly random automorphisms() canonical_permutation() now supports vertex colors random_edge_walk() record edges traversed random walk harmonic_centrality() calculates harmonic centrality vertices, optionally cutoff path lengths mean_distance() now supports edge weights can also return number unconnected vertex pairs details=TRUE passed argument greedy_vertex_coloring() finds vertex colorings based simple greedy algorithm. bridges() finds bridges (cut-edges) graph frame width circle, rectangle square vertex shapes can now adjusted plots frame.width vertex attribute vertex.frame.width keyword argument, thanks @simoncarrignon . See PR #500 details. automorphism_group() returns possible (necessarily minimal) generating set automorphism group graph. global_efficiency() calculates global efficiency graph. local_efficiency() calculates local efficiency vertex graph. average_local_efficiency() calculates average local efficiency across set vertices graph. rewire(each_edge(...)) now supports rewiring one endpoint edge. realize_degseq() generates graphs degree sequences deterministic manner. also available make_(degseq(..., deterministic=TRUE)). clique_size_counts() counts cliques different sizes without storing . feedback_arc_set() finds minimum-weight feedback arc set graph, either exact integer programming algorithm linear-time approximation. make_bipartite_graph() now handles vertices names. shortest_paths() now supports graphs negative edge weights. min_cut() now supports s-t mincuts even value.=FALSE. .matrix() now supports converting igraph graph adjacency edge list matrix representation. See .matrix.igraph() details. function migrated intergraph; thanks Michal Bojanowski. Fixed: is_connected() now returns FALSE null graph Calling length() graph now returns number vertices make consistent indexing graph [[. diameter() now corrently returns infinity disconnected graphs unconnected=FALSE. Previous versions returned number vertices plus one, clearly invalid weighted graphs. mean_distance() now correctly treats path length disconnected vertices infinite unconnected=FALSE. Previous versions used number vertices plus one, adding bias towards number, even graph weighted number vertices plus one path length safely considered longer “valid” path. layout_with_sugiyama() now handles case exactly one extra virtual node correctly; fixes #85 bfs() dfs() callback functions now correctly receive 1-based vertex indices ranks; used zero-based earlier versions Accidentally returning non-logical value bfs() dfs() callback crash R Calling print() graph small max.lines value (smaller number lines needed print attribute list header) raise error ; fixes #179 as_adjacency_matrix(edges=TRUE, sparse=TRUE) now consistently returns last edge ID cell matrix instead summing . Using + - operators path() object consisting two vertices now handled correctly; fixes #355 topo_sort() now throws error input graph acyclic instead returning incorrect partial ordering. Weighted transitivity calculations (.e. transitivity(mode=\"barrat\") now throw error multigraphs; implementation work correctly multigraphs earlier versions warn . Changed: neimode argument bfs() dfs() renamed mode sake consistency functions. old argument name deprecated removed 1.4.0. bfs() dfs() callback functions now correctly receive 1-based vertex indices ranks; used zero-based earlier versions. (actually bugfix ’s also mentioned “Fixed” section). closeness(), betweenness() edge_betweenness() now take cutoff argument . estimate_closeness(), estimate_betweenness() estimate_edge_betweenness() became aliases, identical signature. deprecated implementation might change future versions provide proper estimation schemes instead simple cutoff-based approximation. explicitly need cutoffs want results reproducible future versions, use closeness(), betweenness() edge_betweenness() code cutoff argument. closeness() now considers reachable vertices calculation; words, closeness centrality now calculated per-component basis disconnected graphs. Earlier versions considered vertices. Deprecated: Using cutoff=0 closeness(), betweenness() edge_betweenness() deprecated; want exact scores, use negative cutoff. cutoff=0 interpreted literally igraph 1.4.0. centr_degree_tmax() now prints warning invoked without explicit loops argument. loops mandatory igraph 1.4.0. nexus_list(), nexus_info(), nexus_get() nexus_search() functions now return error informing user Nexus graph repository taken offline (actually, several years ago). functions removed 1.4.0. edges argument as_adjacency_matrix() deprecated; removed igraph 1.4.0. Removed: deprecated page_rank_old() function deprecated power method page_rank() removed.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-1211","dir":"Changelog","previous_headings":"","what":"igraph 1.2.11","title":"igraph 1.2.11","text":"CRAN release: 2022-01-04 Dec 27, 2021 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-1210","dir":"Changelog","previous_headings":"","what":"igraph 1.2.10","title":"igraph 1.2.10","text":"CRAN release: 2021-12-15 Dec 14, 2021 Fixed: macOS versions igraph accidentally built without GraphML support CRAN; now fixed.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-129","dir":"Changelog","previous_headings":"","what":"igraph 1.2.9","title":"igraph 1.2.9","text":"CRAN release: 2021-11-23 Nov 22, 2021 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-128","dir":"Changelog","previous_headings":"","what":"igraph 1.2.8","title":"igraph 1.2.8","text":"CRAN release: 2021-11-07 Oct 26, 2021 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-127","dir":"Changelog","previous_headings":"","what":"igraph 1.2.7","title":"igraph 1.2.7","text":"CRAN release: 2021-10-15 Oct 15, 2021 C core updated 0.8.5, fixing range bugs introducing number new functions. Added: cluster_leiden added (#399). cluster_fluid_communities added (#454) Fixed: make_lattice() correctly rounds length nearest integer printing warning (#115). make_empty_graph(NULL) now prints error instead producing invalid graph (#404). make_graph(c()) now produces empty graph instead printing misleading error message (#431). Printing graph edges NA names endpoints produce misleading error message (#410). types argument functions related bipartite graphs now prints warning types coerced booleans (#476). Betweenness normalisation longer overflows (#442). layout_with_sugiyama() returns layout type matrix even one vertex graph (#408). Plotting null graph (.e. graph vertices) throw error (#387). Deprecated: membership argument modularity.matrix() now deprecated function never needed anyway. modularity() now prints warning applied directed graph implementation igraph’s C core support directed graphs version 0.8.5. warning turned error next minor (1.3.0) version R interface; error removed later C core updated version supports modularity directed networks. transitivity() now prints warning local variant (type=\"local\") called directed graph graph multiple edges beecause implementation C core igraph work reliably cases version 0.8.5. warning turned error next minor (1.3.0) version R interface; error removed later C core updated version supports transitivity networks multiple edges. Misc: Documentation improvements.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-126","dir":"Changelog","previous_headings":"","what":"igraph 1.2.6","title":"igraph 1.2.6","text":"CRAN release: 2020-10-06 Oct 5, 2020 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-125","dir":"Changelog","previous_headings":"","what":"igraph 1.2.5","title":"igraph 1.2.5","text":"CRAN release: 2020-03-19 Mar 27, 2020 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-124","dir":"Changelog","previous_headings":"","what":"igraph 1.2.4","title":"igraph 1.2.4","text":"CRAN release: 2019-02-13 Feb 13, 2019 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-123","dir":"Changelog","previous_headings":"","what":"igraph 1.2.3","title":"igraph 1.2.3","text":"CRAN release: 2019-02-10 Jan 27, 2019 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-122","dir":"Changelog","previous_headings":"","what":"igraph 1.2.2","title":"igraph 1.2.2","text":"CRAN release: 2018-07-27 Jul 27, 2018 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-121","dir":"Changelog","previous_headings":"","what":"igraph 1.2.1","title":"igraph 1.2.1","text":"CRAN release: 2018-03-10 GLPK library optional, available, cluster_optimal() function work. Unfortunately bundle GLPK library igraph CRAN , CRAN maintainers forbid pragmas source code. Removed NMF package dependency, related functions. Fix compilation without libxml2","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-112","dir":"Changelog","previous_headings":"","what":"igraph 1.1.2","title":"igraph 1.1.2","text":"CRAN release: 2017-07-21 Jul 20, 2017 Fix compilation Solaris","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-111","dir":"Changelog","previous_headings":"","what":"igraph 1.1.1","title":"igraph 1.1.1","text":"CRAN release: 2017-07-16 Jul 13, 2017 Graph id printed header, graph_id function added Fix edge_attr index values Fix bfs() bug, restricted argument zero-based match_vertices exported now %>% re-exported better way, avoid interference packages ego_ functions default order = 1 now New function igraph_with_opt run code temporary igraph options settings Fix broken sample_asym_pref function Fix curve_multiple avoid warnings graphs self-loops. NMF package suggested now, hard dependency Fix gen_uid.c _SVID_SOURCE issues Avoid drawing straight lines Bezier curves Use pkgconfig package options. allows setting options per-package basis. E.g. package using igraph can set return.vs.es FALSE .onLoad() function, igraph return plain numeric vectors instead vertex/edge sequences called package. igraph_options() returns old values updated options, actually useful, returning new values . with_igraph_opt() function temporarily change values igraph options. get.edge() deprecated, use ends() instead. (already case igraph 1.0.0, forgot add NEWS point .) redefine .Call(), make native calls faster. Speed special cases indexing vertex sequences. Removed anyNA() call, compatible older R versions. Fixed fast-greedy community finding bug, https://github.com/igraph/igraph/issues/836 Fixed head_of() tail_of(), mixed . Plot: make label.dist independent label lengths, fixes #63. Plot: error unknown graphical parameters. Import functions base packages, eliminate R CMD check NOTEs. Re-add support edge weights Fruchterman-Reingold layout Check membership vector modularity(). Rename str.igraph() print_all(). Use igraph version exported graphs, instead @VERSION@ #75. Functions can used inside V() E() indexing now begin dot. Old names deprecated. New names: .nei(), .innei(), .outnei(), .inc(), .(), .(). #22 Fix packages convert graphs graph::graphNEL: don’t need attach ‘graph’ manually . Fix bugs layout_with_dh, layout_with_gem layout_with_sugiyama. crashed cases.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-101","dir":"Changelog","previous_headings":"","what":"igraph 1.0.1","title":"igraph 1.0.1","text":"CRAN release: 2015-06-26 June 26, 2015 minor updates: Documentation fixes. require C++-11 compiler . Fedora, Solaris Windows compilation fixes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-100","dir":"Changelog","previous_headings":"","what":"igraph 1.0.0","title":"igraph 1.0.0","text":"CRAN release: 2015-06-24 June 21, 2015","code":""},{"path":"https://r.igraph.org/news/index.html","id":"release-notes-1-0-0","dir":"Changelog","previous_headings":"","what":"Release notes","title":"igraph 1.0.0","text":"new major version igraph, call 1.0.0. mean ready, ’ll never ready. biggest changes release - new function names. functions renamed make consistent readable. (Relax, old names can still used, need update code.) - Better operations vertex edge sequences. functions return proper vertex/edge sequences instead numeric ids. - versatile make_() make_graph() functions create graphs.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"major-changes-1-0-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"igraph 1.0.0","text":"Many functions renamed. Old names documented, can still used. generic make_graph() function create graphs. generic layout_() (underscore!) function create graph layouts, see also add_layout_(). igraph data type changed. need call upgrade_graph() graphs created previous igraph versions. Vertex edge sequence operations: union, intersection, etc. Vertex edge sequences can used graphs belong . now strictly checked. functions return (sub)set vertices edges return vertex edge sequences instead. Vertex edge sequences [[ operator now, easy viewing vertex/edge metadata. Vertex edge sequences implemented weak references. See also as_ids() function convert simple ids. Vertex order can specified circle layout now. Davidson-Harel layout algorithm layout_with_dh(). GEM layout algorithm layout_with_gem(). Neighborhood functions mindist parameter smallest distance consider. all_simple_paths() function list simple paths graph. triangles() lists triangles graph. Fruchterman-Reingold Kamada-Kawai layout algorithms rewritten scratch. much faster follow original publications closely. Nicer printing graphs, vertex edge sequences. local_scan() function calculates scan statistics. Embeddings: embed_adjacency_matrix() embed_laplacian_matrix(). Product operator: *, graph multiple times. Can also used rep(). Better default colors, color palettes vertices. Random walk graph: random_walk() adjacent_vertices() incident_edges() functions, vectorized, opposed neighhors() incident(). Convert graph long data frame as_long_data_frame().","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-1-0-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 1.0.0","text":"many list. Please try issue fixed (re-)report . Thanks!","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-071","dir":"Changelog","previous_headings":"","what":"igraph 0.7.1","title":"igraph 0.7.1","text":"CRAN release: 2014-04-22 April 21, 2014","code":""},{"path":"https://r.igraph.org/news/index.html","id":"release-notes-0-7-1","dir":"Changelog","previous_headings":"","what":"Release Notes","title":"igraph 0.7.1","text":"bug fixes, make sure code included ‘Statistical Analysis Network Data R’ works. See https://github.com/kolaczyk/sand","code":""},{"path":"https://r.igraph.org/news/index.html","id":"detailed-changes-0-7-1","dir":"Changelog","previous_headings":"","what":"Detailed changes:","title":"igraph 0.7.1","text":"Graph drawing: fix labels curved edges, issue #181. Graph drawing: allow fixing edge labels given positions, issue #181. Drop ‘type’ vertex attribute bipartite projection, projections bipartite , issue #255. Print logical attributes header properly (.e. encoded l, x, complex attributes. Issue #578. Add constructor communities objects, see create.communities(). Issue #547. Better error handling GraphML parser. GraphML reader bit lenient now; makes possible read GraphML files saved yWorks apps. Fixed bug constaint(), issue #580. Bipartite projection now detects invalid edges instead giving cryptic error, issue #543. Fixed simplify argument graph.formula(), broken, issue #586. function crossing() adds better names result, fixes issue #587. sir() function gives error input graph simple, fixes issue #582. Calling igraph functions igraph callbacks allowed now, fixes issue #571.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-070","dir":"Changelog","previous_headings":"","what":"igraph 0.7.0","title":"igraph 0.7.0","text":"CRAN release: 2014-02-05 February 4, 2014","code":""},{"path":"https://r.igraph.org/news/index.html","id":"release-notes-0-7-0","dir":"Changelog","previous_headings":"","what":"Release Notes","title":"igraph 0.7.0","text":"bunch new features library , important changes life project. Thanks everyone sending code reporting bugs!","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph--github-0-7-0","dir":"Changelog","previous_headings":"Release Notes","what":"igraph @ github","title":"igraph 0.7.0","text":"igraph’s development moved Launchpad github. actually happened several month ago, never announced officially. place reporting bugs https://github.com/igraph/igraph/issues.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-homepage-0-7-0","dir":"Changelog","previous_headings":"Release Notes","what":"New homepage","title":"igraph 0.7.0","text":"igraph’s homepage now hosted http://igraph.org, brand new. wanted make easier use modern.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"better-nightly-downloads-0-7-0","dir":"Changelog","previous_headings":"Release Notes","what":"Better nightly downloads","title":"igraph 0.7.0","text":"can download nightly builds igraph http://igraph.org/nightly. Source binary R packages (windows OSX), built.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-features-and-bug-fixes-0-7-0","dir":"Changelog","previous_headings":"","what":"New features and bug fixes","title":"igraph 0.7.0","text":"Added demo hierarchical random graphs, invoke via demo(hrg). Make attribute prefixes optional writing GraphML file. Added function mod.matrix(). Support edge weights leading eigenvector community detection. Added LAD library checking (sub)graph isomorphism, version 1. Logical attributes. Added layout.bipartite() function, simple two-column layout bipartite graphs. Support incidence matrices bipartite Pajek files. Pajek files matrix format now directed default, unless bipartite. Support weighted (signed) networks Pajek file matrix format. Fixed bug barabasi.game(), algorithm psumtree-multiple just froze. Function layout.mds() default returns layout matrix now. Added support Boolean attributes GraphML GML readers writer. Change MDS layout coordinates, first dim according first eigenvalue, etc. plot.communities() (plot.igraph(), really) draws border around marked groups default. printing graphs now converts name graph attribute character Convenience functions query set attributes : vertex.attriubutes(), graph.attributes() edge.attributes(). Function graph.disjoint.union() handles attributes now. Rewrite graph.union() handle attributes properly. rewire(): now supports generation destruction loops. Erdos-Renyi type bipartite random graphs: bipartite.random.game(). Support new options (predecessors inbound_edges) get_shortest_paths(), reorganized output get.shortest.paths() completely. Added graphlets() related functions. Fix modularity values multilevel community merges . Fixed bug deleting edges FALSE matrix notation. Fix bonpow() alpha.centrality() make sure sparse solver called. tkplot() news: enable setting coordinates command line via tkplot.setcoords() access canvas via tkplot.canvas(). Fixed potential crash igraph_edge_connectivity(), un-initialized variable C code. Avoiding overflow closeness() related functions. Check NAs converting ‘type’ logical bipartite.projection(). graphNEL conversion functions load ‘graph’ package loaded load end search path, minimize conflicts. Fixed bug creating graphs adjacency matrices, now convert double, case integers. Fixed invalid memory read (potential crash) infomap community detection. Fixed memory leak functions attribute combinations. Removed memory leaks SCG functions. Fixed memory leaks ray tracer. Fixed memory leak graph.bfs() graph.dfs(). Fix bug triad census set first element result NaN. Fixed crash .chordal(). Fixed bug weighted modularity calculation, sum weights truncated integer. Fixed bug weighted multilevel communtiies, maximum weight rounded integer. Fixed bug centralization.closeness.tmax(). Reimplement push-relabel maximum flow gap heuristics. Maximum flow functions now return statistics push relabel algorithm steps. Function arpack() now gives error message unknown options given. Fixed missing whitespace Pajek writer ID attribute numeric. Fixed bug caused GML reader crash ID attribute non-numeric. Fixed issue #500, potential segfault two graphs BLISS differ number vertices edges. Added igraphtest() function. Fix dyad census instability, sometimes incorrect results reported. Dyad census detects integer overflow now gives warning. Function add.edges() allow now zeros vertex set. Added function count number adjacent triangles: adjacent.triangles(). Added graph.eigen() function, eigenproblems adjacency matrices. Added workarounds functions create lot graphs, decompose.graph() graph.neighborhood() use . Fixes issue #508. Added weights support optimal.community(), closes #511. Faster maximal clique finding. Added function count maximum cliques. Set operations: union, intersection, disjoint, union, difference, compose now work based vertex names (present) keep attributes, closes #20. Removed functions graph.intersection..name(), graph.union..name(), graph.difference..name(). + operator graphs now calls graph.union() argument graphs named, calls graph.disjoint.union() otherwise. Added function igraph.version(). Generate graphs stochastic block model: sbm.game(). suggest stats, XML, jpeg png packages . Fixed set.vertex/edge.attribute bug changed graph objects, copying (#533) Fixed bug barabasi.game caused crashes. use PRPACK calculate PageRank scores see https://github.com/dgleich/prpack Added'argument bipartite.projection (#307). Add normalized argument closeness functions, fixes issue #3. R: better handling complex attributes, [[ vertex/edge sets, fixes #231. Implement start argument hrg.fit (#225). Set root vertex Reingold-Tilford layout, solves #473. Fix betweenness normalization directed graphs. Fixed bug graph.density resulted incorrect values undirected graphs loops Fixed bug many graphs created one C call (e.g. graph.decompose), causing #550. Fixed sparse graph.adjacency bugs graphs one edge, graphs zero edges. Fixed bug made Bellman-Ford shortest paths calculations fail. Fixed graph.adjacency bug undirected, weighted graphs sparse matrices. main, sub, xlab ylab proper graphics parameters now (#555). graph.data.frame coerces arguments data frame (#557). Fixed minimum cut bug weighted undirected graphs (#564). Functions simulating epidemics (SIR model) networks, see sir function. Fixed argument ordering graph.mincut related functions. Avoid copying attributes query functions print (#573), functions much faster now graphs many vertices/edges attributes. Speed writing GML GraphML files, attributes integer. really-really slow. Fix multiple root vertices graph.bfs (#575).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-066","dir":"Changelog","previous_headings":"","what":"igraph 0.6.6","title":"igraph 0.6.6","text":"CRAN release: 2013-10-28 Released Oct 28, 2013 bugs fixed: Fixed potential crash infomap.community() function. Various fixed operators work vertex names (#136). Fixed example arpack() manual page. arpack() now gives error message unknown options supplied (#492). Better arpack() error messages. Fixed missing whitespace Pajek writer ID attribute numeric. Fixed dyad census instability, sometimes incorrect results reported (#496). Fixed bug caused GML reader crash ID attribute non-numeric Fixed potential segfault two graphs BLISS differ number vertices edges (#500). Added igraphtest() function run tests R (#485). Dyad census detects integer overflow now gives warning (#497). R: add.edges() allow now zeros vertex set (#503). Add C++ namespace files didn’t one. Fixes incompatibility packages (e.g. rgl) mysterious crashes (#523). Fixed bug caused side effect set.vertex.attributes(), set.edge.attributes() set.graph.attributes() (#533). Fixed bug degree.distribution() cluster.distribution() (#257).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-065-2","dir":"Changelog","previous_headings":"","what":"igraph 0.6.5-2","title":"igraph 0.6.5-2","text":"CRAN release: 2013-05-23 Released May 16, 2013 Worked two CRAN check problems, gfortran bug (string bound checking work code called C without string length arguments “right” place). Otherwise identical 0.6.5-1.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-065-1","dir":"Changelog","previous_headings":"","what":"igraph 0.6.5-1","title":"igraph 0.6.5-1","text":"CRAN release: 2013-02-28 Released February 27, 2013 Fixing annoying bug, broke two packages CRAN: Setting graph attributes failed sometimes, attributes lists complex objects.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-065","dir":"Changelog","previous_headings":"","what":"igraph 0.6.5","title":"igraph 0.6.5","text":"CRAN release: 2013-02-25 Released February 24, 2013 minor release, fix annoying bugs 0.6.4: igraph now work well older R versions. Eliminate gap vertex edge plotting edge without arrow. Fixes #1118448. Fixed --bounds array indexing error DrL layout, potentially caused crashes. Fixed crash weighted betweenness calculation. Plotting: fixed bug caused misplaced arrows rectangle vertex shapes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-064","dir":"Changelog","previous_headings":"","what":"igraph 0.6.4","title":"igraph 0.6.4","text":"CRAN release: 2013-02-04 Released February 2, 2013 version number mistake, jump 0.6.4 0.6, technical reasons. version actually never really released, R packages version uploaded CRAN, include version NEW file.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-features-and-bug-fixes-0-6-4","dir":"Changelog","previous_headings":"","what":"New features and bug fixes","title":"igraph 0.6.4","text":"Added vertex shape API defining new vertex shapes, also couple new vertex shapes. Added get.data.frame() function, opposite graph.data.frame(). Added bipartite support Pajek reader writer, closes bug #1042298. degree.sequence.game() new method now: “simple_no_multiple”. Added .degree.sequence() .graphical.degree.sequence() functions. rewire() new method: “loops”, can create loop edges. Walktrap community detection now handles isolates. layout.mds() returns layout matrix now. layout.mds() uses LAPACK instead ARPACK. Handle ‘~’ character write.graph read.graph. Bug #1066986. Added k.regular.game(). Use vertex names plot labels specified function call vertex attributes. Fixes issue #1085431. power.law.fit() can now use C implementation. Fixed bug barabasi.game() .seq empty vector. Fixed bug made functions progress bar fail called another package. Fixed bug creating graphs weighted integer adjacency matrix via graph.adjacency(). Bug #1019624. Fixed overflow issues centralization calculations. Fixed minimal.st.separators() bug, vertex sets incorrectly reported separators. Bug #1033045. Fixed bug mishandled vertex colors VF2 isomorphism functions. Bug #1032819. Pajek exporter now always quotes strings, thanks Elena Tea Russo. Fixed bug handling small edge weights shortest paths calculation shortest.paths() (Dijkstra’s algorithm.) Thanks Martin J Reed. Weighted transitivity uses V(graph) ‘vids’ NULL. Fixed bug ‘pie’ vertices drawn together vertex shapes. Speed printing graphs. Speed attribute queries basic operations, avoiding copying graph. Bug #1043616. Fixed bug NCV setting ARPACK functions. bigger matrix size. layout.merge()’s DLA mode better defaults now. Fixed bug layout.mds() resulted vertices top . Fixed bug layout.spring(), working properly. Fixed layout.svd(), completely defunct. Fixed bug layout.graphopt() caused warnings platforms crashes. Fixed community..membership(). Bug #1022850. Fixed graph.incidence() crash called non-matrix argument. Fixed get.shortest.paths bug, output set “”. Motif finding functions return NA isomorphism classes motifs (.e. connected). Fixes bug #1050859. Fixed get.adjacency() attr given, attribute complex type. Bug #1025799. Fixed attribute name graph.adjacency() dense matrices. Bug #1066952. Fixed erratic behavior alpha.centrality(). Fixed igraph indexing, attr given. Bug #1073705. Fixed bug calculating largest cliques directed graph. Bug #1073800. Fixed bug maximal clique search, closes #1074402. Warn negative weights calculating PageRank. Fixed dense, unweighted graph.adjacency diag=FALSE. Closes issue #1077425. Fixed bug eccentricity() radius(), results often simply wrong. Fixed bug get..shortest.paths() edges zero weight. graph.data.frame() careful vertex names numbers, avoid scientific notation. Fixes issue #1082221. Better check NAs vertex names. Fixes issue #1087215 Fixed potential crash DrL layout generator. Fixed bug Reingold-Tilford layout graph directed mode != .","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-06","dir":"Changelog","previous_headings":"","what":"igraph 0.6","title":"igraph 0.6","text":"CRAN release: 2012-06-14 Released June 11, 2012 See also release notes http://igraph.sf.net/relnotes-0.6.html","code":""},{"path":"https://r.igraph.org/news/index.html","id":"r-major-new-features-0-6","dir":"Changelog","previous_headings":"","what":"R: Major new features","title":"igraph 0.6","text":"Vertices edges numbered 1 instead 0. Note makes old R igraph code incompatible igraph 0.6. want use old code, please use igraph0 package. See http://igraph.sf.net/relnotes-0.6.html. ‘[’ ‘[[’ operators can now used igraph graphs, ‘[’ graph behaves adjacency matrix, ‘[[’ treated adjacency list. also much simpler manipulate graph structure, .e. add/remove edges vertices, new operators. See ?graph.structure. functions take vector list vertices edges, vertex/edge names can given instead numeric ids. New package ‘igraphdata’, contains number data sets can used directly igraph. Igraph now supports loading graphs Nexus online data repository, see nexus.get(), nexus.info(), nexus.list() nexus.search(). community structure finding algorithm return ‘communities’ object now, bunch useful operations, see ?communities details. Vertex edge attributes handled much better now. kept whenever possible, can combined via flexible API. See ?attribute.combination. R now prints igraph graphs screen structured informative way. output summary() also updated accordingly.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"r-other-new-features-0-6","dir":"Changelog","previous_headings":"","what":"R: Other new features","title":"igraph 0.6","text":"possible mark vertex groups plots, via shading. Communities cohesive blocks plotted using default. igraph demos now available, see list via ‘demo(package=“igraph”)’. igraph now tries select optimal layout algorithm, plotting graph. Added simple console, using Tcl/Tk. contains text area status messages also status bar. See igraph.console(). Reimplemented igraph options support, see igraph.options() getIgraphOpt(). Igraph functions can now print status messages.","code":""},{"path":[]},{"path":"https://r.igraph.org/news/index.html","id":"community-detection-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Community detection","title":"igraph 0.6","text":"multi-level modularity optimization community structure detection algorithm Blondel et al. added, see multilevel.community(). Distance two community structures: compare.communities(). Community structure via exact modularity optimization, optimal.community(). Hierarchical random graphs community finding, porting code Aaron Clauset. See hrg.game(), hrg.fit(), etc. Added InfoMAP community finding method, thanks Emmanuel Navarro code. See infomap.community().","code":""},{"path":"https://r.igraph.org/news/index.html","id":"shortest-paths-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Shortest paths","title":"igraph 0.6","text":"Eccentricity (eccentricity()), radius (radius()) calculations. Shortest path calculations get.shortest.paths() can now return edges along shortest paths. get..shortest.paths() now supports edge weights.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"centrality-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Centrality","title":"igraph 0.6","text":"Centralization scores degree, closeness, betweenness eigenvector centrality. See centralization.scores(). Personalized Page-Rank scores, see page.rank(). Subgraph centrality, subgraph.centrality(). Authority (authority.score()) hub (hub.score()) scores support edge weights now. Support edge weights betweenness closeness calculations. bonpow(), Bonacich’s power centrality alpha.centrality(), Alpha centrality calculations now use sparse matrices default. Eigenvector centrality calculation, evcent() now works directed graphs. Betweenness calculation can now use arbitrarily large integers, required lattice-like graphs avoid overflow.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"inputoutput-and-file-formats-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Input/output and file formats","title":"igraph 0.6","text":"Support DL file format graph.read(). See http://www.analytictech.com/networks/dataentry.htm. Support writing LEDA file format write.graph().","code":""},{"path":"https://r.igraph.org/news/index.html","id":"plotting-and-layouts-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Plotting and layouts","title":"igraph 0.6","text":"Star layout: layout.star(). Layout based multidimensional scaling, layout.mds(). New layouts layout.grid() layout.grid.3d(). Sugiyama layout algorithm layered directed acyclic graphs, layout.sugiyama().","code":""},{"path":"https://r.igraph.org/news/index.html","id":"graph-generators-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Graph generators","title":"igraph 0.6","text":"New graph generators: static.fitness.game(), static.power.law.game(). barabasi.game() rewritten supports three algorithms now, default algorithm generate multiple loop edges. graph generation process can now start supplied graph. Watts-Strogatz graph generator, igraph_watts_strogatz() can now create graphs without loop edges.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"others-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Others","title":"igraph 0.6","text":"Added Spectral Coarse Graining algorithm, see scg(). cohesive.blocks() function rewritten C, much faster now. nicer API, . See demo(“cohesive”). Added generic breadth-first depth-first search implementations many callbacks, graph.bfs() graph_dfs(). Support vertex edge coloring VF2 (sub)graph isomorphism functions (graph.isomorphic.vf2(), graph.count.isomorphisms.vf2(), graph.get.isomorphisms.vf2(), graph.subisomorphic.vf2(), graph.count.subisomorphisms.vf2(), graph.get.subisomorphisms.vf2()). Assortativity coefficient, assortativity(), assortativity.nominal() assortativity.degree(). Vertex operators work vertex names: graph.intersection..name(), graph.union..name(), graph.difference..name(). Thanks Magnus Torfason contributing code! Function calculate non-induced subgraph: subgraph.edges(). comprehensive maximum flow minimum cut calculation, see functions graph.maxflow(), graph.mincut(), stCuts(), stMincuts(). Check whether directed graph DAG, .dag(). .multiple() decide whether graph multiple edges. Added function calculate diversity score vertices, graph.diversity(). Graph Laplacian calculation (graph.laplacian()) supports edge weights now. Biconnected component calculation, biconnected.components() now returns components . bipartite.projection() calculates multiplicity edges. Maximum cardinality search: maximum.cardinality.search() chordality test: .chordal() Convex hull computation, convex.hull(). Contract vertices, contract.vertices().","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-053","dir":"Changelog","previous_headings":"","what":"igraph 0.5.3","title":"igraph 0.5.3","text":"CRAN release: 2009-11-22 Released November 22, 2009","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bugs-corrected-in-the-r-interface-0-5-3","dir":"Changelog","previous_headings":"","what":"Bugs corrected in the R interface","title":"igraph 0.5.3","text":"small changes make ‘R CMD check’ clean Fixed bug graph.incidence, ‘directed’ ‘mode’ arguments handled correctly Betweenness edge betweenness functions work graphs many shortest paths now (limit long long int) compiling package, configure script fails C compiler available igraph..graphNEL creates right number loop edges now Fixed bug bipartite.projection() caused occasional crashes systems","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-052","dir":"Changelog","previous_headings":"","what":"igraph 0.5.2","title":"igraph 0.5.2","text":"CRAN release: 2009-04-14 Released April 10, 2009 See also release notes http://igraph.sf.net/relnotes-0.5.2.html","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-in-the-r-interface-0-5-2","dir":"Changelog","previous_headings":"","what":"New in the R interface","title":"igraph 0.5.2","text":"Added progress bar support beweenness() betweenness.estimate(), layout.drl() Speeded betweenness estimation Speeded .connected() Johnson’s shortest paths algorithm added shortest.paths() now ‘algorithm’ argument choose various implementations manually Always quote symbolic vertex names printing graphs edges Average nearest neighbor degree calculation, graph.knn() Weighted degree (also called strength) calculation, graph.strength() new functions support bipartite graphs: graph.bipartite(), .bipartite(), get.incidence(), graph.incidence(), bipartite.projection(), bipartite.projection.size() Support plotting curved edges plot.igraph() tkplot() Added support weighted graphs alpha.centrality() Added label propagation community detection algorithm Raghavan et al., label.propagation.community() cohesive.blocks() now ‘cutsetHeuristic’ argument choose two cutset algorithms Added function “unfold” tree, unfold.tree() New tkplot() arguments change drawing area Added minimal GUI, invoke tkigraph() DrL layout generator, layout.drl() three dimensional mode now.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bugs-corrected-in-the-r-interface-0-5-2","dir":"Changelog","previous_headings":"","what":"Bugs corrected in the R interface","title":"igraph 0.5.2","text":"Fixed bug VF2 graph isomorphism functions Fixed bug sparse adjacency matrix requested get.adjacency() graph named VL graph generator degree.sequence.game() checks now sum degrees even Many fixes supporting various compilers, e.g. GCC 4.4 Sun’s C compiler Fixed memory leaks graph.automorphisms(), Bellman-Ford shortest.paths(), independent.vertex.sets() Fix bug graph imported LGL exported NCOL format (#289596) cohesive.blocks() creates temporary file session temporary directory write.graph() read.graph() now give error messages unknown arguments given GraphML reader checks name attributes avoid adding duplicate ‘id’ attribute possible change ‘ncv’ ARPACK parameter leading.eigenvector.community() Fixed bug path.length.hist(), ‘unconnected’ wrong unconnected undirected graphs Better handling attribute assingment via iterators, now also clarified manual Better error messages unknown vertex shapes Make R package unload cleanly unloadNamespace() used Fixed bug plotting square shaped vertices (#325244) Fixed bug graph.adjacency() matrix sparse matrix class “dgTMatrix”","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-051","dir":"Changelog","previous_headings":"","what":"igraph 0.5.1","title":"igraph 0.5.1","text":"CRAN release: 2008-07-12 Released July 14, 2008 See also release notes http://igraph.sf.net/relnotes-0.5.1.html","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-in-the-r-interface-0-5-1","dir":"Changelog","previous_headings":"","what":"New in the R interface","title":"igraph 0.5.1","text":"new layout generator called DrL. Uniform sampling random connected undirected graphs given degree sequence. Edge labels plotted 1/3 edge, better graph mutual edges. Initial experimental vertex shape support ‘plot’. New function, ‘graph.adjlist’ creates igraph graphs adjacency lists. Conversion /graphNEL graphs, ‘graph’ R package. Fastgreedy community detection can utilize edge weights now, missing R interface. ‘arrow.width’ graphical parameter added. graph.data.frame new argument ‘vertices’. graph.adjacency get.adjacency support sparse matrices, ‘Matrix’ package required use functionality. graph.adjacency adds column/row names ‘name’ attribute. Weighted shortest paths using Dijkstra’s Belmann-Ford algorithm. Shortest path functions return ‘Inf’ unreachable vertices. New function ‘.mutual’ find mutual edges directed graph. Added inverse log-weighted similarity measure (.k.. Adamic/Adar similarity). preference.game asymmetric.preference.game rewritten, O(|V|+|E|) now, instead O(|V|^2). Edge weight support function ‘get.shortest.paths’, uses Dijkstra’s algorithm.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bugs-corrected-in-the-r-interface-0-5-1","dir":"Changelog","previous_headings":"","what":"Bugs corrected in the R interface","title":"igraph 0.5.1","text":"bug corrected write.pajek.bgraph. Several bugs corrected graph.adjacency. Pajek reader bug corrected, used segfault ’*Vertices’ missing. Directedness handled correctly writing GML files. (note ‘correct’ conflicts standard .) Corrected bug calculating weighted, directed PageRank undirected graph. (make sense anyway.) Several bugs fixed Reingold-Tilford layout avoid edge crossings. bug fixed GraphML reader, value graph attribute specified. Fixed bug graph isomorphism routine small (3-4 vertices) graphs. Corrected random sampling implementation (igraph_random_sample), now always generates unique numbers. affects Gnm Erdos-Renyi generator, always generates simple graphs now. basic igraph constructor (igraph_empty_attrs, functions expected call internally) now checks whether number vertices finite. LGL, NCOL Pajek graph readers handle errors properly now. non-symmetric ARPACK solver returns results consistent form now. fast greedy community detection routine now checks graph simple. LGL NCOL parsers corrected work kinds end--line encodings. Hub & authority score calculations initialize ARPACK parameters now. Fixed bug Walktrap community detection routine, applied unconnected graphs. Several small memory leaks removed, big one Spinglass community structure detection function","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-05","dir":"Changelog","previous_headings":"","what":"igraph 0.5","title":"igraph 0.5","text":"CRAN release: 2008-02-13 Released February 14, 2008 See also release notes http://igraph.sf.net/relnotes-0.5.html","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-in-the-r-interface-0-5","dir":"Changelog","previous_headings":"","what":"New in the R interface","title":"igraph 0.5","text":"‘rescale’, ‘asp’ ‘frame’ graphical parameters added Create graphs formula notation (graph.formula) Handle graph attributes properly Calculate actual minimum cut undirected graphs Adjacency lists, get.adjlist get.adjedgelist added Eigenvector centrality computation much faster now Proper R warnings, instead writing warning terminal R checks graphical parameters now, unknown ones just ignored, error message given plot.igraph ‘add’ argument now compose plots multiple graphs plot.igraph supports ‘main’ ‘sub’ arguments layout.norm public now, can normalize layout possible supply startup positions layout generators Always free memory CTRL+C/ESC pressed, operating systems plot.igraph can plot square vertices now, see ‘shape’ parameter graph.adjacency rewritten creating weighted graphs use match.arg whenever possible. means character scalar options can abbreviated always case insensitive VF2 graph isomorphism routines can check subgraph isomorphism now, able return matching(s) BLISS graph isomorphism algorithm included igraph now. See canonical.permutation, graph.isomorphic.bliss use ARPACK eigenvalue/eigenvector calculation. means following functions rewritten: page.rank, leading.eigenvector.community.*, evcent. New functions based ARPACK: hub.score, authority.score, arpack. Edge weights Fruchterman-Reingold layout (layout.fruchterman.reingold). Line graph calculation (line.graph) Kautz de Bruijn graph generators (graph.kautz, graph.de.bruijn) Support writing graphs DOT format Jaccard Dice similarity coefficients added (similarity.jaccard, similarity.dice) Counting multiplicity edges (count.multiple) graphopt layout algorithm added, layout.graphopt Generation “famous” graphs (graph.famous). Create graphs LCF notation (graph.cf). Dyad census triad cencus functions (dyad.census, triad.census) Cheking simple graphs (.simple) Create full citation networks (graph.full.citation) Create histogram path lengths (path.length.hist) Forest fire model added (forest.fire.game) DIMACS reader can handle different file types now Biconnected components articulation points (biconnected.components, articulation.points) Kleinberg’s hub authority scores (hub.score, authority.score) .undirected handles attributes now Geometric random graph generator (grg.game) can return coordinates vertices Function added convert leading eigenvector community structure result membership vector (community.le..membership) Weighted fast greedy community detection Weighted page rank calculation Functions estimating closeness, betweenness, edge betweenness introducing cutoff path lengths (closeness.estimate, betweenness.estimate, edge.betweenness.estimate) Weighted modularity calculation Function permuting vertices (permute.vertices) Betweenness closeness calculations speeded read.graph can handle possible line terminators now ( , , Error handling rewritten walktrap community detection, calculation can interrupted now maxflow/mincut functions allow supply NULL pointer edge capacities, implying unit capacities edges","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bugs-corrected-in-the-r-interface-0-5","dir":"Changelog","previous_headings":"","what":"Bugs corrected in the R interface","title":"igraph 0.5","text":"Fixed bug cohesive.blocks, cohesive blocks sometimes calculated correctly","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-045","dir":"Changelog","previous_headings":"","what":"igraph 0.4.5","title":"igraph 0.4.5","text":"CRAN release: 2007-12-22 Released January 1, 2008 New: - Cohesive block finding R interface, thanks Peter McMahan contributing code. See James Moody Douglas R. White, 2003, Structural Cohesion Embeddedness: Hierarchical Conception Social Groups American Sociological Review 68(1):1-25 - Biconnected components articulation points. - R interface: better printing attributes. - R interface: graph attributes can used via ‘$’. Bug fixed: - Erdos-Renyi random graph generators rewritten.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-044","dir":"Changelog","previous_headings":"","what":"igraph 0.4.4","title":"igraph 0.4.4","text":"CRAN release: 2007-10-03 Released October 3, 2007 release work seamlessly new R 2.6.0 version. bugs also fixed: - bug fixed Erdos-Renyi graph generator, sometimes added extra vertex.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-043","dir":"Changelog","previous_headings":"","what":"igraph 0.4.3","title":"igraph 0.4.3","text":"CRAN release: 2007-08-09 Released August 13, 2007 next one sequence bugfix releases. Thanks many people sending bug reports. changes: - memory leaks removed using attributes R Python. - GraphML parser: entities character data multiple chunks now handled correctly. - bug corrected edge betweenness community structure detection, failed called many times program/session. - Edge betweeness community structure: handle unconnected graphs properly. - Fixed bug related fast greedy community detection unconnected graphs. - Use different kind parser (Push) reading GraphML files. almost invisible users fixed nondeterministic bug reading GraphML files. - R interface: plot now handles properly called vector edge.width argument directed graphs. - R interface: bug (typo) corrected walktrap.community weighted graphs.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-042","dir":"Changelog","previous_headings":"","what":"igraph 0.4.2","title":"igraph 0.4.2","text":"CRAN release: 2007-06-06 Released June 7, 2007 another bugfix release, serious bug R package previous version: read write graphs files format MS Windows. bits added: - circular Reingold-Tilford layout generator trees - corrected bug, Pajek files written properly MS Windows now. - arrow.size graphical edge parameter added R interface.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-041","dir":"Changelog","previous_headings":"","what":"igraph 0.4.1","title":"igraph 0.4.1","text":"CRAN release: 2007-05-23 Released May 23, 2007 minor release, corrects number bugs, mostly R package.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-04","dir":"Changelog","previous_headings":"","what":"igraph 0.4","title":"igraph 0.4","text":"CRAN release: 2007-05-21 Released May 21, 2007 major new additions release bunch community detection algorithms support GML file format. complete list changes:","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-in-the-r-interface-0-4","dir":"Changelog","previous_headings":"","what":"New in the R interface","title":"igraph 0.4","text":"internal representation changed, graphs stored ‘save’ older igraph version read back new version reliably. neighbors returns ordered lists .loop .multiple added topological sorting VF2 isomorphism algorithm support reading graphs Graph Database isomorphism graph.mincut can calculate actual minimum cut girth calculation added, thanks Keith Briggs support reading writing GML files Walktrap community detection algorithm added, thanks Matthieu Latapy Pascal Pons edge betweenness based community detection algorithm added fast greedy algorithm community detection Clauset et al. added thanks Aaron Clauset sharing code leading eigenvector community detection algorithm Mark Newman added functions creating dendrograms output community detection algorithms added community.membership supporting function added, creates membership vector community structure merge tree modularity calculation added graphics parameter handling completely rewritten, uniform handling colors fonts, make sure read ?igraph.plotting new plotting parameter edges: arrow.mode bug corrected playing nonlinear barabasi.game better looking plotting 3d using rglplot: edges 3d rglplot layout allowed two dimensional now rglplot suspends updates drawing, makes faster loop edges correctly plotted three plotting functions better printing attributes printing graphs summary graph prints attribute names .igraph rewritten make possible inherit ‘igraph’ class somewhat better looking progress meter functions support ","code":""},{"path":"https://r.igraph.org/news/index.html","id":"others-0-4","dir":"Changelog","previous_headings":"","what":"Others","title":"igraph 0.4","text":"many functions benefit new internal representation faster now: transitivity, reciprocity, graph operator functions like intersection union, etc.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bugs-corrected-0-4","dir":"Changelog","previous_headings":"","what":"Bugs corrected","title":"igraph 0.4","text":"corrected bug reading Pajek files: directed graphs read undirected","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-032","dir":"Changelog","previous_headings":"","what":"igraph 0.3.2","title":"igraph 0.3.2","text":"CRAN release: 2006-12-14 Released Dec 19, 2006 new major release, contains many new things:","code":""},{"path":"https://r.igraph.org/news/index.html","id":"changes-in-the-r-interface-0-3-2","dir":"Changelog","previous_headings":"","what":"Changes in the R interface","title":"igraph 0.3.2","text":"bonpow function ported SNA calculate Bonacich power centrality get.adjacency supports attributes now, means sets colnames rownames attributes can return attribute values matrix instead 0/1 grg.game, geometric random graphs graph.density, graph density calculation edge vertex attributes can added easily now added new edges add.edges new vertices add.vertices graph.data.frame creates graph data frames, can used create graphs edge attributes easily plot.igraph tkplot can plot self-loop edges now graph.edgelist create graph edge list, can also handle edge lists symbolic names get.edgelist now ‘names’ argument can return symbolic vertex names instead vertex ids, default id uses ‘name’ vertex attribute returned printing graphs screen also prints symbolic symbolic names (‘name’ attribute present) maximum flow minimum cut functions: graph.maxflow, graph.mincut vertex edge connectivity: edge.connectivity, vertex.connectivity edge vertex disjoint paths: edge.disjoint.paths, vertex.disjoint.paths White’s cohesion adhesion measure: graph.adhesion, graph.cohesion dimacs file format added .directed handles attributes now constraint corrected, handles weighted graphs well now weighted attribute graph.adjacency spinglass-based community structure detection, Joerg Reichardt – Stefan Bornholdt algorithm added: spinglass.community graph.extended.chordal.ring, extended chordal ring generation .clusters calculates number clusters without calculating clusters minimum spanning tree functions updated keep attributes transitivity can calculate local transitivity well neighborhood related functions added: neighborhood, neighborhood.size, graph.neighborhood new graph generators based vertex types: preference.game asymmetric.preference.game","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bugs-corrected-0-3-2","dir":"Changelog","previous_headings":"","what":"Bugs corrected","title":"igraph 0.3.2","text":"attribute handling bug deleting edges corrected GraphML escaping NaN handling corrected bug corrected make possible compile R package without libxml2 library bug Erdos-Renyi graph generation corrected: problems generating large directed graphs bug constraint calculation corrected, works well now fixed memory leaks GraphML reader error handling bug corrected GraphML reader bug corrected R version graph.laplacian normalized Laplacian requested memory leak corrected get..shortest.paths R package","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-021","dir":"Changelog","previous_headings":"","what":"igraph 0.2.1","title":"igraph 0.2.1","text":"CRAN release: 2006-08-24 Released Aug 23, 2006 bug-fix release. Bugs fixed: - reciprocity corrected avoid segfaults - docs updates - various R package updates make conform CRAN rules","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-02","dir":"Changelog","previous_headings":"","what":"igraph 0.2","title":"igraph 0.2","text":"CRAN release: 2006-08-23 Released Aug 18, 2006 Release time last! many new things igraph 0.2, important ones: - reading writing Pajek GraphML formats attributes (Pajek GraphML files supported, see documentation details) - RANDEDU fast motif search algorithm implemented - many new graph generators, games regular graphs - many new structural properties: transitivity, reciprocity, etc. - graph operators: union, intersection, difference, structural holes, etc. - conversion directed undirected graphs - new layout algorithms trees large graphs, 3D layouts many . New things specifically R package: - support CTRL+C - new functions: Graph Laplacian, Burt’s constraint, etc. - vertex/edge sequences totally rewritten, smart indexing (see manual) - new R manual tutorial: `Network Analysis igraph’, still development useful - basic 3D plotting using OpenGL Although release somewhat tested Linux, MS Windows, Mac OSX, Solaris 8 FreeBSD, heavy testing done, might contain bugs, kindly ask send bug reports make igraph better.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-01","dir":"Changelog","previous_headings":"","what":"igraph 0.1","title":"igraph 0.1","text":"Released Jan 30, 2006 year development first “official” release igraph library. release considered beta software, useful general. Please send questions comments.","code":""}]
+[{"path":[]},{"path":"https://r.igraph.org/AUTHORS-list.html","id":"igraph-authors-in-alphabetical-order","dir":"","previous_headings":"","what":"igraph authors, in alphabetical order:","title":"Full list of authors","text":"Patrick R. Amestoy AMD library Adelchi Azzalini igraph.options based sm package Tamas Badics GLPK Gregory Benison Minimum cut calculation Adrian Bowman igraph.options based sm package Walter Böhm LSAP Keith Briggs Parts Nauty Graph Library Geometric random graphs Girth Various patches bug fixes Jeroen Bruggeman spinglass community detection Burt’s constraints Juergen Buchmueller Big number math implementation Carter T. Butts layout algorithms SNA R package bonpow function SNA R package R manual pages, SNA R package Aaron Clauset Hierarchical random graphs J.T. Conklin logbl function Topher Cooper GSL random number generators (used R) Gabor Csardi igraph Trevor Croft simpleraytracer Peter DalGaard zeroin root finder Timothy Davis CXSPARSE: Concise Sparse Matrix package - Extended AMD library Sparse matrix column ordering Laurent Deniau Bits error handling system Ulrich Drepper logbl function Iain S. Duff AMD library GLPK S.. Feldman f2c David Firth Display data frame Tk, relimp package P. Foggia VF2 graph isomorphism algorithm John Fox R: suppressing X11 warnings Alan George GLPK John Gilbert Sparse matrix column ordering D.Goldfarb GLPK Brian Gough GSL random number generators (used R) Tom Gregorovic Multilevel community detection M.Grigoriadis GLPK Oscar Gustafsson GLPK Kurt Hornik LSAP Szabolcs Horvat igraph C core library Paul Hsieh pstdint.h Ross Ihaka random number generators (used R) Tommi Junttila BLISS graph isomorphism library Petteri Kaski BLISS graph isomorphism library Oleg Keselyov zeroin root finder Darwin Klingman GLPK Donald E. Knuth GLPK Stefan . Larimore Sparse matrix column ordering Yusin Lee GLPK Richard Lehoucq ARPACK Rene Locher R arrow drawing function, IDPmisc package J.C. Nash BFGS optimizer Joseph W-H Liu GLPK Makoto Matsumoto GSL random number generators (used R) Vincent Matossian Graph laplacian igraph_neighborhood_graphs Line graphs Peter McMahan Cohesive blocking Andrew Makhorin GLPK David Morton de Lachapelle Spectral coarse graining Laurence Muller Fixes compilation MS Visual Studio Fionn Murtagh Order hierarchical clustering Emmanuel Navarro infomap community detection Various fixes patches Tamas Nepusz igraph Esmond Ng Sparse matrix column ordering Kevin O’Neill Maximal independent vertex sets Takuji Nishimura GSL random number generators (used R) Daniel Noom igraph C core library Jim Orlin GLPK Patric Ostergard GLPK Elliot Paquette psumtree data type Pascal Pons walktrap community detection Joerg Reichardt spinglass community detection Marc Rieffel GSL random number generators (used R) B.D. Ripley igraph.options based sm package BFGS optimizer Various bug fixes Martin Rosvall infomap community detection Andreas Ruckstuhl R arrow drawing function, IDPmisc package Heinrich Schuchardt GLPK J.K. Reid GLPK C. Sansone VF2 graph isomorphism algorithm Michael Schmuhl graphopt layout generator Christine Solnon LAD graph isomorphism library Danny Sorensen ARPACK James Theiler GSL random number generators (used R) Samuel Thiriot Interconnected islands graph generator Vincent . Traag igraph C core library Magnus Torfason R operators work name Theodore Y. Ts’o libuuid Minh Van Nguyen Microscopic update rules Various test cases Many documentation fixes M. Vento VF2 graph isomorphism algorithm Fabien Viger gengraph graph generator Phuong Vu ARPACK P.J. Weinberger f2c Hadley Wickham lazyeval Garrett . Wollman qsort B.N. Wylie DrL layout generator Chao Yang ARPACK Fabio Zanini igraph C core library","code":""},{"path":"https://r.igraph.org/AUTHORS-list.html","id":"institutional-copyright-owners","dir":"","previous_headings":"","what":"Institutional copyright owners:","title":"Full list of authors","text":"Free Software Foundation, Inc Code generated bison Sandia Corporation DrL layout generator R Development Core Team random number generators (used R) R: .dendrogram stats package Regents University California qsort Xerox PARC Sparse matrix column ordering R Studio lazyeval","code":""},{"path":"https://r.igraph.org/AUTHORS-list.html","id":"other-contributors","dir":"","previous_headings":"","what":"Other contributors","title":"Full list of authors","text":"Neal Becker Patches compile gcc 4.4 Richard Bowman R patches Alex Chen Patch compile Intel compilers Daniel Cordeiro Patches Tom Gregorovic Bug fixes Mayank Lahiri Forest fire game fix John Lapeyre Patches Christopher Lu Various fixes patches André Panisson R patches Bob Pap Bug fixes Keith Ponting R package bug fixes Martin J Reed Bug fixes Elena Tea Russo Bug fixes KennyTM Bug fixes Jordi Torrents Patches Matthew Walker Various patches Kai Willadsen Arrow size support Python","code":""},{"path":[]},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"tldr","dir":"","previous_headings":"","what":"TL;DR","title":"How to Contribute to the igraph R package","text":"Send PR! Thanks!","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"slightly-more-details","dir":"","previous_headings":"","what":"Slightly more Details","title":"How to Contribute to the igraph R package","text":"want contribute? Awesome! Small changes, like fixing typos documentation completely fine also welcome. bigger changes, suggest open issue start coding, can maximize probability can successfully merge code.","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"r-or-c","dir":"","previous_headings":"","what":"R or C","title":"How to Contribute to the igraph R package","text":"guide igraph R package, note package uses igraph C library internally things. changes involve C library well, need make changes first, repository C library: https://github.com/igraph/igraph.","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"development-and-compilation","dir":"","previous_headings":"","what":"Development and Compilation","title":"How to Contribute to the igraph R package","text":"development done default branch can automatically installed using remotes::install_github(\"igraph/rigraph\") pak::pak(\"igraph/rigraph\"). stable version igraph already installed, can avoid conflicts installing development version directory, e.g. remotes::install_github(\"igraph/rigraph\", lib = \"~/testing/\"). , load development version R session, use library(igraph, lib.loc = \"~/testing/\"). Remove development version remove.packages(\"igraph\", lib = \"~/testing/\"). can locally build test igraph package follows. R process running local ./rigraph directory, run pkgload::load_all() compile cloned version igraph load use current session. can run package tests testthat::test_local(). change includes updates documentation, also run devtools::document() update package documentation. Note can either clone package locally build pkgload::load_all() install package GitHub remotes::install_github()—need . can keep local clone date git tools, remove deleting local ./rigraph directory.","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"windows","dir":"","previous_headings":"Development and Compilation","what":"Windows","title":"How to Contribute to the igraph R package","text":"building source Windows, need RTools installed. Additionally, two system requirements glpk libxml2 optional, hard requirements. version R >= 4.0 can install two RTools terminal using update files stored redundantly, run . done automatically CI/CD, cases changes committed directly branch tested.","code":"pacman -Sy mingw-w64-{i686,x86_64}-glpk mingw-w64-{i686,x86_64}-libxml2 make igraph"},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"making-trivial-changes","dir":"","previous_headings":"","what":"Making Trivial Changes","title":"How to Contribute to the igraph R package","text":"Fork repository. copy /rigraph username, https://github.com//rigraph. forked repository, look file want modify. Click edit symbol (pen) upper right corner file view. Make edits. Write short commit message, less 65 characters. E.g. “Fix manual page typo” “Fix degree bug loops”. needed, elaborate changes “extended description” field. Commit changes. Go back start page forked repository. Click green button branch name create pull request. Click “Create pull request”. Provide detailed description like. Please also indicate fine licensing contribution igraph’s license (see Legal Stuff ). Click “Create pull request”. ’s ! probably good idea keep forked repository change accepted igraph, case need modify . Now need wait us, unfortunately. Please ping us, takes long respond. E.g. week considered long. pull request accepted, can delete forked repository.","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"making-more-involved-changes","dir":"","previous_headings":"","what":"Making More Involved Changes","title":"How to Contribute to the igraph R package","text":"mostly trivial changes, probably want edit sources computer, instead online GitHub. unfamiliar cloning repositories GitHub, manual page working remote repositories good place start. also general introduction page , includes information setting git. git manual . R development environments may also include support git/GitHub integration (introduction RStudio tools, see tutorial; Emacs/ESS users can use Magit). Open issue issue tracker proposed changes. required smaller things, suggest others. Just case somebody already working thing, something don’t want igraph. Fork clone repository. already forked repository, synch forked copy get latest version main branch, fetch updated main local clone. Make changes appropriate files local clone. ready changes, build igraph run tests indicated . Commit changes new branch. Give branch descriptive name specific changes want make. , push changes forked copy igraph GitHub. Submit pull request main branch. see text similar “ wants merge 1 commit igraph:main :fix--func”. pull request relates directly issue (e.g., opened issue discuss proposed changes), include keyword “fix” issue number (e.g., “Fix #123) line initial comment pull request. step supports better issue tracking; list keywords, see . Now need wait us, unfortunately. Please ping us, takes long respond. E.g. week considered long.","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"writing-igraph-code","dir":"","previous_headings":"","what":"Writing igraph Code","title":"How to Contribute to the igraph R package","text":"tips writing igraph code. general, look things done, try similarly. (Unless think done well, case please tell us.)","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"code-formatting","dir":"","previous_headings":"Writing igraph Code","what":"Code Formatting","title":"How to Contribute to the igraph R package","text":"follow tidyverse style guide formatting. styler package helps apply style code (see also lintr package). Look style (indentation, braces, etc.) recently committed bigger change, try mimic .","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"documentation","dir":"","previous_headings":"Writing igraph Code","what":"Documentation","title":"How to Contribute to the igraph R package","text":"Please document new functions using roxygen2, run devtools::document() make igraph update .Rd files.","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"test-cases","dir":"","previous_headings":"Writing igraph Code","what":"Test Cases","title":"How to Contribute to the igraph R package","text":"Unless change something trivial, please consider adding test cases. important! See files ./rigraph/tests/testthat directory examples. See r-utils package testthat unit testing support functions.","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"ask-us","dir":"","previous_headings":"Writing igraph Code","what":"Ask Us!","title":"How to Contribute to the igraph R package","text":"general, sure something, please ask! can open issue Github, write igraph-help mailing list (see homepage http://igraph.org), write Tamás Gábor. prefer public forums, though, others can learn , .","code":""},{"path":"https://r.igraph.org/CONTRIBUTING.html","id":"legal-stuff","dir":"","previous_headings":"","what":"Legal Stuff","title":"How to Contribute to the igraph R package","text":"pain deal , can’t avoid , unfortunately. , igraph licensed “General Public License (GPL) version 2, later”. igraph manual licensed “GNU Free Documentation License”. contribution bigger typo fix, please indicate fine releasing code/text licenses. E.g. adding sentence reads “’m fine GPL 2 later FDL.” perfectly enough.","code":""},{"path":"https://r.igraph.org/articles/igraph.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"igraph (R interface)","text":"install library CRAN, use: details dependencies, requirements, troubleshooting installation found main documentation page.","code":"install.packages(\"igraph\")"},{"path":"https://r.igraph.org/articles/igraph.html","id":"usage","dir":"Articles","previous_headings":"","what":"Usage","title":"igraph (R interface)","text":"use igraph R code, must first load library: Now igraph functions available.","code":"library(\"igraph\") ## ## Attaching package: 'igraph' ## The following objects are masked from 'package:stats': ## ## decompose, spectrum ## The following object is masked from 'package:base': ## ## union"},{"path":"https://r.igraph.org/articles/igraph.html","id":"creating-a-graph","dir":"Articles","previous_headings":"","what":"Creating a graph","title":"igraph (R interface)","text":"igraph offers many ways create graph. simplest one function make_empty_graph(): common way create graph make_graph(), constructs network based specified edges. example, make graph 10 nodes (numbered 1 10) two edges connecting nodes 1-2 1-5: Starting igraph 0.8.0, can also include literal , via igraph’s formula notation. case, first term formula start ~ character, just like regular formulae R. expressions consist vertex names edge operators. edge operator sequence - + characters, former edges latter used arrow heads. edges can arbitrarily long, say, may use many - characters “draw” like. edge operators consist - characters graph undirected, whereas single + character implies directed graph: say create graph : can print graph get summary nodes edges: means: Undirected Named graph 10 vertices 2 edges, exact edges listed . graph [name] attribute, printed well. NOTE: summary() list edges, convenient large graphs millions edges: function make_graph() can create notable graphs just specifying name. example can create graph represents social network Zachary’s karate club, shows friendship 34 members karate club US university 1970s: visualize graph can use plot(): detailed description plotting options provided later tutorial.","code":"g <- make_empty_graph() g <- make_graph(edges = c(1, 2, 1, 5), n = 10, directed = FALSE) g <- make_graph(~ 1--2, 1--5, 3, 4, 5, 6, 7, 8, 9, 10) g ## IGRAPH 6d225b8 UN-- 10 2 -- ## + attr: name (v/c) ## + edges from 6d225b8 (vertex names): ## [1] 1--2 1--5 summary(g) ## IGRAPH 6d225b8 UN-- 10 2 -- ## + attr: name (v/c) g <- make_graph(\"Zachary\") plot(g)"},{"path":"https://r.igraph.org/articles/igraph.html","id":"vertex-and-edge-ids","dir":"Articles","previous_headings":"","what":"Vertex and edge IDs","title":"igraph (R interface)","text":"Vertices edges numerical vertex IDs igraph. Vertex IDs always consecutive start 1. graph n vertices vertex IDs always 1 n. operation changes number vertices graphs, instance subgraph created via induced_subgraph(), vertices renumbered satisfy criterion. true edges well: edge IDs always 1 m, total number edges graph. NOTE: familiar C core Python interface igraph, might noticed languages vertex edge IDs start 0. R interface, start 1 instead, keep consistent convention language. addition IDs, vertices edges can assigned name attributes. makes easier track whenever graph altered. Examples pattern shown later tutorial.","code":""},{"path":"https://r.igraph.org/articles/igraph.html","id":"addingdeleting-vertices-and-edges","dir":"Articles","previous_headings":"","what":"Adding/deleting vertices and edges","title":"igraph (R interface)","text":"Let’s continue working Karate club graph. add one vertices existing graph, use add_vertices(): Similarly, add edges can use add_edges(): Edges added specifying source target vertex IDs edge. call added three edges, one connecting vertices 1 35, one connecting vertices 1 36, one connecting vertices 34 37. addition add_vertices() add_edges() functions, plus operator can used add vertices edges graph. actual operation performed depends type right hand side argument: can add single vertex/edge time using add_vertex() add_edge() (singular). Warning: need add multiple edges graph, much efficient call add_edges() rather repeatedly calling add_edge() single new edge. applies deleting edges vertices. try add edges vertices invalid IDs (.e., try add edge vertex 38 graph 37 vertices), igraph shows error: Let us add vertices edges graph. igraph can use magrittr package, provides mechanism chaining commands operator %\\>%: now undirected graph 40 vertices 86 edges. Vertex edge IDs always contiguous, delete vertex subsequent vertices renumbered. vertex renumbered, edges renumbered, source target vertices . Use delete_vertices() delete_edges() perform operations. instance, delete edge connecting vertices 1-34, get ID delete : example, create broken ring: example shows can also refer edges strings containing IDs source target vertices, connected pipe symbol |. \"10|1\" example means edge connects vertex 10 vertex 1. course can also use edge IDs directly, retrieve get.edge.ids() function: another example, let’s make chordal graph. Remember graph chordal (triangulated) cycles four nodes chord, edge joining two nodes adjacent cycle. First, let’s create initial graph using graph_from_literal(): example , : operator used define vertex sets. edge operator connects two vertex sets, every vertex first set connected every vertex second set. use is_chordal() evaluate graph chordal search edges missing fill-graph: can add edges required make initial graph chordal single line:","code":"g <- add_vertices(g, 3) g <- add_edges(g, edges = c(1, 35, 1, 36, 34, 37)) g <- g + edges(c(1, 35, 1, 36, 34, 37)) g <- add_edges(g, edges = c(38, 37)) ## Error in add_edges(g, edges = c(38, 37)): At vendor/cigraph/src/graph/type_indexededgelist.c:261 : Out-of-range vertex IDs when adding edges. Invalid vertex ID g <- g %>% add_edges(edges = c(1, 34)) %>% add_vertices(3) %>% add_edges(edges = c(38, 39, 39, 40, 40, 38, 40, 37)) g ## IGRAPH f12e240 U--- 40 86 -- Zachary ## + attr: name (g/c) ## + edges from f12e240: ## [1] 1-- 2 1-- 3 1-- 4 1-- 5 1-- 6 1-- 7 1-- 8 1-- 9 1--11 1--12 ## [11] 1--13 1--14 1--18 1--20 1--22 1--32 2-- 3 2-- 4 2-- 8 2--14 ## [21] 2--18 2--20 2--22 2--31 3-- 4 3-- 8 3--28 3--29 3--33 3--10 ## [31] 3-- 9 3--14 4-- 8 4--13 4--14 5-- 7 5--11 6-- 7 6--11 6--17 ## [41] 7--17 9--31 9--33 9--34 10--34 14--34 15--33 15--34 16--33 16--34 ## [51] 19--33 19--34 20--34 21--33 21--34 23--33 23--34 24--26 24--28 24--33 ## [61] 24--34 24--30 25--26 25--28 25--32 26--32 27--30 27--34 28--34 29--32 ## [71] 29--34 30--33 30--34 31--33 31--34 32--33 32--34 33--34 1--35 1--36 ## + ... omitted several edges edge_id_to_delete <- get.edge.ids(g, c(1, 34)) edge_id_to_delete ## [1] 82 g <- delete_edges(g, edge_id_to_delete) g <- make_ring(10) %>% delete_edges(\"10|1\") plot(g) g <- make_ring(5) g <- delete_edges(g, get.edge.ids(g, c(1, 5, 4, 5))) plot(g) g1 <- graph_from_literal( A - B:C:I, B - A:C:D, C - A:B:E:H, D - B:E:F, E - C:D:F:H, F - D:E:G, G - F:H, H - C:E:G:I, I - A:H ) plot(g1) is_chordal(g1, fillin = TRUE) ## $chordal ## [1] FALSE ## ## $fillin ## [1] 2 6 8 7 5 7 2 7 6 1 7 1 ## ## $newgraph ## NULL chordal_graph <- add_edges(g1, is_chordal(g1, fillin = TRUE)$fillin) plot(chordal_graph)"},{"path":"https://r.igraph.org/articles/igraph.html","id":"constructing-graphs","dir":"Articles","previous_headings":"","what":"Constructing graphs","title":"igraph (R interface)","text":"addition make_empty_graph(), make_graph(), make_graph_from_literal(), igraph includes many function construct graph. deterministic, say produce graph single time, instance make_tree(): generates regular tree graph 127 vertices, vertex two children. matter many times call make_tree(), generated graph always use parameters: functions generate graphs stochastically, means produce different graph time. instance sample_grg(): generates geometric random graph: n points chosen randomly uniformly inside unit square pairs points closer predefined distance d connected edge. generate GRGs parameters, different: slightly looser way check graphs equivalent via isomorphic. Two graphs said isomorphic number components (vertices edges) maintain one--one correspondence vertices edges, say, connected way. Checking isomorphism can take large graphs (case, answer can quickly given checking degree sequence two graphs). identical_graph() stricter criterion isomorphic(): two graphs must list vertices edges, exactly order, directedness, two graphs must also identical graph, vertex edge attributes.","code":"graph1 <- make_tree(127, 2, mode = \"undirected\") summary(g) ## IGRAPH 8342147 U--- 5 3 -- Ring graph ## + attr: name (g/c), mutual (g/l), circular (g/l) graph2 <- make_tree(127, 2, mode = \"undirected\") identical_graphs(graph1, graph2) ## [1] TRUE graph1 <- sample_grg(100, 0.2) summary(graph1) ## IGRAPH e479876 U--- 100 524 -- Geometric random graph ## + attr: name (g/c), radius (g/n), torus (g/l) graph2 <- sample_grg(100, 0.2) identical_graphs(graph1, graph2) ## [1] FALSE isomorphic(graph1, graph2) ## [1] FALSE"},{"path":"https://r.igraph.org/articles/igraph.html","id":"setting-and-retrieving-attributes","dir":"Articles","previous_headings":"","what":"Setting and retrieving attributes","title":"igraph (R interface)","text":"addition IDs, vertex edges can attributes name, coordinates plotting, metadata, weights. graph can attributes (instance name, show summary()). sense, every graph, vertex edge can used R namespace store retrieve attributes. demonstrate use attributes, let us create simple social network: vertex represents person, want store ages, genders types connection two people (is_formal() refers whether connection one person another formal informal, respectively colleagues friends). \\$ operator shortcut get set graph attributes. shorter just readable graph_attr() set_graph_attr(). V() E() standard way obtain sequence vertices edges, respectively. assigns attribute vertices/edges . Another way generate social network use set_vertex_attr() set_edge_attr() operator %\\>%: assign modify attribute single vertex/edge: Attribute values can set R object, note storing graph file formats might result loss complex attribute values. Vertices, edges graph can used set attributes, instance add date graph: retrieve attributes, can also use graph_attr(), vertex_attr(), edge_attr(). find ID vertex can use function match(): assign attributes subset vertices edges, can use: delete attributes: want save graph R attributes use R’s standard function dput() function retrieve later dget(). can also just save R workspace restore later.","code":"g <- make_graph( ~ Alice - Boris:Himari:Moshe, Himari - Alice:Nang:Moshe:Samira, Ibrahim - Nang:Moshe, Nang - Samira ) V(g)$age <- c(25, 31, 18, 23, 47, 22, 50) V(g)$gender <- c(\"f\", \"m\", \"f\", \"m\", \"m\", \"f\", \"m\") E(g)$is_formal <- c(FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE) summary(g) ## IGRAPH 31a4919 UN-- 7 9 -- ## + attr: name (v/c), age (v/n), gender (v/c), is_formal (e/l) g <- make_graph( ~ Alice - Boris:Himari:Moshe, Himari - Alice:Nang:Moshe:Samira, Ibrahim - Nang:Moshe, Nang - Samira ) %>% set_vertex_attr(\"age\", value = c(25, 31, 18, 23, 47, 22, 50)) %>% set_vertex_attr(\"gender\", value = c(\"f\", \"m\", \"f\", \"m\", \"m\", \"f\", \"m\")) %>% set_edge_attr(\"is_formal\", value = c(FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE)) summary(g) E(g)$is_formal ## [1] FALSE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE E(g)$is_formal[1] <- TRUE E(g)$is_formal ## [1] TRUE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE g$date <- c(\"2022-02-11\") graph_attr(g, \"date\") ## [1] \"2022-02-11\" match(c(\"Ibrahim\"), V(g)$name) ## [1] 7 V(g)$name[1:3] <- c(\"Alejandra\", \"Bruno\", \"Carmina\") V(g) ## + 7/7 vertices, named, from 31a4919: ## [1] Alejandra Bruno Carmina Moshe Nang Samira Ibrahim g <- delete_vertex_attr(g, \"gender\") V(g)$gender ## NULL"},{"path":"https://r.igraph.org/articles/igraph.html","id":"structural-properties-of-graphs","dir":"Articles","previous_headings":"","what":"Structural properties of graphs","title":"igraph (R interface)","text":"igraph provides large set functions calculate various structural properties graphs. beyond scope tutorial document , hence section introduce illustrative purposes. work small social network constructed previous section. Perhaps simplest property one can think degree. degree vertex equals number edges adjacent . case directed networks, can also define -degree (number edges pointing towards vertex) -degree (number edges originating vertex). igraph able calculate using simple syntax: graph directed, able calculate - -degrees separately using degree(mode = \"\") degree(mode = \"\"). can also pass single vertex ID list vertex IDs degree() want calculate degrees subset vertices: functions accept vertex IDs also accept vertex names (values name vertex attribute) long names unique: also works single vertices: similar syntax used structural properties igraph can calculate. vertex properties, functions accept vertex ID, vertex name, list vertex IDs names (omitted, default set vertices). edge properties, functions accept single edge ID list edge IDs. NOTE: measures, make sense calculate vertices edges instead whole graph, take time anyway. case, functions won’t accept vertex edge IDs, can still restrict resulting list later using standard operations. One example eigenvector centrality (evcent()). Besides degree, igraph includes built-routines calculate many centrality properties, including vertex edge betweenness (edge_betweenness()) Google’s PageRank (page_rank()) just name . just illustrate edge betweenness: Now can also figure connections highest betweenness centrality:","code":"degree(g) ## Alejandra Bruno Carmina Moshe Nang Samira Ibrahim ## 3 1 4 3 3 2 2 degree(g, 7) ## Ibrahim ## 2 degree(g, v = c(3, 4, 5)) ## Carmina Moshe Nang ## 4 3 3 degree(g, v = c(\"Carmina\", \"Moshe\", \"Nang\")) ## Carmina Moshe Nang ## 4 3 3 degree(g, \"Bruno\") ## Bruno ## 1 edge_betweenness(g) ## [1] 6 6 4 3 4 4 4 2 3 ebs <- edge_betweenness(g) as_edgelist(g)[ebs == max(ebs), ] ## [,1] [,2] ## [1,] \"Alejandra\" \"Bruno\" ## [2,] \"Alejandra\" \"Carmina\""},{"path":[]},{"path":"https://r.igraph.org/articles/igraph.html","id":"selecting-vertices","dir":"Articles","previous_headings":"Querying vertices and edges based on attributes","what":"Selecting vertices","title":"igraph (R interface)","text":"Imagine given social network, want find largest degree. can tools presented far .max() function: Another example select vertices odd IDs even ones, using V() function: course, possible select vertices edges positional indices: Selecting vertex exist results error: Attribute names can also used -within indexing brackets V() E(). can combined R’s ability use Boolean vectors indexing obtain concise readable expressions retrieve subset vertex edge set graph. instance, following command gives names individuals younger 30 years social network: course, < boolean operator can used . possibilities include following: can also create “” operator %% using Negate() function: attribute name igraph function, careful syntax can become little confusing. instance, attribute named degree represents grades exam person, confused igraph function computes degrees vertices network sense:","code":"which.max(degree(g)) ## Carmina ## 3 graph <- graph.full(n = 10) only_odd_vertices <- which(V(graph) %% 2 == 1) length(only_odd_vertices) ## [1] 5 seq <- V(graph)[2, 3, 7] seq ## + 3/10 vertices, from ba14b80: ## [1] 2 3 7 seq <- seq[1, 3] # filtering an existing vertex set seq ## + 2/10 vertices, from ba14b80: ## [1] 2 7 seq <- V(graph)[2, 3, 7, \"foo\", 3.5] ## Error in simple_vs_index(x, ii, na_ok) : Unknown vertex selected V(g)[age < 30]$name ## [1] \"Alejandra\" \"Carmina\" \"Moshe\" \"Samira\" `%notin%` <- Negate(`%in%`) V(g)$degree <- c(\"A\", \"B\", \"B+\", \"A+\", \"C\", \"A\", \"B\") V(g)$degree[degree(g) == 3] ## [1] \"A\" \"A+\" \"C\" V(g)$name[degree(g) == 3] ## [1] \"Alejandra\" \"Moshe\" \"Nang\""},{"path":"https://r.igraph.org/articles/igraph.html","id":"selecting-edges","dir":"Articles","previous_headings":"Querying vertices and edges based on attributes","what":"Selecting edges","title":"igraph (R interface)","text":"Edges can selected based attributes just like vertices. mentioned , standard way get edges E. Moreover, special structural properties selecting edges. Using .() allows filter edge sequence based source vertices edges. instance, select edges originating Carmina (vertex index 3): course also works vertex names: Using .() filters edge sequences based target vertices. different .() graph directed, gives answer undirected graphs. Using .inc() selects edges incident single vertex least one vertices, irrespective edge directions. %--% operator can used select edges specific groups vertices, ignoring edge directions directed graphs. instance, following expression selects edges Carmina (vertex index 3), Nang (vertex index 5) Samira (vertex index 6): make %--% operator work names, can build string vectors containing names use vectors operands. instance, select edges connect men women, can following re-adding gender attribute deleted earlier:","code":"E(g)[.from(3)] ## + 4/9 edges from 31a4919 (vertex names): ## [1] Alejandra--Carmina Carmina --Moshe Carmina --Nang Carmina --Samira E(g)[.from(\"Carmina\")] ## + 4/9 edges from 31a4919 (vertex names): ## [1] Alejandra--Carmina Carmina --Moshe Carmina --Nang Carmina --Samira E(g)[3:5 %--% 5:6] ## + 3/9 edges from 31a4919 (vertex names): ## [1] Carmina--Nang Carmina--Samira Nang --Samira V(g)$gender <- c(\"f\", \"m\", \"f\", \"m\", \"m\", \"f\", \"m\") men <- V(g)[gender == \"m\"]$name men ## [1] \"Bruno\" \"Moshe\" \"Nang\" \"Ibrahim\" women <- V(g)[gender == \"f\"]$name women ## [1] \"Alejandra\" \"Carmina\" \"Samira\" E(g)[men %--% women] ## + 5/9 edges from 31a4919 (vertex names): ## [1] Alejandra--Bruno Alejandra--Moshe Carmina --Moshe Carmina --Nang ## [5] Nang --Samira"},{"path":"https://r.igraph.org/articles/igraph.html","id":"treating-a-graph-as-an-adjacency-matrix","dir":"Articles","previous_headings":"","what":"Treating a graph as an adjacency matrix","title":"igraph (R interface)","text":"adjacency matrix another way represent graph. adjacency matrix, rows columns labeled graph vertices, elements matrix indicate number edges vertices j. adjacency matrix example graph : example, Carmina (1, 0, 0, 1, 1, 1, 0) directly connected Alejandra (vertex index 1), Moshe (index 4), Nang (index 5) Samira (index 6), Bruno (index 2) Ibrahim (index 7).","code":"as_adjacency_matrix(g) ## 7 x 7 sparse Matrix of class \"dgCMatrix\" ## Alejandra Bruno Carmina Moshe Nang Samira Ibrahim ## Alejandra . 1 1 1 . . . ## Bruno 1 . . . . . . ## Carmina 1 . . 1 1 1 . ## Moshe 1 . 1 . . . 1 ## Nang . . 1 . . 1 1 ## Samira . . 1 . 1 . . ## Ibrahim . . . 1 1 . ."},{"path":"https://r.igraph.org/articles/igraph.html","id":"layouts-and-plotting","dir":"Articles","previous_headings":"","what":"Layouts and plotting","title":"igraph (R interface)","text":"graph abstract mathematical object without specific representation 2D, 3D geometric space. means whenever want visualise graph, find mapping vertices coordinates two- three-dimensional space first, preferably way useful /pleasing eye. separate branch graph theory, namely graph drawing, tries solve problem via several graph layout algorithms. igraph implements quite layout algorithms also able draw onto screen output format R supports.","code":""},{"path":"https://r.igraph.org/articles/igraph.html","id":"layout-algorithms","dir":"Articles","previous_headings":"Layouts and plotting","what":"Layout algorithms","title":"igraph (R interface)","text":"layout functions igraph always start layout. following table summarises : Layout algorithms can called directly graph first argument. return matrix two columns many rows number vertices graph; row correspond position single vertex, ordered vertex IDs. algorithms 3D variant; case return 3 columns instead 2. layout algorithms take additional arguments; instance, laying graph tree, might make sense specify vertex placed root layout:","code":"layout <- layout_with_kk(g) layout <- layout_as_tree(g, root = 2)"},{"path":"https://r.igraph.org/articles/igraph.html","id":"drawing-a-graph-using-a-layout","dir":"Articles","previous_headings":"Layouts and plotting","what":"Drawing a graph using a layout","title":"igraph (R interface)","text":"can plot imaginary social network Kamada-Kawai layout algorithm follows: open new window showing visual representation network. Remember exact placement nodes may different machine since layout deterministic. layout argument also accepts functions; case, function called graph first argument. makes possible just pass name layout function directly, without creating layout variable: improve visuals, trivial addition color vertices according gender. also try place labels slightly outside vertices improve readability: can also treat gender attribute factor provide colors argument plot(), takes precedence color vertex attribute. Colors assigned automatically levels factor: seen vertex.color argument, can specify visual properties arguments plot instead using vertex edge attributes. following plot shows formal ties thick lines informal ones thin lines: latter approach preferred want keep properties visual representation graph separate graph . summary, special vertex edge properties correspond visual representation graph. attributes override default settings igraph (.e color, weight, name, shape, layout, etc.). following two tables summarise frequently used visual attributes vertices edges, respectively:","code":"layout <- layout_with_kk(g) plot(g, layout = layout, main = \"Social network with the Kamada-Kawai layout algorithm\") plot( g, layout = layout_with_fr, main = \"Social network with the Fruchterman-Reingold layout algorithm\" ) V(g)$color <- ifelse(V(g)$gender == \"m\", \"yellow\", \"red\") plot( g, layout = layout, vertex.label.dist = 3.5, main = \"Social network - with genders as colors\" ) plot(g, layout = layout, vertex.label.dist = 3.5, vertex.color = as.factor(V(g)$gender)) plot(g, layout = layout, vertex.label.dist = 3.5, vertex.size = 20, vertex.color = ifelse(V(g)$gender == \"m\", \"yellow\", \"red\"), edge.width = ifelse(E(g)$is_formal, 5, 1) )"},{"path":[]},{"path":[]},{"path":"https://r.igraph.org/articles/igraph.html","id":"generic-arguments-of-plot","dir":"Articles","previous_headings":"Layouts and plotting","what":"Generic arguments of plot()","title":"igraph (R interface)","text":"settings can specified arguments plot function control overall appearance plot.","code":""},{"path":"https://r.igraph.org/articles/igraph.html","id":"igraph-and-the-outside-world","dir":"Articles","previous_headings":"","what":"igraph and the outside world","title":"igraph (R interface)","text":"graph module complete without kind import/export functionality enables package communicate external programs toolkits. igraph exception: provides functions read common graph formats save graphs files obeying format specifications. main functions reading writing /file read_graph() write_graph(), respectively. following table summarises formats igraph can read write: NOTE: file format limitations. instance, can store attributes. best bet probably GraphML GML want save igraph graphs format can read external package want preserve numeric string attributes. Edge list NCOL also fine don’t attributes (NCOL supports vertex names edge weights, though).","code":""},{"path":"https://r.igraph.org/articles/igraph.html","id":"where-to-go-next","dir":"Articles","previous_headings":"","what":"Where to go next","title":"igraph (R interface)","text":"tutorial brief introduction igraph R. sincerely hope enjoyed reading useful network analyses. detailed description specific functions, see https://r.igraph.org/reference/. questions use igraph, please visit Forum. report bug, open Github issue. Please ask usage questions Github directly ’s meant developers rather users.","code":""},{"path":"https://r.igraph.org/articles/igraph.html","id":"session-info","dir":"Articles","previous_headings":"","what":"Session info","title":"igraph (R interface)","text":"sake reproducibility, session information code following:","code":"sessionInfo() ## R version 4.4.1 (2024-06-14) ## Platform: x86_64-pc-linux-gnu ## Running under: Ubuntu 22.04.5 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 ## [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 ## [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C ## [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] igraph_2.0.3 ## ## loaded via a namespace (and not attached): ## [1] cli_3.6.3 knitr_1.48 rlang_1.1.4 xfun_0.48 ## [5] highr_0.11 textshaping_0.4.0 jsonlite_1.8.9 htmltools_0.5.8.1 ## [9] ragg_1.3.3 sass_0.4.9 rmarkdown_2.28 grid_4.4.1 ## [13] evaluate_1.0.1 jquerylib_0.1.4 fastmap_1.2.0 yaml_2.3.10 ## [17] lifecycle_1.0.4 compiler_4.4.1 fs_1.6.4 htmlwidgets_1.6.4 ## [21] pkgconfig_2.0.3 lattice_0.22-6 systemfonts_1.1.0 digest_0.6.37 ## [25] R6_2.5.1 magrittr_2.0.3 bslib_0.8.0 Matrix_1.7-0 ## [29] tools_4.4.1 pkgdown_2.1.1 cachem_1.1.0 desc_1.4.3"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"instalación","dir":"Articles","previous_headings":"","what":"Instalación","title":"igraph (interfaz R)","text":"Para instalar la librería desde CRAN, usa: Encontrarás más información sobre dependencias, requisitos y resolución de problemas sobre la instalación en la página principal.","code":"install.packages(\"igraph\")"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"uso-de-igraph","dir":"Articles","previous_headings":"","what":"Uso de igraph","title":"igraph (interfaz R)","text":"Para utilizar igraph en tu código de R, primero debes cargar la biblioteca: Ahora tienes todas las funciones de igraph disponibles.","code":"library(\"igraph\") ## ## Attaching package: 'igraph' ## The following objects are masked from 'package:stats': ## ## decompose, spectrum ## The following object is masked from 'package:base': ## ## union"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"crear-un-grafo","dir":"Articles","previous_headings":"","what":"Crear un grafo","title":"igraph (interfaz R)","text":"igraph ofrece muchas formas de crear un grafo. La más sencilla es con la función make_empty_graph(): La forma más común de crear un grafo es con make_graph(), que construye un grafo basado en especificar las aristas. Por ejemplo, Para hacer un grafo con 10 nodos (numerados 1 10) y dos aristas que conecten los nodos 1-2 y 1-5: partir de igraph 0.8.0, también puedes incluir literales mediante la notación de fórmulas de igraph. En este caso, el primer término de la fórmula tiene que empezar con un carácter ~, como comúnmente se usa en las fórmulas en R. Las expresiones constan de los nombres de los vértices y los operadores de las aristas. El operador de un arista es una secuencia de caracteres - y +, el primero es para indicar propiamente las aristas y el segundo para las puntas de flecha (dirección). Puedes utilizar tantos caracteres - como quieras para “dibujarlas”. Si todos los operadores de un arista están formados únicamente por caracteres -, el grafo será dirigido, mientras que un único carácter + implica un grafo dirigido. Por ejemplo, para crear el mismo grafo que antes: Podemos imprimir el grafo para obtener un resumen de sus nodos y aristas: Esto significa: grafo dirigido (Undirected) con 10 vértices y 2 aristas, que se enlistan en la última parte. Si el grafo tiene un atributo [nombre], también se imprime. NOTA: summary() enlista las aristas, lo cual es conveniente para grafos grandes con millones de aristas: También make_graph() puede crear algunos grafos destacados con sólo especificar su nombre. Por ejemplo, puedes generar el grafo que muestra la red social del club de kárate de Zachary, que refleja la amistad entre los 34 miembros del club de una universidad de los Estados Unidos en la década de los 70s: Para observar un grafo puedes utilizar plot(): Más adelante en este tutorial se ofrece una descripción detallada de las opciones para graficar un grafo.","code":"g <- make_empty_graph() g <- make_graph(edges = c(1,2, 1,5), n=10, directed = FALSE) g <- make_graph(~ 1--2, 1--5, 3, 4, 5, 6, 7, 8, 9, 10) g ## IGRAPH 326910b UN-- 10 2 -- ## + attr: name (v/c) ## + edges from 326910b (vertex names): ## [1] 1--2 1--5 summary(g) ## IGRAPH 326910b UN-- 10 2 -- ## + attr: name (v/c) g <- make_graph(\"Zachary\") plot(g)"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"ids-de-vértices-y-aristas","dir":"Articles","previous_headings":"","what":"IDs de vértices y aristas","title":"igraph (interfaz R)","text":"Los vértices y las aristas tienen un identificador numérico en igraph. Los ID de los vértices son siempre consecutivos y empiezan por 1. Para un grafo con “n” vértices, los ID de los vértices están siempre entre 1 y “n”. Si alguna operación cambia el número de vértices en los grafos, por ejemplo, se crea un subgrafo mediante induced_subgraph(), entonces los vértices se vuelven enumerar para satisfacer este criterio. Lo mismo ocurre con las aristas: los ID de las aristas están siempre entre 1 y “m”, el número total de aristas del grafo. NOTA: Si estás familiarizado con C o con la interfaz Python de igraph, te habrás dado cuenta de que en esos lenguajes los IDs de vértices y aristas empiezan por 0. En la interfaz de R, ambos empiezan por 1, para mantener la coherencia con la convención de cada lenguaje. Además de los IDs, los vértices y aristas se les puede asignar un nombre y otros atributos. Esto facilita su seguimiento cada vez que se altera un grafo. Más adelante en este tutorial se muestran ejemplos de cómo alterar estas características.","code":""},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"añadir-y-borrar-vértices-y-aristas","dir":"Articles","previous_headings":"","what":"Añadir y borrar vértices y aristas","title":"igraph (interfaz R)","text":"Sigamos trabajando con el grafo del club de kárate. Para añadir uno o más vértices un grafo existente, utiliza add_vertices(): Del mismo modo, para añadir aristas puedes utilizar add_edges(): Las aristas se añaden especificando el ID del vértice origen y el vértice destino de cada arista. Con las instrucciones anteriores se añaden tres aristas, una que conecta los vértices 1 y 35, otra que conecta los vértices 1 y 36 y otra que conecta los vértices 34 y 37. Además de las funciones add_vertices() y add_edges(), se puede utilizar el operador “+” para añadir vértices o aristas al grafo. La operación que se realice dependerá del tipo de argumento del lado derecho: Puedes añadir un solo vértice/arista la vez usando add_vertex() y add_edge() (singular). Advertencia: Si necesitas añadir múltiples aristas un grafo, es mucho más eficiente usar add_edges() una vez que utilizar repetidamente add_edge() con una nueva arista la vez. Lo mismo ocurre al eliminar aristas y vértices. Si intentas añadir aristas vértices con IDs válidos (por ejemplo, intentas añadir una arista al vértice 38 cuando el grafo sólo tiene 37 vértices), igraph muestra un error: Añadamos más vértices y aristas nuestro grafo. En igraph podemos utilizar el paquete magrittr, que proporciona un mecanismo para encadenar comandos con el operador %\\>%: Ahora tenemos un grafo dirigido con 40 vértices y 89 aristas. Los IDs de los vértices y aristas son siempre contiguos, así que si borras un vértice, todos los vértices subsecuentes se vuelven enumerar. Cuando se re-numera un vértice, las aristas se vuelven enumerar, pero sí sus vértices origen y destino. Puedes usar delete_vertices() y delete_edges() para realizar estas operaciones. Por ejemplo, para borrar la arista que conecta los vértices 1-34, obtén su ID y luego bórrala: Por ejemplo, para crear un grafo con forma de anillo y para partirlo: El ejemplo anterior muestra que también puedes referirte las aristas indicando los IDs de los vértices origen y destino, conectados por el símbolo |. En el ejemplo, \"10|1\" significa la arista que conecta el vértice 10 con el vértice 1. Por supuesto, también puedes usar los IDs de las aristas directamente, o recuperarlos con la función get.edge.ids(): Veamos otro ejemplo, hagamos un grafo cordal. Recuerda que un grafo es cordal (o triangulado) si cada uno de sus ciclos de cuatro o más nodos tienen una “cuerda”, que es una arista que une dos nodos que son adyacentes en el ciclo. En primer lugar, vamos crear el grafo inicial utilizando graph_from_literal(): En este ejemplo, se ha utilizado el operador : para definir conjuntos de vértices. Si el operador de un arista conecta dos conjuntos de vértices, entonces cada vértice del primer conjunto estará conectado cada vértice del segundo conjunto. continuación utilizamos is_chordal() para evaluar si nuestro grafo es cordal y buscar qué aristas faltan para rellenar el grafo: Luego, en una sola línea podemos añadir las aristas necesarias para que el grafo inicial sea cordal:","code":"g <- add_vertices(g, 3) g <- add_edges(g, edges = c(1,35, 1,36, 34,37)) g <- g + edges(c(1,35, 1,36, 34,37)) g <- add_edges(g, edges = c(38, 37)) ## Error in add_edges(g, edges = c(38, 37)): At vendor/cigraph/src/graph/type_indexededgelist.c:261 : Out-of-range vertex IDs when adding edges. Invalid vertex ID g <- g %>% add_edges(edges = c(1, 34)) %>% add_vertices(3) %>% add_edges(edges = c(38, 39, 39, 40, 40, 38, 40, 37)) g ## IGRAPH 16bb347 U--- 40 86 -- Zachary ## + attr: name (g/c) ## + edges from 16bb347: ## [1] 1-- 2 1-- 3 1-- 4 1-- 5 1-- 6 1-- 7 1-- 8 1-- 9 1--11 1--12 ## [11] 1--13 1--14 1--18 1--20 1--22 1--32 2-- 3 2-- 4 2-- 8 2--14 ## [21] 2--18 2--20 2--22 2--31 3-- 4 3-- 8 3--28 3--29 3--33 3--10 ## [31] 3-- 9 3--14 4-- 8 4--13 4--14 5-- 7 5--11 6-- 7 6--11 6--17 ## [41] 7--17 9--31 9--33 9--34 10--34 14--34 15--33 15--34 16--33 16--34 ## [51] 19--33 19--34 20--34 21--33 21--34 23--33 23--34 24--26 24--28 24--33 ## [61] 24--34 24--30 25--26 25--28 25--32 26--32 27--30 27--34 28--34 29--32 ## [71] 29--34 30--33 30--34 31--33 31--34 32--33 32--34 33--34 1--35 1--36 ## + ... omitted several edges edge_id_para_borrar <- get.edge.ids(g, c(1,34)) edge_id_para_borrar ## [1] 82 g <- delete_edges(g, edge_id_para_borrar) g <- make_ring(10) %>% delete_edges(\"10|1\") plot(g) g <- make_ring(5) g <- delete_edges(g, get.edge.ids(g, c(1,5, 4,5))) plot(g) g1 <- graph_from_literal( A-B:C:I, B-A:C:D, C-A:B:E:H, D-B:E:F, E-C:D:F:H, F-D:E:G, G-F:H, H-C:E:G:I, I-A:H ) plot(g1) is_chordal(g1, fillin=TRUE) ## $chordal ## [1] FALSE ## ## $fillin ## [1] 2 6 8 7 5 7 2 7 6 1 7 1 ## ## $newgraph ## NULL chordal_graph <- add_edges(g1, is_chordal(g1, fillin=TRUE)$fillin) plot(chordal_graph)"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"construcción-de-grafos","dir":"Articles","previous_headings":"","what":"Construcción de grafos","title":"igraph (interfaz R)","text":"Además de make_empty_graph(), make_graph() y make_graph_from_literal(), igraph incluye muchas otras funciones para construir un grafo. Algunas son deterministas, es decir, producen el mismo grafo cada vez, por ejemplo make_tree(): Esto genera un grafo regular en forma de árbol con 127 vértices, cada vértice con dos hijos. importa cuántas veces llames make_tree(), el grafo generado será siempre el mismo si utilizas los mismos parámetros: Otras funciones son estocásticas, lo cual quiere decir que producen un grafo diferente cada vez; por ejemplo, sample_grg(): Esto genera un grafo geométrico aleatorio: Se eligen n puntos de forma aleatoria y uniforme dentro del espacio métrico, y los pares de puntos más cercanos entre sí respecto una distancia predeterminada d se conectan mediante una arista. Si se generan GRGs con los mismos parámetros, serán diferentes: Una forma un poco más relajada de comprobar si los grafos son equivalentes es mediante isomorphic(). Se dice que dos grafos son isomorfos si tienen el mismo número de componentes (vértices y aristas) y mantienen una correspondencia uno uno entre vértices y aristas, es decir, están conectados de la misma manera: Comprobar el isomorfismo puede llevar un tiempo en el caso de grafos grandes (en este caso, la respuesta puede darse rápidamente comprobando la secuencia de grados de los dos grafos). identical_graph() es un criterio más estricto que isomorphic(): los dos grafos deben tener la misma lista de vértices y aristas, exactamente en el mismo orden, con la misma direccionalidad, y los dos grafos también deben tener idénticos atributos de grafo, vértice y arista.","code":"graph1 <- make_tree(127, 2, mode = \"undirected\") summary(g) ## IGRAPH abad31e U--- 5 3 -- Ring graph ## + attr: name (g/c), mutual (g/l), circular (g/l) graph2 <- make_tree(127, 2, mode = \"undirected\") identical_graphs(graph1, graph2) ## [1] TRUE graph1 <- sample_grg(100, 0.2) summary(graph1) ## IGRAPH cf0d267 U--- 100 524 -- Geometric random graph ## + attr: name (g/c), radius (g/n), torus (g/l) graph2 <- sample_grg(100, 0.2) identical_graphs(graph1, graph2) ## [1] FALSE isomorphic(graph1, graph2) ## [1] FALSE"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"establecer-y-recuperar-atributos","dir":"Articles","previous_headings":"","what":"Establecer y recuperar atributos","title":"igraph (interfaz R)","text":"Además de los IDs, los vértices y aristas pueden tener atributos como un nombre, coordenadas para graficar, metadatos y pesos. El propio grafo también puede tener estos atributos (por ejemplo, un nombre, que se mostrará en summary). En cierto sentido, cada grafo, vértice y arista puede ser utilizado como un espacio de nombres en R para almacenar y recuperar estos atributos. Para demostrar el uso de los atributos, creemos una red social sencilla: Cada vértice representa una persona, por lo que queremos almacenar sus edades, géneros y el tipo de conexión entre dos personas (is_formal() se refiere si una conexión entre una persona y otra es formal o informal, es decir, colegas o amigos). El operador $ es un atajo para obtener y establecer atributos de un grafo. Es más corto y tan legible como graph_attr() y set_graph_attr(). V y E son la forma estándar de obtener una secuencia de todos los vértices y aristas respectivamente. Esto asigna un atributo todos los vértices/aristas la vez. Otra forma de generar nuestra red social es con el uso de set_vertex_attr() y set_edge_attr() y el operador %\\>%: Para asignar o modificar un atributo un único vértice/arista: Los valores de los atributos pueden establecerse en cualquier objeto de R, pero ten en cuenta que almacenar el grafo en algunos formatos puede provocar la pérdida de valores en atributos complejos. Los vértices, las aristas y el propio grafo pueden utilizarse para establecer atributos, por ejemplo, para añadir una fecha al grafo: Para recuperar atributos, también puedes utilizar graph_attr(), vertex_attr() y edge_attr(). Para encontrar el ID de un vértice puedes utilizar la función match(): Para asignar atributos un subconjunto de vértices o aristas, puedes utilizar: Para eliminar atributos: Si quieres guardar un grafo en R con todos los atributos utiliza la función estándar de R dput y recupéralo más tarde con dget. También puedes simplemente guardar el espacio de trabajo de R y restaurarlo más tarde.","code":"g <- make_graph( ~ Alice-Boris:Himari:Moshe, Himari-Alice:Nang:Moshe:Samira, Ibrahim-Nang:Moshe, Nang-Samira ) V(g)$age <- c(25, 31, 18, 23, 47, 22, 50) V(g)$gender <- c(\"f\", \"m\", \"f\", \"m\", \"m\", \"f\", \"m\") E(g)$is_formal <- c(FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE) summary(g) ## IGRAPH 5baa453 UN-- 7 9 -- ## + attr: name (v/c), age (v/n), gender (v/c), is_formal (e/l) g <- make_graph( ~ Alice-Boris:Himari:Moshe, Himari-Alice:Nang:Moshe:Samira, Ibrahim-Nang:Moshe, Nang-Samira ) %>% set_vertex_attr(\"age\", value = c(25, 31, 18, 23, 47, 22, 50)) %>% set_vertex_attr(\"gender\", value = c(\"f\", \"m\", \"f\", \"m\", \"m\", \"f\", \"m\")) %>% set_edge_attr(\"is_formal\", value = c(FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE)) summary(g) E(g)$is_formal ## [1] FALSE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE E(g)$is_formal[1] <- TRUE E(g)$is_formal ## [1] TRUE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE g$date <- c(\"2022-02-11\") graph_attr(g, \"date\") ## [1] \"2022-02-11\" match(c(\"Ibrahim\"), V(g)$name) ## [1] 7 V(g)$name[1:3] <- c(\"Alejandra\", \"Bruno\", \"Carmina\") V(g) ## + 7/7 vertices, named, from 5baa453: ## [1] Alejandra Bruno Carmina Moshe Nang Samira Ibrahim g <- delete_vertex_attr(g, \"gender\") V(g)$gender ## NULL"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"propiedades-estructurales-de-los-grafos","dir":"Articles","previous_headings":"","what":"Propiedades estructurales de los grafos","title":"igraph (interfaz R)","text":"igraph proporciona un amplio conjunto de métodos para calcular varias propiedades estructurales de los grafos. Está más allá del alcance de este tutorial documentar todos ellos, por lo que esta sección sólo presentará algunos de ellos con fines ilustrativos. Trabajaremos con la pequeña red social que construimos en la sección anterior. Probablemente, la propiedad más sencilla en la que se puede pensar es el “grado del vértice”. El grado de un vértice es igual al número de aristas incidentes él. En el caso de los grafos dirigidos, también podemos definir el grado de entrada (el número de aristas que apuntan hacia el vértice) y el grado de salida (el número de aristas que se originan en el vértice). igraph es capaz de calcularlos todos utilizando una sintaxis sencilla: Si el grafo fuera dirigido, podríamos calcular los grados de entrada y salida por separado utilizando degree(mode = \"\") y degree(mode = \"\"). También puedes pasar un único ID de un vértice o una lista de IDs de los vértices degree() si quieres calcular los grados sólo para un subconjunto de vértices: La mayoría de las funciones que aceptan los IDs de los vértices también aceptan los “nombres” de los vértices (es decir, los valores del atributo name del vértice) siempre que los nombres sean únicos: También funciona para vértices individuales: De igual manera, se utiliza una sintaxis similar para la mayoría de las propiedades estructurales que igraph puede calcular. Para las propiedades de los vértices, las funciones aceptan un ID, un nombre o una lista de IDs o nombres (y si se omiten, el valor predeterminado es el conjunto de todos los vértices). Para las propiedades de aristas, las funciones aceptan un único ID o una lista de IDs. NOTA: Para algunas mediciones, tiene sentido calcularlas sólo para unos pocos vértices o aristas en lugar de para todo el grafo, ya que de todas formas llevaría el mismo tiempo. En este caso, las funciones aceptan IDs de vértices o aristas, pero se puede restringir la lista resultante utilizando operaciones estándar. Un ejemplo es la centralidad de vectores propios (evcent()). Además del grado, igraph incluye funciones integradas para calcular muchas otras propiedades de centralidad, como la intermediación de vértices y aristas (edge_betweenness()) o el PageRank de Google (page_rank()), por nombrar algunas. Aquí sólo ilustraremos la intermediación de aristas: De este modo, ahora también podemos averiguar qué conexiones tienen la mayor centralidad de intermediación:","code":"degree(g) ## Alejandra Bruno Carmina Moshe Nang Samira Ibrahim ## 3 1 4 3 3 2 2 degree(g, 7) ## Ibrahim ## 2 degree(g, v = c(3,4,5)) ## Carmina Moshe Nang ## 4 3 3 degree(g, v = c(\"Carmina\", \"Moshe\", \"Nang\")) ## Carmina Moshe Nang ## 4 3 3 degree(g, \"Bruno\") ## Bruno ## 1 edge_betweenness(g) ## [1] 6 6 4 3 4 4 4 2 3 ebs <- edge_betweenness(g) as_edgelist(g)[ebs == max(ebs), ] ## [,1] [,2] ## [1,] \"Alejandra\" \"Bruno\" ## [2,] \"Alejandra\" \"Carmina\""},{"path":[]},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"selección-de-vértices","dir":"Articles","previous_headings":"Búsqueda de vértices y aristas basada en atributos","what":"Selección de vértices","title":"igraph (interfaz R)","text":"Tomando como ejemplo la red social anteriormente creada, te gustaría averiguar quién tiene el mayor grado. Puedes hacerlo con las herramientas presentadas hasta ahora y con la función .max(): Otro ejemplo sería seleccionar sólo los vértices que tienen IDs impares, utilizando la función V(): Por supuesto, es posible seleccionar vértices o aristas mediante índices posicionales: Al seleccionar un vértice que existe se produce un error: Los nombres de los atributos también pueden utilizarse tal cual dentro de los operadores de indexación (“[]”) de V() y E(). Esto puede combinarse con la capacidad de R de utilizar vectores booleanos para indexar y obtener expresiones muy concisas y legibles para recuperar un subconjunto del set de vértices o aristas de un grafo. Por ejemplo, el siguiente comando nos da los nombres de los individuos menores de 30 años de nuestra red social: Por supuesto, < es el único operador booleano que puede utilizarse para esto. Otras posibilidades son las siguientes: También puede crear un operador “incluido en” partir de %% utilizando el operador Negate: Si un atributo tiene el mismo nombre que una función de igraph, debes tener cuidado ya que la sintaxis puede llegar ser un poco confusa. Por ejemplo, si hay un atributo llamado degree que representa las notas de un examen para cada persona, debe confundirse con la función de igraph que calcula los grados de los vértices de una red:","code":"which.max(degree(g)) ## Carmina ## 3 graph <- graph.full(n=10) only_odd_vertices <- which(V(graph)%%2==1) length(only_odd_vertices) ## [1] 5 seq <- V(graph)[2, 3, 7] seq ## + 3/10 vertices, from d8400b1: ## [1] 2 3 7 seq <- seq[1, 3] # filtrar un conjunto de vértices existente seq ## + 2/10 vertices, from d8400b1: ## [1] 2 7 seq <- V(graph)[2, 3, 7, \"foo\", 3.5] ## Error in simple_vs_index(x, ii, na_ok): Unknown vertex selected V(g)[age < 30]$name ## [1] \"Alejandra\" \"Carmina\" \"Moshe\" \"Samira\" `%notin%` <- Negate(`%in%`) V(g)$degree <- c(\"A\", \"B\", \"B+\", \"A+\", \"C\", \"A\", \"B\") V(g)$degree[degree(g) == 3] ## [1] \"A\" \"A+\" \"C\" V(g)$name[degree(g) == 3] ## [1] \"Alejandra\" \"Moshe\" \"Nang\""},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"selección-de-aristas","dir":"Articles","previous_headings":"Búsqueda de vértices y aristas basada en atributos","what":"Selección de aristas","title":"igraph (interfaz R)","text":"Las aristas pueden seleccionarse basándose en atributos, igual que los vértices. Como ya se ha mencionado, la forma estándar de obtener aristas es E. Además, existen algunas propiedades estructurales especiales para seleccionar aristas. El uso de .() permite filtrar la serie de aristas desde los vértices de donde proceden. Por ejemplo, para seleccionar todas las aristas procedentes de Carmina (cuyo ID de vértice es el 3): Por supuesto, también funciona con nombres de vértices: Al usar .(), se filtran la serie de aristas en función de los vértices de destino o diana. Esto es diferente de .() si el grafo es dirigido, mientras que da la misma respuesta para grafos dirigidos. Con .inc() sólo se seleccionan las aristas que inciden en un único vértice o en al menos uno de los vértices, independientemente de la dirección de las aristas. La expresión %--% es un operador especial que puede utilizarse para seleccionar todas las aristas entre dos conjuntos de vértices. Ignora las direcciones de las aristas en los grafos dirigidos. Por ejemplo, la siguiente expresión selecciona todas las aristas entre Carmina (su ID de vértice es el 3), Nang (su ID de vértice es el 5) y Samira (su ID de vértice es el 6): Para que el operador %--% funcione con nombres, puedes construir vectores de caracteres que contengan los nombres y luego utilizar estos vectores como operandos. Por ejemplo, para seleccionar todas las aristas que conectan los hombres con las mujeres, podemos hacer lo siguiente, luego de volver añadir el atributo de género que hemos eliminado anteriormente:","code":"E(g)[.from(3)] ## + 4/9 edges from 5baa453 (vertex names): ## [1] Alejandra--Carmina Carmina --Moshe Carmina --Nang Carmina --Samira E(g)[.from(\"Carmina\")] ## + 4/9 edges from 5baa453 (vertex names): ## [1] Alejandra--Carmina Carmina --Moshe Carmina --Nang Carmina --Samira E(g) [ 3:5 %--% 5:6 ] ## + 3/9 edges from 5baa453 (vertex names): ## [1] Carmina--Nang Carmina--Samira Nang --Samira V(g)$gender <- c(\"f\", \"m\", \"f\", \"m\", \"m\", \"f\", \"m\") men <- V(g)[gender == \"m\"]$name men ## [1] \"Bruno\" \"Moshe\" \"Nang\" \"Ibrahim\" women <- V(g)[gender == \"f\"]$name women ## [1] \"Alejandra\" \"Carmina\" \"Samira\" E(g)[men %--% women] ## + 5/9 edges from 5baa453 (vertex names): ## [1] Alejandra--Bruno Alejandra--Moshe Carmina --Moshe Carmina --Nang ## [5] Nang --Samira"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"tratar-un-grafo-como-una-matriz-de-adyacencia","dir":"Articles","previous_headings":"","what":"Tratar un grafo como una matriz de adyacencia","title":"igraph (interfaz R)","text":"Una matriz de adyacencia es otra manera de representar un grafo. En la matriz de adyacencia, las filas y columnas están indicadas por los vértices del grafo y los elementos de la matriz indican el número de aristas entre los vértices y j. La matriz de adyacencia del grafo de nuestra red social imaginaria es: Por ejemplo, Carmina (1, 0, 0, 1, 1, 1, 0) está directamente conectada con Alejandra (que tiene el índice 1), Moshe (índice 4), Nang (índice 5), Samira (índice 6) y , pero con Bruno (índice 2) ni con Ibrahim (índice 7).","code":"as_adjacency_matrix(g) ## 7 x 7 sparse Matrix of class \"dgCMatrix\" ## Alejandra Bruno Carmina Moshe Nang Samira Ibrahim ## Alejandra . 1 1 1 . . . ## Bruno 1 . . . . . . ## Carmina 1 . . 1 1 1 . ## Moshe 1 . 1 . . . 1 ## Nang . . 1 . . 1 1 ## Samira . . 1 . 1 . . ## Ibrahim . . . 1 1 . ."},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"diseños-y-graficación","dir":"Articles","previous_headings":"","what":"Diseños y graficación","title":"igraph (interfaz R)","text":"Un grafo es un objeto matemático abstracto sin una representación específica en el espacio 2D, 3D o cualquier espacio geométrico. Esto significa que, cuando queremos visualizar un grafo, primero tenemos que encontrar una correspondencia entre los vértices y las coordenadas en un espacio bidimensional o tridimensional, preferiblemente de una manera útil y/o agradable la vista. Una rama separada de la teoría de grafos, denominada dibujo de grafos, trata de resolver este problema mediante varios algoritmos de diseño de grafos. igraph implementa varios algoritmos de diseño y también es capaz de dibujarlos en la pantalla o en cualquier formato de salida que soporte el propio R.","code":""},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"algoritmos-de-diseño","dir":"Articles","previous_headings":"Diseños y graficación","what":"Algoritmos de diseño","title":"igraph (interfaz R)","text":"Las funciones de diseño en igraph siempre empiezan por layout. La siguiente tabla las resume: Los algoritmos de diseño pueden ejecutarse directamente con un grafo como primer argumento. Devolverán una matriz con dos columnas y tantas filas como número de vértices del grafo; cada fila corresponderá la posición de un único vértice, ordenado según el ID del vértice. Algunos algoritmos tienen una variante 3D; en este caso devuelven tres columnas en lugar de 2. Algunos algoritmos de diseño toman argumentos adicionales; por ejemplo, cuando se diseña un grafo con la forma de un árbol, puede tener sentido especificar qué vértice debe colocarse en la raíz del diseño:","code":"layout <- layout_with_kk(g) layout <- layout_as_tree(g, root = 2)"},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"dibujar-un-grafo-utilizando-un-diseño","dir":"Articles","previous_headings":"Diseños y graficación","what":"Dibujar un grafo utilizando un diseño","title":"igraph (interfaz R)","text":"Podemos trazar nuestra red social imaginaria con el algoritmo de diseño Kamada-Kawai de la siguiente manera: Esto debería abrir una nueva ventana mostrando una representación visual de la red. Recuerda que la ubicación exacta de los nodos puede ser diferente en tu máquina, ya que la disposición es determinista. El argumento layout también acepta funciones; en este caso, la función será llamada con el grafo como su primer argumento. Esto permite ingresar directamente el nombre de una función de diseño, sin tener que crear una variable de diseño, como en el ejemplo anterior: Para mejorar el aspecto visual, una adición trivial sería colorear los vértices según el género. También deberíamos intentar colocar los nombres ligeramente fuera de los vértices para mejorar la legibilidad: También puedes tratar el atributo gender como un factor y proporcionar los colores como un argumento plot(), que tiene prioridad sobre el atributo color que se asigna de manera estándar los vértices. Los colores se asignan automáticamente: Como se vio anteriormente, con el argumento vertex.color puedes especificar propiedades visuales para plot en lugar de usar y/o manipular los atributos de vértices o aristas. El siguiente gráfico muestra las relaciones formales con líneas gruesas y las informales con líneas finas: Este último procedimiento es preferible si quieres modificar la representación visual de tu grafo, pero quieres hacer modificaciones al grafo mismo. En resumen, hay propiedades especiales de vértices y aristas que corresponden la representación visual del grafo. Estos atributos pueden modificar la configuración predeterminada de igraph (es decir, color, peso, nombre, forma, diseño, etc.). Las dos tablas siguientes resumen los atributos visuales más utilizados para vértices y aristas, respectivamente:","code":"layout <- layout_with_kk(g) plot(g, layout = layout, main = \"Red social con el algoritmo de diseño Kamada-Kawai\") plot( g, layout = layout_with_fr, main = \"Red social con el algoritmo de disposición Fruchterman-Reingold\" ) V(g)$color <- ifelse(V(g)$gender == \"m\", \"yellow\", \"red\") plot( g, layout = layout, vertex.label.dist = 3.5, main = \"Red social - con los géneros como colores\" ) plot( g, layout = layout, vertex.label.dist = 3.5, vertex.color = as.factor(V(g)$gender)) plot( g, layout = layout, vertex.label.dist = 3.5, vertex.size = 20, vertex.color = ifelse(V(g)$gender == \"m\", \"yellow\", \"red\"), edge.width = ifelse(E(g)$is_formal, 5, 1) )"},{"path":[]},{"path":[]},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"argumentos-más-comunes-de-plot","dir":"Articles","previous_headings":"Diseños y graficación","what":"Argumentos más comunes de plot()","title":"igraph (interfaz R)","text":"Estos parámetros pueden especificarse como argumentos de la función plot para ajustar el aspecto general del gráfico.","code":""},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"igraph-y-el-mundo-exterior","dir":"Articles","previous_headings":"","what":"igraph y el mundo exterior","title":"igraph (interfaz R)","text":"Ningún módulo de grafos estaría completo sin algún tipo de funcionalidad de importación/exportación que permita al paquete comunicarse con programas y kits de herramientas externos. igraph es una excepción: proporciona funciones para leer los formatos de grafos más comunes y para guardar grafos en archivos que obedezcan estas especificaciones de formato. Las funciones principales para leer y escribir de/un fichero son read_graph() y write_graph(), respectivamente. La siguiente tabla resume los formatos que igraph puede leer o escribir: NOTA: La mayoría de los formatos tienen sus propias limitaciones; por ejemplo, todos pueden almacenar atributos. Tu mejor opción es probablemente GraphML o GML si quieres guardar los grafos de igraph en un formato que pueda ser leído desde un paquete externo y quieres preservar los atributos numéricos y de cadena. Edge list y NCOL también están bien si tienes atributos (aunque NCOL admite nombres de vértices y pesos de aristas).","code":""},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"dónde-ir-a-continuación","dir":"Articles","previous_headings":"","what":"Dónde ir a continuación","title":"igraph (interfaz R)","text":"Este tutorial es una breve introducción igraph en R. Esperamos que hayas disfrutado de su lectura y que te resulte útil para tus propios análisis de redes. Para una descripción detallada de funciones específicas, consulta https://r.igraph.org/reference/. Si tienes preguntas sobre cómo utilizar igraph, visita nuestro Foro. Para informar de un error, abre una incidencia en Github. Por favor, hagas preguntas de uso en Github directamente, ya que está pensado para desarrolladores y para usuarios.","code":""},{"path":"https://r.igraph.org/articles/igraph_ES.html","id":"información-de-la-sesión","dir":"Articles","previous_headings":"","what":"Información de la sesión","title":"igraph (interfaz R)","text":"En favor de la reproducibilidad, la información de la sesión para el código anterior es la siguiente:","code":"sessionInfo() ## R version 4.4.1 (2024-06-14) ## Platform: x86_64-pc-linux-gnu ## Running under: Ubuntu 22.04.5 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 ## [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 ## [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C ## [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] igraph_2.0.3 ## ## loaded via a namespace (and not attached): ## [1] cli_3.6.3 knitr_1.48 rlang_1.1.4 xfun_0.48 ## [5] highr_0.11 textshaping_0.4.0 jsonlite_1.8.9 htmltools_0.5.8.1 ## [9] ragg_1.3.3 sass_0.4.9 rmarkdown_2.28 grid_4.4.1 ## [13] evaluate_1.0.1 jquerylib_0.1.4 fastmap_1.2.0 yaml_2.3.10 ## [17] lifecycle_1.0.4 compiler_4.4.1 fs_1.6.4 htmlwidgets_1.6.4 ## [21] pkgconfig_2.0.3 lattice_0.22-6 systemfonts_1.1.0 digest_0.6.37 ## [25] R6_2.5.1 magrittr_2.0.3 bslib_0.8.0 Matrix_1.7-0 ## [29] tools_4.4.1 pkgdown_2.1.1 cachem_1.1.0 desc_1.4.3"},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"cannot-compile-igraph-from-sources-on-windows-or-macos","dir":"Articles","previous_headings":"","what":"Cannot compile igraph from sources on Windows or macOS","title":"Installation troubleshooting","text":"compile igraph sources, unless know ! much convenient use binaries CRAN instead. can installed using install.packages(\"igraph\"). Usually, takes days binary releases become available CRAN new igraph source release. period, install.packages() give choice using latest source release previous binary release. Just choose use binary release, .e. respond “” “want install sources?” CRAN provides Windows macOS binaries last two minor releases R (e.g. 4.3 4.2), older ones (e.g. 4.1). Make sure using one supported R versions. Refer https://r-project.org/ find latest R version moment. Note pre-compiled binaries CRAN compatible R distribution provided CRAN . obtained R different sources, Homebrew MacPorts macOS, able use , way install packages compile sources.","code":"> install.packages('igraph') There is a binary version available but the source version is later: binary source needs_compilation igraph 1.2.7 1.2.8 TRUE Do you want to install from sources the package which needs compilation? (Yes/no/cancel) no"},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"i-still-want-to-compile-igraph-from-sources","dir":"Articles","previous_headings":"Cannot compile igraph from sources on Windows or macOS","what":"I still want to compile igraph from sources","title":"Installation troubleshooting","text":"decide try compile sources anyway, basic requirements listed . assumed comfortable compiling software sources resolving basic issues arise. Otherwise, please use binaries. Instructions install Rtools R-4.0.0 R-4.1.3, see particular “Using pacman” link. find copyable pacman command installing dependencies. Instructions install Rtools R4.2.x Rtools R4.3.x. Make sure GLPK C library installed. Rglpk R package. Instructions installing libraries Rtools4 Windows ","code":""},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"cannot-compile-igraph-from-sources-on-linux","dir":"Articles","previous_headings":"","what":"Cannot compile igraph from sources on Linux","title":"Installation troubleshooting","text":"Since CRAN provide binary packages Linux, Linux users usually need compile igraph sources. order , make sure prerequisites: C, C++ Fortran compilers. Debian-based distros, use sudo apt install build-essential gfortran. Fedora, use yum install gcc gcc-c++ gcc-gfortran. Development packages glpk libxml2. Debian-based distros, use sudo apt install libglpk-dev libxml2-dev. Fedora, use yum install glpk-devel libxml2-devel. Anaconda environment active, deactivate compiling igraph. conda environments active known cause number issues, compilation later usage. Set Anaconda installation environment active default. Make sure Anaconda’s bin directory present PATH environment variable. add directory path manually. Instead, let Anaconda manage using conda init, recommended Anaconda. Anaconda’s condabin, bin, present PATH.","code":""},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"fatal-error-glpk-h-no-such-file-or-directory","dir":"Articles","previous_headings":"","what":"fatal error: glpk.h: No such file or directory","title":"Installation troubleshooting","text":"using Windows macOS, please refer compile igraph sources Windows macOS. using Linux, please refer compile igraph sources Linux.","code":""},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"libgfortran-so-4-cannot-open-shared-object-file-no-such-file-or-directory","dir":"Articles","previous_headings":"","what":"libgfortran.so.4: cannot open shared object file: No such file or directory","title":"Installation troubleshooting","text":"problem occurs multiple incompatible gfortran versions machine. commonly, one comes active Anaconda environment. Always deactivate Anaconda environments using conda deactivate installing igraph using install.packages(). Set Anaconda installation environment active default. Make sure Anaconda’s bin directory present PATH environment variable. add directory path manually. Instead, let Anaconda manage using conda init, recommended Anaconda. Anaconda’s condabin, bin, present PATH.","code":""},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"libmkl_rt-so-1-cannot-open-shared-object-file-no-such-file-or-directory","dir":"Articles","previous_headings":"","what":"libmkl_rt.so.1: cannot open shared object file: No such file or directory","title":"Installation troubleshooting","text":"issue typically occurs Anaconda environment containing conflicting BLAS libraries active. Please refer instructions section “libgfortran..4: open shared object file”.","code":""},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"libglpk-so-40-cannot-open-shared-object-file-no-such-file-or-directory","dir":"Articles","previous_headings":"","what":"libglpk.so.40: cannot open shared object file: No such file or directory","title":"Installation troubleshooting","text":"error occur Linux systems igraph compiled GLPK support, GLPK currently installed system. resolve , install GLPK. Debian-based systems, simply use sudo apt install libglpk40. may happen binary version igraph installed https://packagemanager.rstudio.com. binaries assume GLPK present system.","code":""},{"path":"https://r.igraph.org/articles/installation-troubleshooting.html","id":"glpk-is-not-available-unimplemented-function-call","dir":"Articles","previous_headings":"","what":"GLPK is not available, Unimplemented function call","title":"Installation troubleshooting","text":"error occurs calling igraph function relies GLPK, igraph compiled without GLPK support. Please refer “compile igraph sources Linux” instructions compiling igraph GLPK support.","code":""},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Gábor Csárdi. Author. Tamás Nepusz. Author. Vincent Traag. Author. Szabolcs Horvát. Author. Fabio Zanini. Author. Daniel Noom. Author. Kirill Müller. Author, maintainer. Maëlle Salmon. Contributor. Michael Antonov. Contributor. Chan Zuckerberg Initiative. Funder.","code":""},{"path":"https://r.igraph.org/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Csardi G, Nepusz T (2006). “igraph software package complex network research.” InterJournal, Complex Systems, 1695. https://igraph.org. Csárdi G, Nepusz T, Traag V, Horvát Sz, Zanini F, Noom D, Müller K (2024). _igraph: Network Analysis Visualization R_. doi:10.5281/zenodo.7682609 , R package version 2.0.3, .","code":"@Article{, title = {The igraph software package for complex network research}, author = {Gabor Csardi and Tamas Nepusz}, journal = {InterJournal}, volume = {Complex Systems}, pages = {1695}, year = {2006}, url = {https://igraph.org}, } @Manual{, title = {{igraph}: Network Analysis and Visualization in R}, author = {Gábor Csárdi and Tamás Nepusz and Vincent Traag and Szabolcs Horvát and Fabio Zanini and Daniel Noom and Kirill Müller}, year = {2024}, note = {R package version 2.0.3}, doi = {10.5281/zenodo.7682609}, url = {https://CRAN.R-project.org/package=igraph}, }"},{"path":[]},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"igraph authors, in alphabetical order:"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"--------------------------------------"},{"path":[]},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Patrick R. Amestoy\tAMD library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Adelchi Azzalini\tigraph.options based on the sm package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Tamas Badics\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Gregory Benison\t\tMinimum cut calculation"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Adrian Bowman\t\tigraph.options based on the sm package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Walter Böhm\t\tLSAP"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Keith Briggs\t\tParts from the Very Nauty Graph Library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Geometric random graphs"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Girth"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Various patches and bug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Jeroen Bruggeman\tspinglass community detection"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Burt's constraints"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Juergen Buchmueller\tBig number math implementation"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Carter T. Butts\t\tSome layout algorithms from the SNA R package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"bonpow function in the SNA R package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Some R manual pages, from the SNA R package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Aaron Clauset\t\tHierarchical random graphs"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"J.T. Conklin\t\tlogbl function"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Topher Cooper\t\tGSL random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Gabor Csardi\t\tMost of igraph"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Trevor Croft\t\tsimpleraytracer"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Peter DalGaard\t\tzeroin root finder"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Timothy A Davis\t\tCXSPARSE: a Concise Sparse Matrix package - Extended"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"AMD library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Sparse matrix column ordering"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Laurent Deniau\t\tBits of the error handling system"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Ulrich Drepper\t\tlogbl function"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Iain S. Duff\t\tAMD library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"GLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"S.I. Feldman\t\tf2c"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"David Firth\t\tDisplay data frame in Tk, from relimp package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"P. Foggia\t\tVF2 graph isomorphism algorithm"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"John Fox\t\tR: suppressing X11 warnings"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Alan George \t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"John Gilbert\t\tSparse matrix column ordering"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"D.Goldfarb\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Brian Gough\t\tGSL random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Tom Gregorovic\t\tMultilevel community detection"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"M.Grigoriadis\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Oscar Gustafsson\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Kurt Hornik\t\tLSAP"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Szabolcs Horvat\t\tigraph C core library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Paul Hsieh\t\tpstdint.h"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Ross Ihaka\t\tSome random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Tommi Junttila\t\tBLISS graph isomorphism library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Petteri Kaski\t\tBLISS graph isomorphism library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Oleg Keselyov\t\tzeroin root finder"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Darwin Klingman\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Donald E. Knuth\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Stefan I. Larimore\tSparse matrix column ordering"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Yusin Lee \t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Richard Lehoucq\t\tARPACK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Rene Locher\t\tR arrow drawing function, from IDPmisc package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"J.C. Nash\t\tBFGS optimizer"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Joseph W-H Liu\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Makoto Matsumoto\tGSL random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Vincent Matossian\tGraph laplacian"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"igraph_neighborhood_graphs"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Line graphs"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Peter McMahan\t\tCohesive blocking"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Andrew Makhorin\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"David Morton de Lachapelle\tSpectral coarse graining"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Laurence Muller\t\tFixes for compilation on MS Visual Studio"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Fionn Murtagh\t\tOrder a hierarchical clustering"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Emmanuel Navarro\tinfomap community detection"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Various fixes and patches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Tamas Nepusz\t\tMost of igraph"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Esmond Ng \t\tSparse matrix column ordering"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Kevin O'Neill\t\tMaximal independent vertex sets"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Takuji Nishimura\tGSL random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Daniel Noom\t\tigraph C core library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Jim Orlin\t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Patric Ostergard\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Elliot Paquette\t\tpsumtree data type"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Pascal Pons\t\twalktrap community detection"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Joerg Reichardt\t\tspinglass community detection"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Marc Rieffel\t\tGSL random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"B.D. Ripley\t\tigraph.options based on the sm package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"BFGS optimizer"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Various bug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Martin Rosvall\t\tinfomap community detection"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Andreas Ruckstuhl\tR arrow drawing function, from IDPmisc package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Heinrich Schuchardt\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"J.K. Reid \t\tGLPK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"C. Sansone\t\tVF2 graph isomorphism algorithm"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Michael Schmuhl\t\tThe graphopt layout generator"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Christine Solnon\tLAD graph isomorphism library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Danny Sorensen\t\tARPACK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"James Theiler\t\tGSL random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Samuel Thiriot\t\tInterconnected islands graph generator"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Vincent A. Traag\tigraph C core library"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Magnus Torfason\t\tR operators that work by name"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Theodore Y. Ts'o libuuid"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Minh Van Nguyen\t\tMicroscopic update rules"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Various test cases"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Many documentation and other fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"M. Vento\t\tVF2 graph isomorphism algorithm"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Fabien Viger\t\tgengraph graph generator"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Phuong Vu\t\tARPACK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"P.J. Weinberger\t\tf2c"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Hadley Wickham lazyeval"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Garrett A. Wollman\tqsort"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"B.N. Wylie \t\tDrL layout generator"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Chao Yang\t\tARPACK"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Fabio Zanini\t\tigraph C core library"},{"path":[]},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Institutional copyright owners:"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"-------------------------------"},{"path":[]},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Free Software Foundation, Inc\tCode generated by bison"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Sandia Corporation\t \tDrL layout generator"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"The R Development Core Team \tSome random number generators (not used in R)"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"R: as.dendrogram from stats package"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"The Regents of the University of California\tqsort"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Xerox PARC\t\t \tSparse matrix column ordering"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"R Studio lazyeval"},{"path":[]},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Other contributors"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"------------------"},{"path":[]},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Neal Becker\t\tPatches to compile with gcc 4.4"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Richard Bowman\t\tR patches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Alex Chen\t\tPatch to compile on Intel compilers"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Daniel Cordeiro \tPatches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Tom Gregorovic\t\tBug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Mayank Lahiri\t\tForest fire game fix"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"John Lapeyre \t\tPatches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Christopher Lu\t\tVarious fixes and patches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"André Panisson\t\tR patches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Bob Pap \t\tBug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Keith Ponting\t\tR package bug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Martin J Reed\t\tBug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Elena Tea Russo\t\tBug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"KennyTM\t\t\tBug fixes"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Jordi Torrents\t\tPatches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Matthew Walker\t\tVarious patches"},{"path":"https://r.igraph.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Additional details","title":"Authors and Citation","text":"","code":"Kai Willadsen\t\tArrow size support in Python"},{"path":"https://r.igraph.org/cran-comments.template.html","id":"test-environments","dir":"","previous_headings":"","what":"Test environments","title":"NA","text":"local R installation, R 4.1.1 ubuntu 20.04 (Github Actions), R 3.4.4, R 3.5.3, R 4.0.5, R 4.1.1 R-devel windows-latest (Github Actions), R 4.1.1 macOS-latest (Github Actions), R 4.1.1","code":""},{"path":"https://r.igraph.org/cran-comments.template.html","id":"r-cmd-check-results","dir":"","previous_headings":"","what":"R CMD check results","title":"NA","text":"X errors | Y warnings | Z notes Add comments CRAN maintainers .","code":""},{"path":"https://r.igraph.org/cran-comments.template.html","id":"revdepcheck-results","dir":"","previous_headings":"","what":"revdepcheck results","title":"NA","text":"Paste output revdepcheck revdep/ Extend output explanations failure believe ignored fault","code":""},{"path":"https://r.igraph.org/index.html","id":"rigraph-","dir":"","previous_headings":"","what":"Network Analysis and Visualization","title":"Network Analysis and Visualization","text":"R/igraph R package igraph network analysis library.","code":""},{"path":"https://r.igraph.org/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Network Analysis and Visualization","text":"can install stable version R/igraph CRAN: development version, can use R-universe Github, pak package: compiling sources, make sure C, C++ Fortran compilers, well development packages glpk libxml2. Debian/Ubuntu, use apt install libglpk-dev libxml2-dev. Fedora, use yum install glpk-devel libxml2-devel. installation source Windows, need RTools installed. versions R >= 4.0 can install dependencies using:","code":"install.packages(\"igraph\") options( repos = c( igraph = 'https://igraph.r-universe.dev', CRAN = 'https://cloud.r-project.org' ) ) install.packages('igraph') pak::pak(\"igraph/rigraph\") pacman -Sy mingw-w64-{i686,x86_64}-glpk mingw-w64-{i686,x86_64}-libxml2"},{"path":"https://r.igraph.org/index.html","id":"installation-troubleshooting","dir":"","previous_headings":"","what":"Installation troubleshooting","title":"Network Analysis and Visualization","text":"See Installation FAQ.","code":""},{"path":"https://r.igraph.org/index.html","id":"documentation","dir":"","previous_headings":"","what":"Documentation","title":"Network Analysis and Visualization","text":"See igraph package’s website complete manual.","code":""},{"path":"https://r.igraph.org/index.html","id":"contributions","dir":"","previous_headings":"","what":"Contributions","title":"Network Analysis and Visualization","text":"Please read contribution guide.","code":""},{"path":"https://r.igraph.org/index.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Network Analysis and Visualization","text":"GNU GPL version 2 later","code":""},{"path":"https://r.igraph.org/index.html","id":"contributors","dir":"","previous_headings":"","what":"Contributors","title":"Network Analysis and Visualization","text":"contributions project gratefully acknowledged using allcontributors package following -contributors specification. Contributions kind welcome!","code":""},{"path":"https://r.igraph.org/reference/E.html","id":null,"dir":"Reference","previous_headings":"","what":"Edges of a graph — E","title":"Edges of a graph — E","text":"edge sequence vector containing numeric edge ids, special class attribute allows custom operations: selecting subsets edges based attributes, graph structure, creating intersection, union edges, etc.","code":""},{"path":"https://r.igraph.org/reference/E.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Edges of a graph — E","text":"","code":"E(graph, P = NULL, path = NULL, directed = TRUE)"},{"path":"https://r.igraph.org/reference/E.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Edges of a graph — E","text":"graph graph. P list vertices select edges via pairs vertices. first second vertices select first edge, third fourth second, etc. path list vertices, select edges along path. Note works reliable simple graphs. graph multiple edges, one chosen arbitrarily included edge sequence. directed Whether consider edge directions P argument, directed graphs.","code":""},{"path":"https://r.igraph.org/reference/E.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Edges of a graph — E","text":"edge sequence graph.","code":""},{"path":"https://r.igraph.org/reference/E.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Edges of a graph — E","text":"Edge sequences usually used igraph function arguments refer edges graph. edge sequence tied graph refers : really denoted specific edges graph, used together another graph. edge sequence often created E() function. result includes edges increasing edge id order default (. none P path arguments used). edge sequence can indexed numeric vector, just like regular R vector. See links edge sequence operations .","code":""},{"path":"https://r.igraph.org/reference/E.html","id":"indexing-edge-sequences","dir":"Reference","previous_headings":"","what":"Indexing edge sequences","title":"Edges of a graph — E","text":"Edge sequences mostly behave like regular vectors, additional indexing operations specific ; e.g. selecting edges based graph structure, based edge attributes. See [.igraph.es details.","code":""},{"path":"https://r.igraph.org/reference/E.html","id":"querying-or-setting-attributes","dir":"Reference","previous_headings":"","what":"Querying or setting attributes","title":"Edges of a graph — E","text":"Edge sequences can used query set attributes edges sequence. See $.igraph.es() details.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/E.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Edges of a graph — E","text":"","code":"# Edges of an unnamed graph g <- make_ring(10) E(g) #> + 10/10 edges from 6d272e1: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 # Edges of a named graph g2 <- make_ring(10) %>% set_vertex_attr(\"name\", value = letters[1:10]) E(g2) #> + 10/10 edges from a0c4843 (vertex names): #> [1] a--b b--c c--d d--e e--f f--g g--h h--i i--j a--j"},{"path":"https://r.igraph.org/reference/V.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertices of a graph — V","title":"Vertices of a graph — V","text":"Create vertex sequence (vs) containing vertices graph.","code":""},{"path":"https://r.igraph.org/reference/V.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertices of a graph — V","text":"","code":"V(graph)"},{"path":"https://r.igraph.org/reference/V.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertices of a graph — V","text":"graph graph","code":""},{"path":"https://r.igraph.org/reference/V.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Vertices of a graph — V","text":"vertex sequence containing vertices, order numeric vertex ids.","code":""},{"path":"https://r.igraph.org/reference/V.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Vertices of a graph — V","text":"vertex sequence just name says : sequence vertices. Vertex sequences usually used igraph function arguments refer vertices graph. vertex sequence tied graph refers : really denoted specific vertices graph, used together another graph. implementation level, vertex sequence simply vector containing numeric vertex ids, special class attribute makes possible perform graph specific operations , like selecting subset vertices based graph structure, vertex attributes. vertex sequence often created V() function. result includes vertices increasing vertex id order. vertex sequence can indexed numeric vector, just like regular R vector. See [.igraph.vs additional links vertex sequence operations .","code":""},{"path":"https://r.igraph.org/reference/V.html","id":"indexing-vertex-sequences","dir":"Reference","previous_headings":"","what":"Indexing vertex sequences","title":"Vertices of a graph — V","text":"Vertex sequences mostly behave like regular vectors, additional indexing operations specific ; e.g. selecting vertices based graph structure, based vertex attributes. See [.igraph.vs details.","code":""},{"path":"https://r.igraph.org/reference/V.html","id":"querying-or-setting-attributes","dir":"Reference","previous_headings":"","what":"Querying or setting attributes","title":"Vertices of a graph — V","text":"Vertex sequences can used query set attributes vertices sequence. See $.igraph.vs() details.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/V.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Vertices of a graph — V","text":"","code":"# Vertex ids of an unnamed graph g <- make_ring(10) V(g) #> + 10/10 vertices, from ab96e4d: #> [1] 1 2 3 4 5 6 7 8 9 10 # Vertex ids of a named graph g2 <- make_ring(10) %>% set_vertex_attr(\"name\", value = letters[1:10]) V(g2) #> + 10/10 vertices, named, from a641f7c: #> [1] a b c d e f g h i j"},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":null,"dir":"Reference","previous_headings":"","what":"The igraph package — igraph-package","title":"The igraph package — igraph-package","text":"igraph library R package network analysis.","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"introduction","dir":"Reference","previous_headings":"","what":"Introduction","title":"The igraph package — igraph-package","text":"main goals igraph library provide set data types functions 1) pain-free implementation graph algorithms, 2) fast handling large graphs, millions vertices edges, 3) allowing rapid prototyping via high level languages like R.","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"igraph-graphs","dir":"Reference","previous_headings":"","what":"igraph graphs","title":"The igraph package — igraph-package","text":"igraph graphs class ‘igraph’. printed screen special format, example, ring graph created using make_ring(): ‘IGRAPH’ denotes igraph graph. come four bits denote kind graph: first ‘U’ undirected ‘D’ directed graphs. second ‘N’ named graph (.e. graph ‘name’ vertex attribute set). third ‘W’ weighted graphs (.e. ‘weight’ edge attribute set). fourth ‘B’ bipartite graphs (.e. ‘type’ vertex attribute set). come two numbers, number vertices number edges graph, double dash, name graph (‘name’ graph attribute) printed present. second line optional contains attributes graph. graph ‘name’ graph attribute, type character, two graph attributes called ‘mutual’ ‘circular’, complex type. complex type simply anything numeric character. See documentation print.igraph() details. want see edges graph well, use print_all() function:","code":"IGRAPH U--- 10 10 -- Ring graph + attr: name (g/c), mutual (g/x), circular (g/x) > print_all(g) IGRAPH badcafe U--- 10 10 -- Ring graph + attr: name (g/c), mutual (g/x), circular (g/x) + edges: [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10"},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"creating-graphs","dir":"Reference","previous_headings":"","what":"Creating graphs","title":"The igraph package — igraph-package","text":"many functions igraph creating graphs, deterministic stochastic; stochastic graph constructors called ‘games’. create small graphs given structure probably graph_from_literal() function easiest. uses R's formula interface, manual page contains many examples. Another option graph(), takes numeric vertex ids directly. graph_from_atlas() creates graph Graph Atlas, make_graph() can create special graphs. create graphs field data, graph_from_edgelist(), graph_from_data_frame() graph_from_adjacency_matrix() probably best choices. igraph package includes classic random graphs like Erdős-Rényi GNP GNM graphs (sample_gnp(), sample_gnm()) recent popular models, like preferential attachment (sample_pa()) small-world model (sample_smallworld()).","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"vertex-and-edge-ids","dir":"Reference","previous_headings":"","what":"Vertex and edge IDs","title":"The igraph package — igraph-package","text":"Vertices edges numerical vertex ids igraph. Vertex ids always consecutive start one. .e. graph \\(n\\) vertices vertex ids \\(1\\) \\(n\\). operation changes number vertices graphs, e.g. subgraph created via induced_subgraph(), vertices renumbered satisfy criteria. true edges well, edge ids always one \\(m\\), total number edges graph. often desirable follow vertices along number graph operations, vertex ids allow renumbering. solution assign attributes vertices. kept operations, possible. See attributes next section.","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"attributes","dir":"Reference","previous_headings":"","what":"Attributes","title":"The igraph package — igraph-package","text":"igraph possible assign attributes vertices edges graph, graph . igraph provides flexible constructs selecting set vertices edges based attribute values, see vertex_attr(), V() E() details. vertex/edge/graph attributes treated specially. One ‘name’ attribute. used printing graph instead numerical ids, exists. Vertex names can also used specify vector set vertices, igraph functions. E.g. degree() v argument gives vertices degree calculated. argument can given character vector vertex names. Edges can also ‘name’ attribute, treated specially well. Just like vertices, edges can also selected based names, e.g. delete_edges() functions. note , vertex names can also used select edges. form ‘|’, ‘’ ‘’ vertex names, select single, possibly directed, edge going ‘’ ‘’. two forms can also mixed edge selector. attributes define visualization parameters, see igraph.plotting details. Attribute values can set R object, note storing graph file formats might result loss complex attribute values. attribute values preserved use base::save() base::load() store/retrieve graphs.","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"visualization","dir":"Reference","previous_headings":"","what":"Visualization","title":"The igraph package — igraph-package","text":"igraph provides three different ways visualization. first plot.igraph() function. (Actually need write plot.igraph(), plot() enough. function uses regular R graphics can used R device. second function tkplot(), uses Tk GUI basic interactive graph manipulation. (Tk quite resource hungry, try large graphs.) third way requires rgl package uses OpenGL. See rglplot() function details. Make sure read igraph.plotting start plotting graphs.","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"file-formats","dir":"Reference","previous_headings":"","what":"File formats","title":"The igraph package — igraph-package","text":"igraph can handle various graph file formats, usually reading writing. suggest use GraphML file format graphs, except graphs big. big graphs simpler format recommended. See read_graph() write_graph() details.","code":""},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"further-information","dir":"Reference","previous_headings":"","what":"Further information","title":"The igraph package — igraph-package","text":"igraph homepage https://igraph.org. See especially documentation section. Join discussion forum https://igraph.discourse.group questions comments.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/aaa-igraph-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The igraph package — igraph-package","text":"Maintainer: Kirill Müller kirill@cynkra.com (ORCID) Authors: Gábor Csárdi csardi.gabor@gmail.com (ORCID) Tamás Nepusz ntamas@gmail.com (ORCID) Vincent Traag (ORCID) Szabolcs Horvát szhorvat@gmail.com (ORCID) Fabio Zanini fabio.zanini@unsw.edu.au (ORCID) Daniel Noom contributors: Maëlle Salmon [contributor] Michael Antonov [contributor] Chan Zuckerberg Initiative [funder]","code":""},{"path":"https://r.igraph.org/reference/add.edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Add edges to a graph — add.edges","title":"Add edges to a graph — add.edges","text":"add.edges() renamed add_edges() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/add.edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add edges to a graph — add.edges","text":"","code":"add.edges(graph, edges, ..., attr = list())"},{"path":"https://r.igraph.org/reference/add.edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add edges to a graph — add.edges","text":"graph input graph edges edges add, vertex sequence even number vertices. ... Additional arguments, must named, added edge attributes, newly added edges. See also details . attr named list, elements added edge attributes, newly added edges. See also details .","code":""},{"path":"https://r.igraph.org/reference/add.vertex.shape.html","id":null,"dir":"Reference","previous_headings":"","what":"Various vertex shapes when plotting igraph graphs — add.vertex.shape","title":"Various vertex shapes when plotting igraph graphs — add.vertex.shape","text":"add.vertex.shape() renamed add_shape() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/add.vertex.shape.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Various vertex shapes when plotting igraph graphs — add.vertex.shape","text":"","code":"add.vertex.shape( shape, clip = shape_noclip, plot = shape_noplot, parameters = list() )"},{"path":"https://r.igraph.org/reference/add.vertex.shape.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Various vertex shapes when plotting igraph graphs — add.vertex.shape","text":"shape Character scalar, name vertex shape. NULL shapes(), names defined vertex shapes returned. clip R function object, clipping function. plot R function object, plotting function. parameters Named list, additional plot/vertex/edge parameters. element named define new parameters, elements define default values. Vertex parameters prefix ‘vertex.’, edge parameters prefix ‘edge.’. general plotting parameters prefix ‘plot.’. See Details .","code":""},{"path":"https://r.igraph.org/reference/add.vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Add vertices to a graph — add.vertices","title":"Add vertices to a graph — add.vertices","text":"add.vertices() renamed add_vertices() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/add.vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add vertices to a graph — add.vertices","text":"","code":"add.vertices(graph, nv, ..., attr = list())"},{"path":"https://r.igraph.org/reference/add.vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add vertices to a graph — add.vertices","text":"graph input graph. nv number vertices add. ... Additional arguments, must named, added vertex attributes, newly added vertices. See also details . attr named list, elements added vertex attributes, newly added vertices. See also details .","code":""},{"path":"https://r.igraph.org/reference/add_edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Add edges to a graph — add_edges","title":"Add edges to a graph — add_edges","text":"new edges given vertex sequence, e.g. internal numeric vertex ids, vertex names. first edge points edges[1] edges[2], second edges[3] edges[4], etc.","code":""},{"path":"https://r.igraph.org/reference/add_edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add edges to a graph — add_edges","text":"","code":"add_edges(graph, edges, ..., attr = list())"},{"path":"https://r.igraph.org/reference/add_edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add edges to a graph — add_edges","text":"graph input graph edges edges add, vertex sequence even number vertices. ... Additional arguments, must named, added edge attributes, newly added edges. See also details . attr named list, elements added edge attributes, newly added edges. See also details .","code":""},{"path":"https://r.igraph.org/reference/add_edges.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add edges to a graph — add_edges","text":"graph, edges (attributes) added.","code":""},{"path":"https://r.igraph.org/reference/add_edges.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add edges to a graph — add_edges","text":"attributes supplied, present graph, values original edges graph set NA.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/add_edges.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add edges to a graph — add_edges","text":"","code":"g <- make_empty_graph(n = 5) %>% add_edges(c( 1, 2, 2, 3, 3, 4, 4, 5 )) %>% set_edge_attr(\"color\", value = \"red\") %>% add_edges(c(5, 1), color = \"green\") E(g)[[]] #> + 5/5 edges from c8ebe4c: #> tail head tid hid color #> 1 1 2 1 2 red #> 2 2 3 2 3 red #> 3 3 4 3 4 red #> 4 4 5 4 5 red #> 5 5 1 5 1 green plot(g)"},{"path":"https://r.igraph.org/reference/add_layout_.html","id":null,"dir":"Reference","previous_headings":"","what":"Add layout to graph — add_layout_","title":"Add layout to graph — add_layout_","text":"Add layout graph","code":""},{"path":"https://r.igraph.org/reference/add_layout_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add layout to graph — add_layout_","text":"","code":"add_layout_(graph, ..., overwrite = TRUE)"},{"path":"https://r.igraph.org/reference/add_layout_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add layout to graph — add_layout_","text":"graph input graph. ... Additional arguments passed layout_(). overwrite Whether overwrite layout graph, already one.","code":""},{"path":"https://r.igraph.org/reference/add_layout_.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add layout to graph — add_layout_","text":"input graph, layout added.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/add_layout_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add layout to graph — add_layout_","text":"","code":"(make_star(11) + make_star(11)) %>% add_layout_(as_star(), component_wise()) %>% plot()"},{"path":"https://r.igraph.org/reference/add_vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Add vertices to a graph — add_vertices","title":"Add vertices to a graph — add_vertices","text":"attributes supplied, present graph, values original vertices graph set NA.","code":""},{"path":"https://r.igraph.org/reference/add_vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add vertices to a graph — add_vertices","text":"","code":"add_vertices(graph, nv, ..., attr = list())"},{"path":"https://r.igraph.org/reference/add_vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add vertices to a graph — add_vertices","text":"graph input graph. nv number vertices add. ... Additional arguments, must named, added vertex attributes, newly added vertices. See also details . attr named list, elements added vertex attributes, newly added vertices. See also details .","code":""},{"path":"https://r.igraph.org/reference/add_vertices.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add vertices to a graph — add_vertices","text":"graph, vertices (attributes) added.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/add_vertices.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add vertices to a graph — add_vertices","text":"","code":"g <- make_empty_graph() %>% add_vertices(3, color = \"red\") %>% add_vertices(2, color = \"green\") %>% add_edges(c( 1, 2, 2, 3, 3, 4, 4, 5 )) g #> IGRAPH 74bf614 D--- 5 4 -- #> + attr: color (v/c) #> + edges from 74bf614: #> [1] 1->2 2->3 3->4 4->5 V(g)[[]] #> + 5/5 vertices, from 74bf614: #> color #> 1 red #> 2 red #> 3 red #> 4 green #> 5 green plot(g)"},{"path":"https://r.igraph.org/reference/adjacent.triangles.html","id":null,"dir":"Reference","previous_headings":"","what":"Find triangles in graphs — adjacent.triangles","title":"Find triangles in graphs — adjacent.triangles","text":"adjacent.triangles() renamed count_triangles() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/adjacent.triangles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find triangles in graphs — adjacent.triangles","text":"","code":"adjacent.triangles(graph, vids = V(graph))"},{"path":"https://r.igraph.org/reference/adjacent.triangles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find triangles in graphs — adjacent.triangles","text":"graph input graph. might directed, edge directions ignored. vids vertices query, default. might vector numeric ids, character vector symbolic vertex names named graphs.","code":""},{"path":"https://r.igraph.org/reference/adjacent_vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Adjacent vertices of multiple vertices in a graph — adjacent_vertices","title":"Adjacent vertices of multiple vertices in a graph — adjacent_vertices","text":"function similar neighbors(), queries adjacent vertices multiple vertices .","code":""},{"path":"https://r.igraph.org/reference/adjacent_vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adjacent vertices of multiple vertices in a graph — adjacent_vertices","text":"","code":"adjacent_vertices(graph, v, mode = c(\"out\", \"in\", \"all\", \"total\"))"},{"path":"https://r.igraph.org/reference/adjacent_vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adjacent vertices of multiple vertices in a graph — adjacent_vertices","text":"graph Input graph. v vertices query. mode Whether query outgoing (‘’), incoming (‘’) edges, types (‘’). ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/adjacent_vertices.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adjacent vertices of multiple vertices in a graph — adjacent_vertices","text":"list vertex sequences.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/adjacent_vertices.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Adjacent vertices of multiple vertices in a graph — adjacent_vertices","text":"","code":"g <- make_graph(\"Zachary\") adjacent_vertices(g, c(1, 34)) #> [[1]] #> + 16/34 vertices, from d174130: #> [1] 2 3 4 5 6 7 8 9 11 12 13 14 18 20 22 32 #> #> [[2]] #> + 17/34 vertices, from d174130: #> [1] 9 10 14 15 16 19 20 21 23 24 27 28 29 30 31 32 33 #>"},{"path":"https://r.igraph.org/reference/aging.ba.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate an evolving random graph with preferential attachment and aging — aging.ba.game","title":"Generate an evolving random graph with preferential attachment and aging — aging.ba.game","text":"aging.ba.game() renamed sample_pa_age() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/aging.ba.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate an evolving random graph with preferential attachment and aging — aging.ba.game","text":"","code":"aging.ba.game( n, pa.exp, aging.exp, m = NULL, aging.bin = 300, out.dist = NULL, out.seq = NULL, out.pref = FALSE, directed = TRUE, zero.deg.appeal = 1, zero.age.appeal = 0, deg.coef = 1, age.coef = 1, time.window = NULL )"},{"path":"https://r.igraph.org/reference/aging.ba.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate an evolving random graph with preferential attachment and aging — aging.ba.game","text":"n number vertices graph. pa.exp preferential attachment exponent, see details . aging.exp exponent aging, usually non-positive number, see details . m number edges new vertex creates (except first vertex). argument used .dist .seq arguments NULL. aging.bin number bins use measuring age vertices, see details . .dist discrete distribution generate number edges add time step .seq NULL. See details . .seq number edges add time step, vector containing many elements number vertices. See details . .pref Logical constant, whether include edges initiated vertex basis preferential attachment. See details . directed Logical constant, whether generate directed graph. See details . zero.deg.appeal degree-dependent part ‘attractiveness’ vertices adjacent edges. See also details . zero.age.appeal age-dependent part ‘attrativeness’ vertices age zero. usually zero, see details . deg.coef coefficient degree-dependent ‘attractiveness’. See details . age.coef coefficient age-dependent part ‘attractiveness’. See details . time.window Integer constant, NULL adjacent added last time.windows time steps counted basis preferential attachment. See also details .","code":""},{"path":"https://r.igraph.org/reference/aging.barabasi.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate an evolving random graph with preferential attachment and aging — aging.barabasi.game","title":"Generate an evolving random graph with preferential attachment and aging — aging.barabasi.game","text":"aging.barabasi.game() renamed sample_pa_age() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/aging.barabasi.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate an evolving random graph with preferential attachment and aging — aging.barabasi.game","text":"","code":"aging.barabasi.game( n, pa.exp, aging.exp, m = NULL, aging.bin = 300, out.dist = NULL, out.seq = NULL, out.pref = FALSE, directed = TRUE, zero.deg.appeal = 1, zero.age.appeal = 0, deg.coef = 1, age.coef = 1, time.window = NULL )"},{"path":"https://r.igraph.org/reference/aging.barabasi.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate an evolving random graph with preferential attachment and aging — aging.barabasi.game","text":"n number vertices graph. pa.exp preferential attachment exponent, see details . aging.exp exponent aging, usually non-positive number, see details . m number edges new vertex creates (except first vertex). argument used .dist .seq arguments NULL. aging.bin number bins use measuring age vertices, see details . .dist discrete distribution generate number edges add time step .seq NULL. See details . .seq number edges add time step, vector containing many elements number vertices. See details . .pref Logical constant, whether include edges initiated vertex basis preferential attachment. See details . directed Logical constant, whether generate directed graph. See details . zero.deg.appeal degree-dependent part ‘attractiveness’ vertices adjacent edges. See also details . zero.age.appeal age-dependent part ‘attrativeness’ vertices age zero. usually zero, see details . deg.coef coefficient degree-dependent ‘attractiveness’. See details . age.coef coefficient age-dependent part ‘attractiveness’. See details . time.window Integer constant, NULL adjacent added last time.windows time steps counted basis preferential attachment. See also details .","code":""},{"path":"https://r.igraph.org/reference/aging.prefatt.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate an evolving random graph with preferential attachment and aging — aging.prefatt.game","title":"Generate an evolving random graph with preferential attachment and aging — aging.prefatt.game","text":"aging.prefatt.game() renamed sample_pa_age() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/aging.prefatt.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate an evolving random graph with preferential attachment and aging — aging.prefatt.game","text":"","code":"aging.prefatt.game( n, pa.exp, aging.exp, m = NULL, aging.bin = 300, out.dist = NULL, out.seq = NULL, out.pref = FALSE, directed = TRUE, zero.deg.appeal = 1, zero.age.appeal = 0, deg.coef = 1, age.coef = 1, time.window = NULL )"},{"path":"https://r.igraph.org/reference/aging.prefatt.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate an evolving random graph with preferential attachment and aging — aging.prefatt.game","text":"n number vertices graph. pa.exp preferential attachment exponent, see details . aging.exp exponent aging, usually non-positive number, see details . m number edges new vertex creates (except first vertex). argument used .dist .seq arguments NULL. aging.bin number bins use measuring age vertices, see details . .dist discrete distribution generate number edges add time step .seq NULL. See details . .seq number edges add time step, vector containing many elements number vertices. See details . .pref Logical constant, whether include edges initiated vertex basis preferential attachment. See details . directed Logical constant, whether generate directed graph. See details . zero.deg.appeal degree-dependent part ‘attractiveness’ vertices adjacent edges. See also details . zero.age.appeal age-dependent part ‘attrativeness’ vertices age zero. usually zero, see details . deg.coef coefficient degree-dependent ‘attractiveness’. See details . age.coef coefficient age-dependent part ‘attractiveness’. See details . time.window Integer constant, NULL adjacent added last time.windows time steps counted basis preferential attachment. See also details .","code":""},{"path":"https://r.igraph.org/reference/all_simple_paths.html","id":null,"dir":"Reference","previous_headings":"","what":"List all simple paths from one source — all_simple_paths","title":"List all simple paths from one source — all_simple_paths","text":"function lists simple paths one source vertex another vertex vertices. path simple vertices visits visited .","code":""},{"path":"https://r.igraph.org/reference/all_simple_paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all simple paths from one source — all_simple_paths","text":"","code":"all_simple_paths( graph, from, to = V(graph), mode = c(\"out\", \"in\", \"all\", \"total\"), cutoff = -1 )"},{"path":"https://r.igraph.org/reference/all_simple_paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List all simple paths from one source — all_simple_paths","text":"graph input graph. source vertex. target vertex vertices. Defaults vertices. mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, corresponding undirected graph used, .e. directed paths searched. argument ignored undirected graphs. cutoff Maximum length path considered. negative, paths lengths considered.","code":""},{"path":"https://r.igraph.org/reference/all_simple_paths.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List all simple paths from one source — all_simple_paths","text":"list integer vectors, integer vector path source vertex one target vertices. path given vertex ids.","code":""},{"path":"https://r.igraph.org/reference/all_simple_paths.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List all simple paths from one source — all_simple_paths","text":"Note potentially exponentially many paths two vertices graph, may run memory using function, graph lattice-like. function currently ignored multiple loop edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/all_simple_paths.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List all simple paths from one source — all_simple_paths","text":"","code":"g <- make_ring(10) all_simple_paths(g, 1, 5) #> [[1]] #> + 5/10 vertices, from f93ae85: #> [1] 1 2 3 4 5 #> #> [[2]] #> + 7/10 vertices, from f93ae85: #> [1] 1 10 9 8 7 6 5 #> all_simple_paths(g, 1, c(3, 5)) #> [[1]] #> + 3/10 vertices, from f93ae85: #> [1] 1 2 3 #> #> [[2]] #> + 5/10 vertices, from f93ae85: #> [1] 1 2 3 4 5 #> #> [[3]] #> + 7/10 vertices, from f93ae85: #> [1] 1 10 9 8 7 6 5 #> #> [[4]] #> + 9/10 vertices, from f93ae85: #> [1] 1 10 9 8 7 6 5 4 3 #>"},{"path":"https://r.igraph.org/reference/alpha.centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Bonacich alpha centrality scores of network positions — alpha.centrality","title":"Find Bonacich alpha centrality scores of network positions — alpha.centrality","text":"alpha.centrality() renamed alpha_centrality() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/alpha.centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Bonacich alpha centrality scores of network positions — alpha.centrality","text":"","code":"alpha.centrality( graph, nodes = V(graph), alpha = 1, loops = FALSE, exo = 1, weights = NULL, tol = 1e-07, sparse = TRUE )"},{"path":"https://r.igraph.org/reference/alpha.centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Bonacich alpha centrality scores of network positions — alpha.centrality","text":"graph input graph, can directed undirected. undirected graphs, edges treated reciprocal directed ones. nodes Vertex sequence, vertices alpha centrality values returned. (technical reasons calculated vertices, anyway.) alpha Parameter specifying relative importance endogenous versus exogenous factors determination centrality. See details . loops Whether eliminate loop edges graph calculation. exo exogenous factors, cases either constant – factor every node, vector giving factor every vertex. Note long vectors truncated short vectors replicated match number vertices. weights character scalar gives name edge attribute use adjacency matrix. NULL, ‘weight’ edge attribute graph used, one. Otherwise, NA, calculation uses standard adjacency matrix. tol Tolerance near-singularities matrix inversion, see solve(). sparse Logical scalar, whether use sparse matrices calculation. ‘Matrix’ package required sparse matrix support","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"alpha_centrality() calculates alpha centrality () vertices graph.","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"","code":"alpha_centrality( graph, nodes = V(graph), alpha = 1, loops = FALSE, exo = 1, weights = NULL, tol = 1e-07, sparse = TRUE )"},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"graph input graph, can directed undirected. undirected graphs, edges treated reciprocal directed ones. nodes Vertex sequence, vertices alpha centrality values returned. (technical reasons calculated vertices, anyway.) alpha Parameter specifying relative importance endogenous versus exogenous factors determination centrality. See details . loops Whether eliminate loop edges graph calculation. exo exogenous factors, cases either constant – factor every node, vector giving factor every vertex. Note long vectors truncated short vectors replicated match number vertices. weights character scalar gives name edge attribute use adjacency matrix. NULL, ‘weight’ edge attribute graph used, one. Otherwise, NA, calculation uses standard adjacency matrix. tol Tolerance near-singularities matrix inversion, see solve(). sparse Logical scalar, whether use sparse matrices calculation. ‘Matrix’ package required sparse matrix support","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"numeric vector contaning centrality scores selected vertices.","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"alpha centrality measure can considered generalization eigenvector centrality directed graphs. proposed Bonacich 2001 (see reference ). alpha centrality vertices graph defined solution following matrix equation: $$x=\\alpha ^T x+e,$$ \\(\\) (necessarily symmetric) adjacency matrix graph, \\(e\\) vector exogenous sources status vertices \\(\\alpha\\) relative importance endogenous versus exogenous factors.","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"Singular adjacency matrices cause problems algorithm, routine may fail certain cases.","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"Bonacich, P. Lloyd, P. (2001). “Eigenvector-like measures centrality asymmetric relations” Social Networks, 23, 191-201.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/alpha_centrality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find Bonacich alpha centrality scores of network positions — alpha_centrality","text":"","code":"# The examples from Bonacich's paper g.1 <- make_graph(c(1, 3, 2, 3, 3, 4, 4, 5)) g.2 <- make_graph(c(2, 1, 3, 1, 4, 1, 5, 1)) g.3 <- make_graph(c(1, 2, 2, 3, 3, 4, 4, 1, 5, 1)) alpha_centrality(g.1) #> [1] 1 1 3 4 5 alpha_centrality(g.2) #> [1] 5 1 1 1 1 alpha_centrality(g.3, alpha = 0.5) #> [1] 2.533333 2.266667 2.133333 2.066667 1.000000"},{"path":"https://r.igraph.org/reference/are.connected.html","id":null,"dir":"Reference","previous_headings":"","what":"Are two vertices adjacent? — are.connected","title":"Are two vertices adjacent? — are.connected","text":".connected() renamed are_adjacent() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/are.connected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are two vertices adjacent? — are.connected","text":"","code":"are.connected(graph, v1, v2)"},{"path":"https://r.igraph.org/reference/are.connected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are two vertices adjacent? — are.connected","text":"graph graph. v1 first vertex, tail directed graphs. v2 second vertex, head directed graphs.","code":""},{"path":"https://r.igraph.org/reference/are_adjacent.html","id":null,"dir":"Reference","previous_headings":"","what":"Are two vertices adjacent? — are_adjacent","title":"Are two vertices adjacent? — are_adjacent","text":"order vertices matters directed graphs, existence directed (v1, v2) edge queried.","code":""},{"path":"https://r.igraph.org/reference/are_adjacent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are two vertices adjacent? — are_adjacent","text":"","code":"are_adjacent(graph, v1, v2)"},{"path":"https://r.igraph.org/reference/are_adjacent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are two vertices adjacent? — are_adjacent","text":"graph graph. v1 first vertex, tail directed graphs. v2 second vertex, head directed graphs.","code":""},{"path":"https://r.igraph.org/reference/are_adjacent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Are two vertices adjacent? — are_adjacent","text":"logical scalar, TRUE edge (v1, v2) exists graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/are_adjacent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Are two vertices adjacent? — are_adjacent","text":"","code":"ug <- make_ring(10) ug #> IGRAPH 8ac9fa2 U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from 8ac9fa2: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 are_adjacent(ug, 1, 2) #> [1] TRUE are_adjacent(ug, 2, 1) #> [1] TRUE dg <- make_ring(10, directed = TRUE) dg #> IGRAPH bf0c774 D--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from bf0c774: #> [1] 1-> 2 2-> 3 3-> 4 4-> 5 5-> 6 6-> 7 7-> 8 8-> 9 9->10 10-> 1 are_adjacent(ug, 1, 2) #> [1] TRUE are_adjacent(ug, 2, 1) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/arpack.html","id":null,"dir":"Reference","previous_headings":"","what":"ARPACK eigenvector calculation — arpack_defaults","title":"ARPACK eigenvector calculation — arpack_defaults","text":"Interface ARPACK library calculating eigenvectors sparse matrices","code":""},{"path":"https://r.igraph.org/reference/arpack.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARPACK eigenvector calculation — arpack_defaults","text":"","code":"arpack_defaults() arpack( func, extra = NULL, sym = FALSE, options = arpack_defaults(), env = parent.frame(), complex = !sym )"},{"path":"https://r.igraph.org/reference/arpack.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARPACK eigenvector calculation — arpack_defaults","text":"func function perform matrix-vector multiplication. ARPACK requires perform user. function gets vector \\(x\\) first argument, return \\(Ax\\), \\(\\) “input matrix”. (input matrix never given explicitly.) second argument extra. extra Extra argument supply func. sym Logical scalar, whether input matrix symmetric. Always supply TRUE , since can speed computation. options Options ARPACK, named list overwrite default option values. See details . env environment func evaluated. complex Whether convert eigenvectors returned ARPACK R complex vectors. default done symmetric problems (real eigenvectors/values), non-symmetric ones. non-symmetric problem, sure results real, supply FALSE .","code":""},{"path":"https://r.igraph.org/reference/arpack.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARPACK eigenvector calculation — arpack_defaults","text":"named list following members: values Numeric vector, desired eigenvalues. vectors Numeric matrix, desired eigenvectors columns. complex=TRUE (default non-symmetric problems), matrix complex. options named list supplied options information performed calculation, including ARPACK exit code. See details .","code":""},{"path":"https://r.igraph.org/reference/arpack.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARPACK eigenvector calculation — arpack_defaults","text":"ARPACK library solving large scale eigenvalue problems. package designed compute eigenvalues corresponding eigenvectors general \\(n\\) \\(n\\) matrix \\(\\). appropriate large sparse structured matrices \\(\\) structured means matrix-vector product w <- Av requires order \\(n\\) rather usual order \\(n^2\\) floating point operations. function interface ARPACK. igraph contain ARPACK routines, ones dealing symmetric non-symmetric eigenvalue problems using double precision real numbers. eigenvalue calculation ARPACK (simplest case) involves calculation \\(Av\\) product \\(\\) matrix work \\(v\\) arbitrary vector. function supplied fun argument expected perform product. product can done efficiently, e.g. matrix sparse, arpack() usually able calculate eigenvalues quickly. options argument specifies kind calculation perform. list following members, correspond directly ARPACK parameters. input following fields: bmat Character constant, possible values: ‘’, standard eigenvalue problem, \\(Ax=\\lambda x\\); ‘G’, generalized eigenvalue problem, \\(Ax=\\lambda B x\\). Currently ‘’ supported. n Numeric scalar. dimension eigenproblem. need set call arpack() directly. (.e. needed eigen_centrality(), page_rank(), etc.) Specify eigenvalues/vectors compute, character constant exactly two characters. Possible values symmetric input matrices: \"LA\" Compute nev largest (algebraic) eigenvalues. \"SA\" Compute nev smallest (algebraic) eigenvalues. \"LM\" Compute nev largest (magnitude) eigenvalues. \"SM\" Compute nev smallest (magnitude) eigenvalues. \"\" Compute nev eigenvalues, half end spectrum. nev odd, compute one high end low end. Possible values non-symmetric input matrices: \"LM\" Compute nev eigenvalues largest magnitude. \"SM\" Compute nev eigenvalues smallest magnitude. \"LR\" Compute nev eigenvalues largest real part. \"SR\" Compute nev eigenvalues smallest real part. \"LI\" Compute nev eigenvalues largest imaginary part. \"SI\" Compute nev eigenvalues smallest imaginary part. parameter sometimes overwritten various functions, e.g. page_rank() always sets ‘LM’. nev Numeric scalar. number eigenvalues computed. tol Numeric scalar. Stopping criterion: relative accuracy Ritz value considered acceptable error less tol times estimated value. set zero machine precision used. ncv Number Lanczos vectors generated. ldv Numberic scalar. set zero current implementation. ishift Either zero one. zero shifts provided user via reverse communication. one exact shifts respect reduced tridiagonal matrix \\(T\\). Please always set one. maxiter Maximum number Arnoldi update iterations allowed. nb Blocksize used recurrence. Please always leave default value, one. mode type eigenproblem solved. Possible values input matrix symmetric: 1 \\(Ax=\\lambda x\\), \\(\\) symmetric. 2 \\(Ax=\\lambda Mx\\), \\(\\) symmetric, \\(M\\) symmetric positive definite. 3 \\(Kx=\\lambda Mx\\), \\(K\\) symmetric, \\(M\\) symmetric positive semi-definite. 4 \\(Kx=\\lambda KGx\\), \\(K\\) symmetric positive semi-definite, \\(KG\\) symmetric indefinite. 5 \\(Ax=\\lambda Mx\\), \\(\\) symmetric, \\(M\\) symmetric positive semi-definite. (Cayley transformed mode.) Please note mode==1 tested values might work properly. Possible values input matrix symmetric: 1 \\(Ax=\\lambda x\\). 2 \\(Ax=\\lambda Mx\\), \\(M\\) symmetric positive definite. 3 \\(Ax=\\lambda Mx\\), \\(M\\) symmetric semi-definite. 4 \\(Ax=\\lambda Mx\\), \\(M\\) symmetric semi-definite. Please note mode==1 tested values might work properly. start used currently. Later used set starting vector. sigma used currently. sigmai use currently. Please see ARPACK documentation additional details.","code":""},{"path":"https://r.igraph.org/reference/arpack.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"ARPACK eigenvector calculation — arpack_defaults","text":"D.C. Sorensen, Implicit Application Polynomial Filters k-Step Arnoldi Method. SIAM J. Matr. Anal. Apps., 13 (1992), pp 357-385. R.B. Lehoucq, Analysis Implementation Implicitly Restarted Arnoldi Iteration. Rice University Technical Report TR95-13, Department Computational Applied Mathematics. B.N. Parlett & Y. Saad, Complex Shift Invert Strategies Real Matrices. Linear Algebra Applications, vol 88/89, pp 575-595, (1987).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/arpack.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"ARPACK eigenvector calculation — arpack_defaults","text":"Rich Lehoucq, Kristi Maschhoff, Danny Sorensen, Chao Yang ARPACK, Gabor Csardi csardi.gabor@gmail.com R interface.","code":""},{"path":"https://r.igraph.org/reference/arpack.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARPACK eigenvector calculation — arpack_defaults","text":"","code":"# Identity matrix f <- function(x, extra = NULL) x arpack(f, options = list(n = 10, nev = 2, ncv = 4), sym = TRUE) #> $values #> [1] 1 1 #> #> $vectors #> [,1] [,2] #> [1,] -0.3726998 0.112735486 #> [2,] 0.1195827 0.041517695 #> [3,] 0.4062664 -0.421475667 #> [4,] -0.4452969 -0.709645619 #> [5,] 0.3098338 0.177672414 #> [6,] 0.1653131 -0.125415897 #> [7,] -0.1946057 0.482549613 #> [8,] 0.4619532 0.006154024 #> [9,] -0.2346540 0.121470373 #> [10,] 0.2319333 -0.096874464 #> #> $options #> $options$bmat #> [1] \"I\" #> #> $options$n #> [1] 10 #> #> $options$which #> [1] \"XX\" #> #> $options$nev #> [1] 2 #> #> $options$tol #> [1] 0 #> #> $options$ncv #> [1] 4 #> #> $options$ldv #> [1] 0 #> #> $options$ishift #> [1] 1 #> #> $options$maxiter #> [1] 3000 #> #> $options$nb #> [1] 1 #> #> $options$mode #> [1] 1 #> #> $options$start #> [1] 0 #> #> $options$sigma #> [1] 0 #> #> $options$sigmai #> [1] 0 #> #> $options$info #> [1] 0 #> #> $options$iter #> [1] 1 #> #> $options$nconv #> [1] 2 #> #> $options$numop #> [1] 4 #> #> $options$numopb #> [1] 0 #> #> $options$numreo #> [1] 4 #> #> # Graph laplacian of a star graph (undirected), n>=2 # Note that this is a linear operation f <- function(x, extra = NULL) { y <- x y[1] <- (length(x) - 1) * x[1] - sum(x[-1]) for (i in 2:length(x)) { y[i] <- x[i] - x[1] } y } arpack(f, options = list(n = 10, nev = 1, ncv = 3), sym = TRUE) #> $values #> [1] 10 #> #> $vectors #> [1] -0.9486833 0.1054093 0.1054093 0.1054093 0.1054093 0.1054093 #> [7] 0.1054093 0.1054093 0.1054093 0.1054093 #> #> $options #> $options$bmat #> [1] \"I\" #> #> $options$n #> [1] 10 #> #> $options$which #> [1] \"XX\" #> #> $options$nev #> [1] 1 #> #> $options$tol #> [1] 0 #> #> $options$ncv #> [1] 3 #> #> $options$ldv #> [1] 0 #> #> $options$ishift #> [1] 1 #> #> $options$maxiter #> [1] 3000 #> #> $options$nb #> [1] 1 #> #> $options$mode #> [1] 1 #> #> $options$start #> [1] 0 #> #> $options$sigma #> [1] 0 #> #> $options$sigmai #> [1] 0 #> #> $options$info #> [1] 0 #> #> $options$iter #> [1] 1 #> #> $options$nconv #> [1] 1 #> #> $options$numop #> [1] 3 #> #> $options$numopb #> [1] 0 #> #> $options$numreo #> [1] 3 #> #> # double check eigen(laplacian_matrix(make_star(10, mode = \"undirected\"))) #> eigen() decomposition #> $values #> [1] 1.000000e+01 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 #> [6] 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 3.552714e-15 #> #> $vectors #> [,1] [,2] [,3] [,4] [,5] #> [1,] 0.9486833 0.000000e+00 0.000000000 0.000000e+00 0.000000e+00 #> [2,] -0.1054093 9.251859e-18 0.000000000 -9.251859e-18 1.850372e-17 #> [3,] -0.1054093 -9.316303e-02 0.079217213 -5.526928e-02 -5.860537e-02 #> [4,] -0.1054093 9.295069e-01 0.020878444 -5.681485e-02 2.420873e-02 #> [5,] -0.1054093 -1.772059e-01 -0.072634120 -1.521102e-01 1.990548e-02 #> [6,] -0.1054093 -1.772059e-01 0.014765896 3.109043e-01 1.456789e-01 #> [7,] -0.1054093 -1.246177e-01 0.008447773 6.043444e-02 8.117572e-01 #> [8,] -0.1054093 -6.376015e-02 -0.659513765 4.360577e-01 -3.697494e-01 #> [9,] -0.1054093 -1.772059e-01 -0.124196522 -7.876367e-01 -2.016864e-01 #> [10,] -0.1054093 -1.163484e-01 0.733035080 2.444346e-01 -3.715091e-01 #> [,6] [,7] [,8] [,9] [,10] #> [1,] 0.000000e+00 0.00000000 0.0000000 0.000000e+00 -0.3162278 #> [2,] 9.251859e-18 0.00000000 0.9428090 6.476301e-17 -0.3162278 #> [3,] 3.877514e-02 0.07938499 -0.1178511 9.196470e-01 -0.3162278 #> [4,] 2.633343e-02 0.05841931 -0.1178511 -5.158318e-02 -0.3162278 #> [5,] 8.820081e-01 -0.01683834 -0.1178511 -1.912244e-01 -0.3162278 #> [6,] -1.516578e-01 0.81604496 -0.1178511 -1.912244e-01 -0.3162278 #> [7,] -1.927091e-01 -0.39623153 -0.1178511 -5.158318e-02 -0.3162278 #> [8,] -1.420878e-01 -0.29370999 -0.1178511 -5.158318e-02 -0.3162278 #> [9,] -3.596255e-01 0.03503021 -0.1178511 -1.912244e-01 -0.3162278 #> [10,] -1.010365e-01 -0.28209962 -0.1178511 -1.912244e-01 -0.3162278 #> ## First three eigenvalues of the adjacency matrix of a graph ## We need the 'Matrix' package for this if (require(Matrix)) { set.seed(42) g <- sample_gnp(1000, 5 / 1000) M <- as_adj(g, sparse = TRUE) f2 <- function(x, extra = NULL) { cat(\".\") as.vector(M %*% x) } baev <- arpack(f2, sym = TRUE, options = list( n = vcount(g), nev = 3, ncv = 8, which = \"LM\", maxiter = 2000 )) } #> Loading required package: Matrix #> ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."},{"path":"https://r.igraph.org/reference/articulation.points.html","id":null,"dir":"Reference","previous_headings":"","what":"Articulation points and bridges of a graph — articulation.points","title":"Articulation points and bridges of a graph — articulation.points","text":"articulation.points() renamed articulation_points() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/articulation.points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Articulation points and bridges of a graph — articulation.points","text":"","code":"articulation.points(graph)"},{"path":"https://r.igraph.org/reference/articulation.points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Articulation points and bridges of a graph — articulation.points","text":"graph input graph. treated undirected graph, even directed.","code":""},{"path":"https://r.igraph.org/reference/articulation_points.html","id":null,"dir":"Reference","previous_headings":"","what":"Articulation points and bridges of a graph — articulation_points","title":"Articulation points and bridges of a graph — articulation_points","text":"articulation_points() finds articulation points (cut vertices)","code":""},{"path":"https://r.igraph.org/reference/articulation_points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Articulation points and bridges of a graph — articulation_points","text":"","code":"articulation_points(graph) bridges(graph)"},{"path":"https://r.igraph.org/reference/articulation_points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Articulation points and bridges of a graph — articulation_points","text":"graph input graph. treated undirected graph, even directed.","code":""},{"path":"https://r.igraph.org/reference/articulation_points.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Articulation points and bridges of a graph — articulation_points","text":"articulation_points(), numeric vector giving vertex IDs articulation points input graph. bridges(), numeric vector giving edge IDs bridges input graph.","code":""},{"path":"https://r.igraph.org/reference/articulation_points.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Articulation points and bridges of a graph — articulation_points","text":"Articulation points cut vertices vertices whose removal increases number connected components graph. Similarly, bridges cut-edges edges whose removal increases number connected components graph. original graph connected, removal single articulation point single bridge makes disconnected. graph contains articulation points, vertex connectivity least two.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/articulation_points.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Articulation points and bridges of a graph — articulation_points","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/articulation_points.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Articulation points and bridges of a graph — articulation_points","text":"","code":"g <- disjoint_union(make_full_graph(5), make_full_graph(5)) clu <- components(g)$membership g <- add_edges(g, c(match(1, clu), match(2, clu))) articulation_points(g) #> + 2/10 vertices, from e77a28c: #> [1] 6 1 g <- make_graph(\"krackhardt_kite\") bridges(g) #> + 2/18 edges from 7c351cc: #> [1] 9--10 8-- 9"},{"path":"https://r.igraph.org/reference/as.directed.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert between directed and undirected graphs — as.directed","title":"Convert between directed and undirected graphs — as.directed","text":".directed() converts undirected graph directed, .undirected() opposite, converts directed graph undirected.","code":""},{"path":"https://r.igraph.org/reference/as.directed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert between directed and undirected graphs — as.directed","text":"","code":"as.directed(graph, mode = c(\"mutual\", \"arbitrary\", \"random\", \"acyclic\")) as.undirected( graph, mode = c(\"collapse\", \"each\", \"mutual\"), edge.attr.comb = igraph_opt(\"edge.attr.comb\") )"},{"path":"https://r.igraph.org/reference/as.directed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert between directed and undirected graphs — as.directed","text":"graph graph convert. mode Character constant, defines conversion algorithm. .directed() can mutual arbitrary. .undirected() can , collapse mutual. See details . edge.attr.comb Specifies edge attributes, mode=\"collapse\" mode=\"mutual\". cases many edges might mapped single one new graph, attributes combined. Please see attribute.combination() details .","code":""},{"path":"https://r.igraph.org/reference/as.directed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert between directed and undirected graphs — as.directed","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/as.directed.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert between directed and undirected graphs — as.directed","text":"Conversion algorithms .directed(): \"arbitrary\" number edges graph stays , arbitrarily directed edge created undirected edge, direction edge deterministic (.e. always points way call function multiple times). \"mutual\" Two directed edges created undirected edge, one direction. \"random\" number edges graph stays , randomly directed edge created undirected edge. get different results call function multiple times graph. \"acyclic\" number edges graph stays , directed edge created undirected edge resulting graph guaranteed acyclic. achieved ensuring edges always point lower index vertex higher index. Note graph may include cycles length 1 original graph contained loop edges. Conversion algorithms .undirected(): \"\" number edges remains constant, undirected edge created directed one, version might create graphs multiple edges. \"collapse\" One undirected edge created pair vertices connected least one directed edge, multiple edges created. \"mutual\" One undirected edge created pair mutual edges. Non-mutual edges ignored. mode might create multiple edges one mutual edge pairs pair vertices.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as.directed.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert between directed and undirected graphs — as.directed","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/as.directed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert between directed and undirected graphs — as.directed","text":"","code":"g <- make_ring(10) as.directed(g, \"mutual\") #> IGRAPH 9e2d637 D--- 10 20 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from 9e2d637: #> [1] 1-> 2 2-> 3 3-> 4 4-> 5 5-> 6 6-> 7 7-> 8 8-> 9 9->10 1->10 #> [11] 2-> 1 3-> 2 4-> 3 5-> 4 6-> 5 7-> 6 8-> 7 9-> 8 10-> 9 10-> 1 g2 <- make_star(10) as.undirected(g) #> IGRAPH 4324f37 U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from 4324f37: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 # Combining edge attributes g3 <- make_ring(10, directed = TRUE, mutual = TRUE) E(g3)$weight <- seq_len(ecount(g3)) ug3 <- as.undirected(g3) print(ug3, e = TRUE) #> IGRAPH ac3b98a U-W- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), weight (e/n) #> + edges from ac3b98a: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 1--10 9--10 if (FALSE) { # rlang::is_interactive() x11(width = 10, height = 5) layout(rbind(1:2)) plot(g3, layout = layout_in_circle, edge.label = E(g3)$weight) plot(ug3, layout = layout_in_circle, edge.label = E(ug3)$weight) } g4 <- make_graph(c( 1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 4, 6, 7, 7, 6, 7, 8, 7, 8, 8, 7, 8, 9, 8, 9, 9, 8, 9, 8, 9, 9, 10, 10, 10, 10 )) E(g4)$weight <- seq_len(ecount(g4)) ug4 <- as.undirected(g4, mode = \"mutual\", edge.attr.comb = list(weight = length) ) print(ug4, e = TRUE) #> IGRAPH 8539215 U-W- 10 7 -- #> + attr: weight (e/n) #> + edges from 8539215: #> [1] 6-- 7 7-- 8 8-- 9 8-- 9 9-- 9 10--10 10--10"},{"path":"https://r.igraph.org/reference/as.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Conversion to igraph — as.igraph","title":"Conversion to igraph — as.igraph","text":"functions convert various objects igraph graphs.","code":""},{"path":"https://r.igraph.org/reference/as.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Conversion to igraph — as.igraph","text":"","code":"as.igraph(x, ...)"},{"path":"https://r.igraph.org/reference/as.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Conversion to igraph — as.igraph","text":"x object convert. ... Additional arguments. None currently.","code":""},{"path":"https://r.igraph.org/reference/as.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Conversion to igraph — as.igraph","text":"functions return igraph graph.","code":""},{"path":"https://r.igraph.org/reference/as.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Conversion to igraph — as.igraph","text":"can use .igraph() convert various objects igraph graphs. Right now following objects supported: codeigraphHRG objects created fit_hrg() consensus_tree() functions.","code":""},{"path":"https://r.igraph.org/reference/as.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Conversion to igraph — as.igraph","text":"Gabor Csardi csardi.gabor@gmail.com.","code":""},{"path":"https://r.igraph.org/reference/as.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Conversion to igraph — as.igraph","text":"","code":"g <- make_full_graph(5) + make_full_graph(5) hrg <- fit_hrg(g) as.igraph(hrg) #> IGRAPH 168d780 DN-- 19 18 -- Fitted HRG #> + attr: name (g/c), name (v/c), prob (v/n) #> + edges from 168d780 (vertex names): #> [1] g1->g4 g2->1 g3->2 g4->g6 g5->8 g6->g2 g7->g9 g8->6 g9->7 g1->g8 #> [11] g2->g3 g3->4 g4->3 g5->9 g6->5 g7->g5 g8->g7 g9->10"},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"Get adjacency edgelist representation network stored igraph object.","code":""},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"","code":"# S3 method for class 'igraph' as.matrix(x, matrix.type = c(\"adjacency\", \"edgelist\"), ...)"},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"x object class igraph, network matrix.type character, type matrix return, currently \"adjacency\" \"edgelist\" supported ... arguments /methods","code":""},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"Depending value matrix.type either square adjacency matrix two-column numeric matrix representing edgelist.","code":""},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"matrix.type \"edgelist\", two-column numeric edge list matrix returned. value attrname ignored. matrix.type \"adjacency\", square adjacency matrix returned. adjacency matrices, can use attr keyword argument use values edge attribute matrix cells. See documentation as_adjacency_matrix details. arguments passed ... passed either as_adjacency_matrix() as_edgelist() depending value matrix.type.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"Michal Bojanowski, originally intergraph package","code":""},{"path":"https://r.igraph.org/reference/as.matrix.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert igraph objects to adjacency or edge list matrices — as.matrix.igraph","text":"","code":"g <- make_graph(\"zachary\") as.matrix(g, \"adjacency\") #> 34 x 34 sparse Matrix of class \"dgCMatrix\" #> #> [1,] . 1 1 1 1 1 1 1 1 . 1 1 1 1 . . . 1 . 1 . 1 . . . . . . . . . 1 . . #> [2,] 1 . 1 1 . . . 1 . . . . . 1 . . . 1 . 1 . 1 . . . . . . . . 1 . . . #> [3,] 1 1 . 1 . . . 1 1 1 . . . 1 . . . . . . . . . . . . . 1 1 . . . 1 . #> [4,] 1 1 1 . . . . 1 . . . . 1 1 . . . . . . . . . . . . . . . . . . . . #> [5,] 1 . . . . . 1 . . . 1 . . . . . . . . . . . . . . . . . . . . . . . #> [6,] 1 . . . . . 1 . . . 1 . . . . . 1 . . . . . . . . . . . . . . . . . #> [7,] 1 . . . 1 1 . . . . . . . . . . 1 . . . . . . . . . . . . . . . . . #> [8,] 1 1 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [9,] 1 . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . 1 1 #> [10,] . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 #> [11,] 1 . . . 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [12,] 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [13,] 1 . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [14,] 1 1 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 #> [15,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 #> [16,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 #> [17,] . . . . . 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [18,] 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [19,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 #> [20,] 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 #> [21,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 #> [22,] 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #> [23,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 #> [24,] . . . . . . . . . . . . . . . . . . . . . . . . . 1 . 1 . 1 . . 1 1 #> [25,] . . . . . . . . . . . . . . . . . . . . . . . . . 1 . 1 . . . 1 . . #> [26,] . . . . . . . . . . . . . . . . . . . . . . . 1 1 . . . . . . 1 . . #> [27,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . . . 1 #> [28,] . . 1 . . . . . . . . . . . . . . . . . . . . 1 1 . . . . . . . . 1 #> [29,] . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . 1 #> [30,] . . . . . . . . . . . . . . . . . . . . . . . 1 . . 1 . . . . . 1 1 #> [31,] . 1 . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . 1 1 #> [32,] 1 . . . . . . . . . . . . . . . . . . . . . . . 1 1 . . 1 . . . 1 1 #> [33,] . . 1 . . . . . 1 . . . . . 1 1 . . 1 . 1 . 1 1 . . . . . 1 1 1 . 1 #> [34,] . . . . . . . . 1 1 . . . 1 1 1 . . 1 1 1 . 1 1 . . 1 1 1 1 1 1 1 . as.matrix(g, \"edgelist\") #> [,1] [,2] #> [1,] 1 2 #> [2,] 1 3 #> [3,] 1 4 #> [4,] 1 5 #> [5,] 1 6 #> [6,] 1 7 #> [7,] 1 8 #> [8,] 1 9 #> [9,] 1 11 #> [10,] 1 12 #> [11,] 1 13 #> [12,] 1 14 #> [13,] 1 18 #> [14,] 1 20 #> [15,] 1 22 #> [16,] 1 32 #> [17,] 2 3 #> [18,] 2 4 #> [19,] 2 8 #> [20,] 2 14 #> [21,] 2 18 #> [22,] 2 20 #> [23,] 2 22 #> [24,] 2 31 #> [25,] 3 4 #> [26,] 3 8 #> [27,] 3 28 #> [28,] 3 29 #> [29,] 3 33 #> [30,] 3 10 #> [31,] 3 9 #> [32,] 3 14 #> [33,] 4 8 #> [34,] 4 13 #> [35,] 4 14 #> [36,] 5 7 #> [37,] 5 11 #> [38,] 6 7 #> [39,] 6 11 #> [40,] 6 17 #> [41,] 7 17 #> [42,] 9 31 #> [43,] 9 33 #> [44,] 9 34 #> [45,] 10 34 #> [46,] 14 34 #> [47,] 15 33 #> [48,] 15 34 #> [49,] 16 33 #> [50,] 16 34 #> [51,] 19 33 #> [52,] 19 34 #> [53,] 20 34 #> [54,] 21 33 #> [55,] 21 34 #> [56,] 23 33 #> [57,] 23 34 #> [58,] 24 26 #> [59,] 24 28 #> [60,] 24 33 #> [61,] 24 34 #> [62,] 24 30 #> [63,] 25 26 #> [64,] 25 28 #> [65,] 25 32 #> [66,] 26 32 #> [67,] 27 30 #> [68,] 27 34 #> [69,] 28 34 #> [70,] 29 32 #> [71,] 29 34 #> [72,] 30 33 #> [73,] 30 34 #> [74,] 31 33 #> [75,] 31 34 #> [76,] 32 33 #> [77,] 32 34 #> [78,] 33 34 # use edge attribute \"weight\" E(g)$weight <- rep(1:10, length.out = ecount(g)) as.matrix(g, \"adjacency\", sparse = FALSE, attr = \"weight\") #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 0 1 2 3 4 5 6 7 8 0 9 10 1 #> [2,] 1 0 7 8 0 0 0 9 0 0 0 0 0 #> [3,] 2 7 0 5 0 0 0 6 1 10 0 0 0 #> [4,] 3 8 5 0 0 0 0 3 0 0 0 0 4 #> [5,] 4 0 0 0 0 0 6 0 0 0 7 0 0 #> [6,] 5 0 0 0 0 0 8 0 0 0 9 0 0 #> [7,] 6 0 0 0 6 8 0 0 0 0 0 0 0 #> [8,] 7 9 6 3 0 0 0 0 0 0 0 0 0 #> [9,] 8 0 1 0 0 0 0 0 0 0 0 0 0 #> [10,] 0 0 10 0 0 0 0 0 0 0 0 0 0 #> [11,] 9 0 0 0 7 9 0 0 0 0 0 0 0 #> [12,] 10 0 0 0 0 0 0 0 0 0 0 0 0 #> [13,] 1 0 0 4 0 0 0 0 0 0 0 0 0 #> [14,] 2 10 2 5 0 0 0 0 0 0 0 0 0 #> [15,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [16,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [17,] 0 0 0 0 0 10 1 0 0 0 0 0 0 #> [18,] 3 1 0 0 0 0 0 0 0 0 0 0 0 #> [19,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [20,] 4 2 0 0 0 0 0 0 0 0 0 0 0 #> [21,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [22,] 5 3 0 0 0 0 0 0 0 0 0 0 0 #> [23,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [24,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [25,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [26,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [27,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [28,] 0 0 7 0 0 0 0 0 0 0 0 0 0 #> [29,] 0 0 8 0 0 0 0 0 0 0 0 0 0 #> [30,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [31,] 0 4 0 0 0 0 0 0 2 0 0 0 0 #> [32,] 6 0 0 0 0 0 0 0 0 0 0 0 0 #> [33,] 0 0 9 0 0 0 0 0 3 0 0 0 0 #> [34,] 0 0 0 0 0 0 0 0 4 5 0 0 0 #> [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] #> [1,] 2 0 0 0 3 0 4 0 5 0 0 0 #> [2,] 10 0 0 0 1 0 2 0 3 0 0 0 #> [3,] 2 0 0 0 0 0 0 0 0 0 0 0 #> [4,] 5 0 0 0 0 0 0 0 0 0 0 0 #> [5,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [6,] 0 0 0 10 0 0 0 0 0 0 0 0 #> [7,] 0 0 0 1 0 0 0 0 0 0 0 0 #> [8,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [9,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [10,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [11,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [12,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [13,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [14,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [15,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [16,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [17,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [18,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [19,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [20,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [21,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [22,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [23,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [24,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [25,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [26,] 0 0 0 0 0 0 0 0 0 0 8 3 #> [27,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [28,] 0 0 0 0 0 0 0 0 0 0 9 4 #> [29,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [30,] 0 0 0 0 0 0 0 0 0 0 2 0 #> [31,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [32,] 0 0 0 0 0 0 0 0 0 0 0 5 #> [33,] 0 7 9 0 0 1 0 4 0 6 10 0 #> [34,] 6 8 10 0 0 2 3 5 0 7 1 0 #> [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] #> [1,] 0 0 0 0 0 0 6 0 0 #> [2,] 0 0 0 0 0 4 0 0 0 #> [3,] 0 0 7 8 0 0 0 9 0 #> [4,] 0 0 0 0 0 0 0 0 0 #> [5,] 0 0 0 0 0 0 0 0 0 #> [6,] 0 0 0 0 0 0 0 0 0 #> [7,] 0 0 0 0 0 0 0 0 0 #> [8,] 0 0 0 0 0 0 0 0 0 #> [9,] 0 0 0 0 0 2 0 3 4 #> [10,] 0 0 0 0 0 0 0 0 5 #> [11,] 0 0 0 0 0 0 0 0 0 #> [12,] 0 0 0 0 0 0 0 0 0 #> [13,] 0 0 0 0 0 0 0 0 0 #> [14,] 0 0 0 0 0 0 0 0 6 #> [15,] 0 0 0 0 0 0 0 7 8 #> [16,] 0 0 0 0 0 0 0 9 10 #> [17,] 0 0 0 0 0 0 0 0 0 #> [18,] 0 0 0 0 0 0 0 0 0 #> [19,] 0 0 0 0 0 0 0 1 2 #> [20,] 0 0 0 0 0 0 0 0 3 #> [21,] 0 0 0 0 0 0 0 4 5 #> [22,] 0 0 0 0 0 0 0 0 0 #> [23,] 0 0 0 0 0 0 0 6 7 #> [24,] 8 0 9 0 2 0 0 10 1 #> [25,] 3 0 4 0 0 0 5 0 0 #> [26,] 0 0 0 0 0 0 6 0 0 #> [27,] 0 0 0 0 7 0 0 0 8 #> [28,] 0 0 0 0 0 0 0 0 9 #> [29,] 0 0 0 0 0 0 10 0 1 #> [30,] 0 7 0 0 0 0 0 2 3 #> [31,] 0 0 0 0 0 0 0 4 5 #> [32,] 6 0 0 10 0 0 0 6 7 #> [33,] 0 0 0 0 2 4 6 0 8 #> [34,] 0 8 9 1 3 5 7 8 0"},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Adjacency lists — as_adj_list","title":"Adjacency lists — as_adj_list","text":"Create adjacency lists graph, either adjacent edges neighboring vertices","code":""},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adjacency lists — as_adj_list","text":"","code":"as_adj_list( graph, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = c(\"twice\", \"once\", \"ignore\"), multiple = TRUE ) as_adj_edge_list( graph, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = c(\"twice\", \"once\", \"ignore\") )"},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adjacency lists — as_adj_list","text":"graph input graph. mode Character scalar, gives kind adjacent edges/vertices include lists. ‘’ outgoing edges/vertices, ‘’ incoming edges/vertices, ‘’ . argument ignored undirected graphs. loops Character scalar, one \"ignore\" (omit loops), \"twice\" (include loop edges twice) \"\" (include ). \"twice\" allowed directed graphs replaced \"\". multiple Logical scalar, set FALSE use one representative set parallel edges.","code":""},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adjacency lists — as_adj_list","text":"list igraph.vs list numeric vectors depending value igraph_opt(\"return.vs.es\"), see details performance characteristics.","code":""},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Adjacency lists — as_adj_list","text":"as_adj_list() returns list numeric vectors, include ids neighbor vertices (according mode argument) vertices. as_adj_edge_list() returns list numeric vectors, include ids adjacent edges (according mode argument) vertices. igraph_opt(\"return.vs.es\") true (default), numeric vectors adjacency lists coerced igraph.vs, can expensive operation large graphs.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Adjacency lists — as_adj_list","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/as_adj_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Adjacency lists — as_adj_list","text":"","code":"g <- make_ring(10) as_adj_list(g) #> [[1]] #> + 2/10 vertices, from f9d51e1: #> [1] 2 10 #> #> [[2]] #> + 2/10 vertices, from f9d51e1: #> [1] 1 3 #> #> [[3]] #> + 2/10 vertices, from f9d51e1: #> [1] 2 4 #> #> [[4]] #> + 2/10 vertices, from f9d51e1: #> [1] 3 5 #> #> [[5]] #> + 2/10 vertices, from f9d51e1: #> [1] 4 6 #> #> [[6]] #> + 2/10 vertices, from f9d51e1: #> [1] 5 7 #> #> [[7]] #> + 2/10 vertices, from f9d51e1: #> [1] 6 8 #> #> [[8]] #> + 2/10 vertices, from f9d51e1: #> [1] 7 9 #> #> [[9]] #> + 2/10 vertices, from f9d51e1: #> [1] 8 10 #> #> [[10]] #> + 2/10 vertices, from f9d51e1: #> [1] 1 9 #> as_adj_edge_list(g) #> [[1]] #> + 2/10 edges from f9d51e1: #> [1] 1-- 2 1--10 #> #> [[2]] #> + 2/10 edges from f9d51e1: #> [1] 1--2 2--3 #> #> [[3]] #> + 2/10 edges from f9d51e1: #> [1] 2--3 3--4 #> #> [[4]] #> + 2/10 edges from f9d51e1: #> [1] 3--4 4--5 #> #> [[5]] #> + 2/10 edges from f9d51e1: #> [1] 4--5 5--6 #> #> [[6]] #> + 2/10 edges from f9d51e1: #> [1] 5--6 6--7 #> #> [[7]] #> + 2/10 edges from f9d51e1: #> [1] 6--7 7--8 #> #> [[8]] #> + 2/10 edges from f9d51e1: #> [1] 7--8 8--9 #> #> [[9]] #> + 2/10 edges from f9d51e1: #> [1] 8-- 9 9--10 #> #> [[10]] #> + 2/10 edges from f9d51e1: #> [1] 1--10 9--10 #>"},{"path":"https://r.igraph.org/reference/as_adjacency_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a graph to an adjacency matrix — as_adjacency_matrix","title":"Convert a graph to an adjacency matrix — as_adjacency_matrix","text":"Sometimes useful work standard representation graph, like adjacency matrix.","code":""},{"path":"https://r.igraph.org/reference/as_adjacency_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a graph to an adjacency matrix — as_adjacency_matrix","text":"","code":"as_adjacency_matrix( graph, type = c(\"both\", \"upper\", \"lower\"), attr = NULL, edges = FALSE, names = TRUE, sparse = igraph_opt(\"sparsematrices\") ) as_adj( graph, type = c(\"both\", \"upper\", \"lower\"), attr = NULL, edges = FALSE, names = TRUE, sparse = igraph_opt(\"sparsematrices\") )"},{"path":"https://r.igraph.org/reference/as_adjacency_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a graph to an adjacency matrix — as_adjacency_matrix","text":"graph graph convert. type Gives create adjacency matrix undirected graphs. ignored directed graphs. Possible values: upper: upper right triangle matrix used, lower: lower left triangle matrix used. : whole matrix used, symmetric matrix returned. attr Either NULL character string giving edge attribute name. NULL traditional adjacency matrix returned. NULL values given edge attribute included adjacency matrix. graph multiple edges, edge attribute arbitrarily chosen edge (multiple edges) included. argument ignored edges TRUE. Note works certain attribute types. sparse argumen TRUE, attribute must either logical numeric. sparse argument FALSE, character also allowed. reason difference Matrix package support character sparse matrices yet. edges Logical scalar, whether return edge ids matrix. non-existant edges zero returned. names Logical constant, whether assign row column names matrix. assigned name vertex attribute present graph. sparse Logical scalar, whether create sparse matrix. ‘Matrix’ package must installed creating sparse matrices.","code":""},{"path":"https://r.igraph.org/reference/as_adjacency_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a graph to an adjacency matrix — as_adjacency_matrix","text":"vcount(graph) vcount(graph) (usually) numeric matrix.","code":""},{"path":"https://r.igraph.org/reference/as_adjacency_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert a graph to an adjacency matrix — as_adjacency_matrix","text":"as_adjacency_matrix() returns adjacency matrix graph, regular matrix sparse FALSE, sparse matrix, defined ‘Matrix’ package, sparse TRUE.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_adjacency_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a graph to an adjacency matrix — as_adjacency_matrix","text":"","code":"g <- sample_gnp(10, 2 / 10) as_adjacency_matrix(g) #> 10 x 10 sparse Matrix of class \"dgCMatrix\" #> #> [1,] . . . . . . . 1 1 . #> [2,] . . 1 . . . . . . . #> [3,] . 1 . . . . 1 1 . . #> [4,] . . . . . . . . . . #> [5,] . . . . . 1 . 1 . . #> [6,] . . . . 1 . 1 . . . #> [7,] . . 1 . . 1 . . . 1 #> [8,] 1 . 1 . 1 . . . . 1 #> [9,] 1 . . . . . . . . 1 #> [10,] . . . . . . 1 1 1 . V(g)$name <- letters[1:vcount(g)] as_adjacency_matrix(g) #> 10 x 10 sparse Matrix of class \"dgCMatrix\" #> [[ suppressing 10 column names ‘a’, ‘b’, ‘c’ ... ]] #> #> a . . . . . . . 1 1 . #> b . . 1 . . . . . . . #> c . 1 . . . . 1 1 . . #> d . . . . . . . . . . #> e . . . . . 1 . 1 . . #> f . . . . 1 . 1 . . . #> g . . 1 . . 1 . . . 1 #> h 1 . 1 . 1 . . . . 1 #> i 1 . . . . . . . . 1 #> j . . . . . . 1 1 1 . E(g)$weight <- runif(ecount(g)) as_adjacency_matrix(g, attr = \"weight\") #> 10 x 10 sparse Matrix of class \"dgCMatrix\" #> [[ suppressing 10 column names ‘a’, ‘b’, ‘c’ ... ]] #> #> a . . . . . . . 0.125495772 #> b . . 0.9695255 . . . . . #> c . 0.9695255 . . . . 0.14713281 0.514231354 #> d . . . . . . . . #> e . . . . . 0.00332753 . 0.003141262 #> f . . . . 0.003327530 . 0.60409122 . #> g . . 0.1471328 . . 0.60409122 . . #> h 0.1254958 . 0.5142314 . 0.003141262 . . . #> i 0.1863833 . . . . . . . #> j . . . . . . 0.02471268 0.330121691 #> #> a 0.186383283 . #> b . . #> c . . #> d . . #> e . . #> f . . #> g . 0.024712676 #> h . 0.330121691 #> i . 0.009822477 #> j 0.009822477 ."},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"function can return sparse dense bipartite adjacency matrix bipartite network. bipartite adjacency matrix \\(n\\) times \\(m\\) matrix, \\(n\\) \\(m\\) number vertices two kinds.","code":""},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"","code":"as_biadjacency_matrix( graph, types = NULL, attr = NULL, names = TRUE, sparse = FALSE )"},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"graph input graph. direction edges ignored directed graphs. types optional vertex type vector use instead type vertex attribute. must supply argument graph type vertex attribute. attr Either NULL character string giving edge attribute name. NULL, traditional bipartite adjacency matrix returned. NULL values given edge attribute included bipartite adjacency matrix. graph multiple edges, edge attribute arbitrarily chosen edge (multiple edges) included. names Logical scalar, TRUE vertices graph named (.e. graph vertex attribute called name), vertex names added result row column names. Otherwise ids vertices used row column names. sparse Logical scalar, TRUE sparse matrix created, need Matrix package .","code":""},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"sparse dense matrix.","code":""},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"Bipartite graphs type vertex attribute igraph, boolean FALSE vertices first kind TRUE vertices second kind. authors refer bipartite adjacency matrix \"bipartite incidence matrix\". igraph 1.6.0 later use naming avoid confusion edge-vertex incidence matrix.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/as_biadjacency_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bipartite adjacency matrix of a bipartite graph — as_biadjacency_matrix","text":"","code":"g <- make_bipartite_graph(c(0, 1, 0, 1, 0, 0), c(1, 2, 2, 3, 3, 4)) as_biadjacency_matrix(g) #> 2 4 #> 1 1 0 #> 3 1 1 #> 5 0 0 #> 6 0 0"},{"path":"https://r.igraph.org/reference/as_edgelist.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a graph to an edge list — as_edgelist","title":"Convert a graph to an edge list — as_edgelist","text":"Sometimes useful work standard representation graph, like edge list.","code":""},{"path":"https://r.igraph.org/reference/as_edgelist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a graph to an edge list — as_edgelist","text":"","code":"as_edgelist(graph, names = TRUE)"},{"path":"https://r.igraph.org/reference/as_edgelist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a graph to an edge list — as_edgelist","text":"graph graph convert. names Whether return character matrix containing vertex names (.e. name vertex attribute) exist numeric vertex ids.","code":""},{"path":"https://r.igraph.org/reference/as_edgelist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a graph to an edge list — as_edgelist","text":"ecount(graph) 2 numeric matrix.","code":""},{"path":"https://r.igraph.org/reference/as_edgelist.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert a graph to an edge list — as_edgelist","text":"as_edgelist() returns list edges graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_edgelist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a graph to an edge list — as_edgelist","text":"","code":"g <- sample_gnp(10, 2 / 10) as_edgelist(g) #> [,1] [,2] #> [1,] 1 6 #> [2,] 3 7 #> [3,] 3 8 #> [4,] 1 9 #> [5,] 8 9 #> [6,] 3 10 #> [7,] 6 10 #> [8,] 8 10 V(g)$name <- LETTERS[seq_len(gorder(g))] as_edgelist(g) #> [,1] [,2] #> [1,] \"A\" \"F\" #> [2,] \"C\" \"G\" #> [3,] \"C\" \"H\" #> [4,] \"A\" \"I\" #> [5,] \"H\" \"I\" #> [6,] \"C\" \"J\" #> [7,] \"F\" \"J\" #> [8,] \"H\" \"J\""},{"path":"https://r.igraph.org/reference/as_graphnel.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","title":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","text":"graphNEL class defined graph package, another way represent graphs. functions provided convert igraph graphNEL objects.","code":""},{"path":"https://r.igraph.org/reference/as_graphnel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","text":"","code":"as_graphnel(graph)"},{"path":"https://r.igraph.org/reference/as_graphnel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","text":"graph igraph graph object.","code":""},{"path":"https://r.igraph.org/reference/as_graphnel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","text":"as_graphnel() returns graphNEL graph object.","code":""},{"path":"https://r.igraph.org/reference/as_graphnel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","text":"as_graphnel() converts igraph graph graphNEL graph. converts graph/vertex/edge attributes. igraph graph vertex attribute ‘name’, used assign vertex names graphNEL graph. Otherwise numeric igraph vertex ids used purpose.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_graphnel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert igraph graphs to graphNEL objects from the graph package — as_graphnel","text":"","code":"## Undirected if (FALSE) { # \\dontrun{ g <- make_ring(10) V(g)$name <- letters[1:10] GNEL <- as_graphnel(g) g2 <- graph_from_graphnel(GNEL) g2 ## Directed g3 <- make_star(10, mode = \"in\") V(g3)$name <- letters[1:10] GNEL2 <- as_graphnel(g3) g4 <- graph_from_graphnel(GNEL2) g4 } # }"},{"path":"https://r.igraph.org/reference/as_ids.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a vertex or edge sequence to an ordinary vector — as_ids","title":"Convert a vertex or edge sequence to an ordinary vector — as_ids","text":"Convert vertex edge sequence ordinary vector","code":""},{"path":"https://r.igraph.org/reference/as_ids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a vertex or edge sequence to an ordinary vector — as_ids","text":"","code":"as_ids(seq) # S3 method for class 'igraph.vs' as_ids(seq) # S3 method for class 'igraph.es' as_ids(seq)"},{"path":"https://r.igraph.org/reference/as_ids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a vertex or edge sequence to an ordinary vector — as_ids","text":"seq vertex edge sequence.","code":""},{"path":"https://r.igraph.org/reference/as_ids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a vertex or edge sequence to an ordinary vector — as_ids","text":"character numeric vector, see details .","code":""},{"path":"https://r.igraph.org/reference/as_ids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert a vertex or edge sequence to an ordinary vector — as_ids","text":"graphs without names, numeric vector returned, containing internal numeric vertex edge ids. graphs names, vertex sequences, vertex names returned character vector. graphs names edge sequences, character vector returned, ‘bar’ notation: |b means edge vertex vertex b.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_ids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a vertex or edge sequence to an ordinary vector — as_ids","text":"","code":"g <- make_ring(10) as_ids(V(g)) #> [1] 1 2 3 4 5 6 7 8 9 10 as_ids(E(g)) #> [1] 1 2 3 4 5 6 7 8 9 10 V(g)$name <- letters[1:10] as_ids(V(g)) #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" as_ids(E(g)) #> [1] \"a|b\" \"b|c\" \"c|d\" \"d|e\" \"e|f\" \"f|g\" \"g|h\" \"h|i\" \"i|j\" \"a|j\""},{"path":"https://r.igraph.org/reference/as_incidence_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"As incidence matrix — as_incidence_matrix","title":"As incidence matrix — as_incidence_matrix","text":"as_incidence_matrix() renamed as_biadjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/as_incidence_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"As incidence matrix — as_incidence_matrix","text":"","code":"as_incidence_matrix(...)"},{"path":"https://r.igraph.org/reference/as_incidence_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"As incidence matrix — as_incidence_matrix","text":"authors refer bipartite adjacency matrix \"bipartite incidence matrix\". igraph 1.6.0 later use naming avoid confusion edge-vertex incidence matrix.","code":""},{"path":"https://r.igraph.org/reference/as_long_data_frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a graph to a long data frame — as_long_data_frame","title":"Convert a graph to a long data frame — as_long_data_frame","text":"long data frame contains metadata vertices edges graph. contains one row edge, metadata edge incident vertices included row. names columns contain metadata incident vertices prefixed from_ to_. first two columns always named contain numeric ids incident vertices. rows listed order numeric vertex ids.","code":""},{"path":"https://r.igraph.org/reference/as_long_data_frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a graph to a long data frame — as_long_data_frame","text":"","code":"as_long_data_frame(graph)"},{"path":"https://r.igraph.org/reference/as_long_data_frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a graph to a long data frame — as_long_data_frame","text":"graph Input graph","code":""},{"path":"https://r.igraph.org/reference/as_long_data_frame.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a graph to a long data frame — as_long_data_frame","text":"long data frame.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_long_data_frame.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a graph to a long data frame — as_long_data_frame","text":"","code":"g <- make_( ring(10), with_vertex_(name = letters[1:10], color = \"red\"), with_edge_(weight = 1:10, color = \"green\") ) as_long_data_frame(g) #> from to weight color from_name from_color to_name to_color #> 1 1 2 1 green a red b red #> 2 2 3 2 green b red c red #> 3 3 4 3 green c red d red #> 4 4 5 4 green d red e red #> 5 5 6 5 green e red f red #> 6 6 7 6 green f red g red #> 7 7 8 7 green g red h red #> 8 8 9 8 green h red i red #> 9 9 10 9 green i red j red #> 10 1 10 10 green a red j red"},{"path":"https://r.igraph.org/reference/as_membership.html","id":null,"dir":"Reference","previous_headings":"","what":"Declare a numeric vector as a membership vector — as_membership","title":"Declare a numeric vector as a membership vector — as_membership","text":"useful want use functions defined membership vectors, membership vector come igraph clustering method.","code":""},{"path":"https://r.igraph.org/reference/as_membership.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Declare a numeric vector as a membership vector — as_membership","text":"","code":"as_membership(x)"},{"path":"https://r.igraph.org/reference/as_membership.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Declare a numeric vector as a membership vector — as_membership","text":"x input vector.","code":""},{"path":"https://r.igraph.org/reference/as_membership.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Declare a numeric vector as a membership vector — as_membership","text":"input vector, membership class added.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/as_membership.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Declare a numeric vector as a membership vector — as_membership","text":"","code":"## Compare to the correct clustering g <- (make_full_graph(10) + make_full_graph(10)) %>% rewire(each_edge(p = 0.2)) correct <- rep(1:2, each = 10) %>% as_membership() fc <- cluster_fast_greedy(g) compare(correct, fc) #> [1] 0 compare(correct, membership(fc)) #> [1] 0"},{"path":"https://r.igraph.org/reference/as_phylo.html","id":null,"dir":"Reference","previous_headings":"","what":"as_phylo — as_phylo","title":"as_phylo — as_phylo","text":"as_phylo methods renamed .phylo consistency R methods.","code":""},{"path":"https://r.igraph.org/reference/as_phylo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"as_phylo — as_phylo","text":"","code":"as_phylo(x, ...)"},{"path":"https://r.igraph.org/reference/as_phylo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"as_phylo — as_phylo","text":"x object coerced ... arguments passed methods.","code":""},{"path":"https://r.igraph.org/reference/assortativity.degree.html","id":null,"dir":"Reference","previous_headings":"","what":"Assortativity coefficient — assortativity.degree","title":"Assortativity coefficient — assortativity.degree","text":"assortativity.degree() renamed assortativity_degree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/assortativity.degree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assortativity coefficient — assortativity.degree","text":"","code":"assortativity.degree(graph, directed = TRUE)"},{"path":"https://r.igraph.org/reference/assortativity.degree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assortativity coefficient — assortativity.degree","text":"graph input graph, can directed undirected. directed Logical scalar, whether consider edge directions directed graphs. argument ignored undirected graphs. Supply TRUE natural thing, .e. use directed version measure directed graphs undirected version undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":null,"dir":"Reference","previous_headings":"","what":"Assortativity coefficient — assortativity","title":"Assortativity coefficient — assortativity","text":"assortativity coefficient positive similar vertices (based external property) tend connect , negative otherwise.","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assortativity coefficient — assortativity","text":"","code":"assortativity( graph, values, ..., values.in = NULL, directed = TRUE, normalized = TRUE, types1 = NULL, types2 = NULL ) assortativity_nominal(graph, types, directed = TRUE, normalized = TRUE) assortativity_degree(graph, directed = TRUE)"},{"path":"https://r.igraph.org/reference/assortativity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assortativity coefficient — assortativity","text":"graph input graph, can directed undirected. values vertex values, can arbitrary numeric values. ... dots future extensions must empty. values.second value vector use incoming edges calculating assortativity directed graph. Supply NULL want use values outgoing incoming edges. argument ignored (warning) NULL undirected assortativity coefficient calculated. directed Logical scalar, whether consider edge directions directed graphs. argument ignored undirected graphs. Supply TRUE natural thing, .e. use directed version measure directed graphs undirected version undirected graphs. normalized Boolean, whether compute normalized assortativity. non-normalized nominal assortativity identical modularity. non-normalized value-based assortativity simply covariance values two ends edges. types1, types2 Deprecated aliases values values., respectively. types Vector giving vertex types. assumed integer numbers, starting one. Non-integer values converted integers .integer().","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assortativity coefficient — assortativity","text":"single real number.","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Assortativity coefficient — assortativity","text":"assortativity coefficient measures level homophyly graph, based vertex labeling values assigned vertices. coefficient high, means connected vertices tend labels similar assigned values. M.E.J. Newman defined two kinds assortativity coefficients, first one categorical labels vertices. assortativity_nominal() calculates measure. defined $$r=\\frac{\\sum_i e_{ii}-\\sum_i a_i b_i}{1-\\sum_i a_i b_i}$$ \\(e_{ij}\\) fraction edges connecting vertices type \\(\\) \\(j\\), \\(a_i=\\sum_j e_{ij}\\) \\(b_j=\\sum_i e_{ij}\\). second assortativity variant based values assigned vertices. assortativity() calculates measure. defined $$r=\\frac1{\\sigma_q^2}\\sum_{jk} jk(e_{jk}-q_j q_k)$$ undirected graphs (\\(q_i=\\sum_j e_{ij}\\)) $$r=\\frac1{\\sigma_o\\sigma_i}\\sum_{jk}jk(e_{jk}-q_j^o q_k^)$$ directed ones. \\(q_i^o=\\sum_j e_{ij}\\), \\(q_i^=\\sum_j e_{ji}\\), moreover, \\(\\sigma_q\\), \\(\\sigma_o\\) \\(\\sigma_i\\) standard deviations \\(q\\), \\(q^o\\) \\(q^\\), respectively. reason difference directed networks relationship symmetric, possible assign different values outgoing incoming end edges. assortativity_degree() uses vertex degree vertex values calls assortativity(). Undirected graphs effectively treated directed ones -reciprocal edges. Thus, self-loops taken account twice undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Assortativity coefficient — assortativity","text":"M. E. J. Newman: Mixing patterns networks, Phys. Rev. E 67, 026126 (2003) https://arxiv.org/abs/cond-mat/0209450 M. E. J. Newman: Assortative mixing networks, Phys. Rev. Lett. 89, 208701 (2002) https://arxiv.org/abs/cond-mat/0205405","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Assortativity coefficient — assortativity","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/assortativity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Assortativity coefficient — assortativity","text":"","code":"# random network, close to zero assortativity_degree(sample_gnp(10000, 3 / 10000)) #> [1] -0.003901217 # BA model, tends to be dissortative assortativity_degree(sample_pa(10000, m = 4)) #> [1] -0.02572967"},{"path":"https://r.igraph.org/reference/assortativity.nominal.html","id":null,"dir":"Reference","previous_headings":"","what":"Assortativity coefficient — assortativity.nominal","title":"Assortativity coefficient — assortativity.nominal","text":"assortativity.nominal() renamed assortativity_nominal() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/assortativity.nominal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assortativity coefficient — assortativity.nominal","text":"","code":"assortativity.nominal(graph, types, directed = TRUE, normalized = TRUE)"},{"path":"https://r.igraph.org/reference/assortativity.nominal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assortativity coefficient — assortativity.nominal","text":"graph input graph, can directed undirected. types Vector giving vertex types. assumed integer numbers, starting one. Non-integer values converted integers .integer(). directed Logical scalar, whether consider edge directions directed graphs. argument ignored undirected graphs. Supply TRUE natural thing, .e. use directed version measure directed graphs undirected version undirected graphs. normalized Boolean, whether compute normalized assortativity. non-normalized nominal assortativity identical modularity. non-normalized value-based assortativity simply covariance values two ends edges.","code":""},{"path":"https://r.igraph.org/reference/asymmetric.preference.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Trait-based random generation — asymmetric.preference.game","title":"Trait-based random generation — asymmetric.preference.game","text":"asymmetric.preference.game() renamed sample_asym_pref() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/asymmetric.preference.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trait-based random generation — asymmetric.preference.game","text":"","code":"asymmetric.preference.game( nodes, types, type.dist.matrix = matrix(1, types, types), pref.matrix = matrix(1, types, types), loops = FALSE )"},{"path":"https://r.igraph.org/reference/asymmetric.preference.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trait-based random generation — asymmetric.preference.game","text":"nodes number vertices graphs. types number different vertex types. type.dist.matrix joint distribution - -vertex types. pref.matrix square matrix giving preferences vertex types. matrix ‘types’ rows columns. generating undirected graph, must symmetric. loops Logical constant, whether self-loops allowed graph.","code":""},{"path":"https://r.igraph.org/reference/authority.score.html","id":null,"dir":"Reference","previous_headings":"","what":"Kleinberg's hub and authority centrality scores. — authority.score","title":"Kleinberg's hub and authority centrality scores. — authority.score","text":"authority.score() renamed authority_score() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/authority.score.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kleinberg's hub and authority centrality scores. — authority.score","text":"","code":"authority.score( graph, scale = TRUE, weights = NULL, options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/authority.score.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kleinberg's hub and authority centrality scores. — authority.score","text":"graph input graph. scale Logical scalar, whether scale result maximum score one. scaling used result vector unit length Euclidean norm. weights Optional positive weight vector calculating weighted scores. graph weight edge attribute, used default. function interprets edge weights connection strengths. random surfer model, edge larger weight likely selected surfer. options named list, override ARPACK options. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/autocurve.edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Optimal edge curvature when plotting graphs — autocurve.edges","title":"Optimal edge curvature when plotting graphs — autocurve.edges","text":"autocurve.edges() renamed curve_multiple() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/autocurve.edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Optimal edge curvature when plotting graphs — autocurve.edges","text":"","code":"autocurve.edges(graph, start = 0.5)"},{"path":"https://r.igraph.org/reference/autocurve.edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Optimal edge curvature when plotting graphs — autocurve.edges","text":"graph input graph. start curvature two extreme edges. edges curvature -start start, spaced equally.","code":""},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":null,"dir":"Reference","previous_headings":"","what":"Generating set of the automorphism group of a graph — automorphism_group","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"Compute generating set automorphism group graph.","code":""},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"","code":"automorphism_group( graph, colors = NULL, sh = c(\"fm\", \"f\", \"fs\", \"fl\", \"flm\", \"fsm\"), details = FALSE )"},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"graph input graph, treated undirected. colors colors individual vertices graph; vertices color allowed match automorphism. omitted, igraph uses color attribute vertices, , vertex attribute, simply assumes vertices color. Pass NULL explicitly graph color vertex attribute want use . sh splitting heuristics BLISS algorithm. Possible values : ‘f’: first non-singleton cell, ‘fl’: first largest non-singleton cell, ‘fs’: first smallest non-singleton cell, ‘fm’: first maximally non-trivially connected non-singleton cell, ‘flm’: first largest maximally non-trivially connected non-singleton cell, ‘fsm’: first smallest maximally non-trivially connected non-singleton cell. details Specifies whether provide additional details BLISS internals result.","code":""},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"details FALSE, list vertex permutations form generating set automorphism group input graph. details TRUE, named list two members: generators Returns generators info Additional information BLISS internals. See count_automorphisms() details.","code":""},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"automorphism graph permutation vertices brings graph . automorphisms graph form group exists subset group (.e. set permutations) every permutation can expressed combination permutations. permutations called generating set automorphism group. function calculates possible generating set automorphism graph using BLISS algorithm. See also BLISS homepage http://www.tcs.hut.fi/Software/bliss/index.html. calculated generating set necessarily minimal, may depend splitting heuristics used BLISS.","code":""},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"Tommi Junttila Petteri Kaski: Engineering Efficient Canonical Labeling Tool Large Sparse Graphs, Proceedings Ninth Workshop Algorithm Engineering Experiments Fourth Workshop Analytic Algorithms Combinatorics. 2007.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"Tommi Junttila (http://users.ics.aalto.fi/tjunttil/) BLISS, Gabor Csardi csardi.gabor@gmail.com igraph glue code Tamas Nepusz ntamas@gmail.com manual page.","code":""},{"path":"https://r.igraph.org/reference/automorphism_group.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generating set of the automorphism group of a graph — automorphism_group","text":"","code":"## A ring has n*2 automorphisms, and a possible generating set is one that ## \"turns\" the ring by one vertex to the left or right g <- make_ring(10) automorphism_group(g) #> [[1]] #> + 10/10 vertices, from b116893: #> [1] 1 10 9 8 7 6 5 4 3 2 #> #> [[2]] #> + 10/10 vertices, from b116893: #> [1] 2 3 4 5 6 7 8 9 10 1 #>"},{"path":"https://r.igraph.org/reference/automorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of automorphisms — automorphisms","title":"Number of automorphisms — automorphisms","text":"automorphisms() renamed count_automorphisms() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/automorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of automorphisms — automorphisms","text":"","code":"automorphisms( graph, colors = NULL, sh = c(\"fm\", \"f\", \"fs\", \"fl\", \"flm\", \"fsm\") )"},{"path":"https://r.igraph.org/reference/automorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of automorphisms — automorphisms","text":"graph input graph, treated undirected. colors colors individual vertices graph; vertices color allowed match automorphism. omitted, igraph uses color attribute vertices, , vertex attribute, simply assumes vertices color. Pass NULL explicitly graph color vertex attribute want use . sh splitting heuristics BLISS algorithm. Possible values : ‘f’: first non-singleton cell, ‘fl’: first largest non-singleton cell, ‘fs’: first smallest non-singleton cell, ‘fm’: first maximally non-trivially connected non-singleton cell, ‘flm’: first largest maximally non-trivially connected non-singleton cell, ‘fsm’: first smallest maximally non-trivially connected non-singleton cell.","code":""},{"path":"https://r.igraph.org/reference/average.path.length.html","id":null,"dir":"Reference","previous_headings":"","what":"Shortest (directed or undirected) paths between vertices — average.path.length","title":"Shortest (directed or undirected) paths between vertices — average.path.length","text":"average.path.length() renamed mean_distance() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/average.path.length.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shortest (directed or undirected) paths between vertices — average.path.length","text":"","code":"average.path.length( graph, weights = NULL, directed = TRUE, unconnected = TRUE, details = FALSE )"},{"path":"https://r.igraph.org/reference/average.path.length.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shortest (directed or undirected) paths between vertices — average.path.length","text":"graph graph work . weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). directed Whether consider directed paths directed graphs, argument ignored undirected graphs. unconnected graph unconnected (strongly connected directed paths considered). TRUE, lengths existing paths considered averaged; FALSE, length missing paths considered infinite length, making mean distance infinite well. details Whether provide additional details result. Functions accepting argument (like mean_distance()) return additional information like number disconnected vertex pairs result parameter set TRUE.","code":""},{"path":"https://r.igraph.org/reference/ba.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs using preferential attachment — ba.game","title":"Generate random graphs using preferential attachment — ba.game","text":"ba.game() renamed sample_pa() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/ba.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs using preferential attachment — ba.game","text":"","code":"ba.game( n, power = 1, m = NULL, out.dist = NULL, out.seq = NULL, out.pref = FALSE, zero.appeal = 1, directed = TRUE, algorithm = c(\"psumtree\", \"psumtree-multiple\", \"bag\"), start.graph = NULL )"},{"path":"https://r.igraph.org/reference/ba.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs using preferential attachment — ba.game","text":"n Number vertices. power power preferential attachment, default one, .e. linear preferential attachment. m Numeric constant, number edges add time step argument used .dist .seq omitted NULL. .dist Numeric vector, distribution number edges add time step. argument used .seq argument omitted NULL. .seq Numeric vector giving number edges add time step. first element ignored edges added first time step. .pref Logical, true total degree used calculating citation probability, otherwise -degree used. zero.appeal ‘attractiveness’ vertices adjacent edges. See details . directed Whether create directed graph. algorithm algorithm use graph generation. psumtree uses partial prefix-sum tree generate graph, algorithm can handle power zero.appeal values never generates multiple edges. psumtree-multiple also uses partial prefix-sum tree, generation multiple edges allowed. 0.6 version igraph used algorithm power one, zero.appeal one. bag algorithm previously (version 0.6) used power one zero.appeal one well. works putting ids vertices bag (multiset, really), exactly many times (-)degree, plus . required number cited vertices drawn bag, replacement. method might generate multiple edges. works power zero.appeal equal one. start.graph NULL igraph graph. graph, supplied graph used starting graph preferential attachment algorithm. graph least one vertex. graph supplied .seq argument NULL, contain degrees new vertices , ones start.graph.","code":""},{"path":"https://r.igraph.org/reference/barabasi.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs using preferential attachment — barabasi.game","title":"Generate random graphs using preferential attachment — barabasi.game","text":"barabasi.game() renamed sample_pa() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/barabasi.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs using preferential attachment — barabasi.game","text":"","code":"barabasi.game( n, power = 1, m = NULL, out.dist = NULL, out.seq = NULL, out.pref = FALSE, zero.appeal = 1, directed = TRUE, algorithm = c(\"psumtree\", \"psumtree-multiple\", \"bag\"), start.graph = NULL )"},{"path":"https://r.igraph.org/reference/barabasi.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs using preferential attachment — barabasi.game","text":"n Number vertices. power power preferential attachment, default one, .e. linear preferential attachment. m Numeric constant, number edges add time step argument used .dist .seq omitted NULL. .dist Numeric vector, distribution number edges add time step. argument used .seq argument omitted NULL. .seq Numeric vector giving number edges add time step. first element ignored edges added first time step. .pref Logical, true total degree used calculating citation probability, otherwise -degree used. zero.appeal ‘attractiveness’ vertices adjacent edges. See details . directed Whether create directed graph. algorithm algorithm use graph generation. psumtree uses partial prefix-sum tree generate graph, algorithm can handle power zero.appeal values never generates multiple edges. psumtree-multiple also uses partial prefix-sum tree, generation multiple edges allowed. 0.6 version igraph used algorithm power one, zero.appeal one. bag algorithm previously (version 0.6) used power one zero.appeal one well. works putting ids vertices bag (multiset, really), exactly many times (-)degree, plus . required number cited vertices drawn bag, replacement. method might generate multiple edges. works power zero.appeal equal one. start.graph NULL igraph graph. graph, supplied graph used starting graph preferential attachment algorithm. graph least one vertex. graph supplied .seq argument NULL, contain degrees new vertices , ones start.graph.","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex and edge betweenness centrality — betweenness","title":"Vertex and edge betweenness centrality — betweenness","text":"vertex edge betweenness (roughly) defined number geodesics (shortest paths) going vertex edge.","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex and edge betweenness centrality — betweenness","text":"","code":"betweenness( graph, v = V(graph), directed = TRUE, weights = NULL, normalized = FALSE, cutoff = -1 ) edge_betweenness( graph, e = E(graph), directed = TRUE, weights = NULL, cutoff = -1 )"},{"path":"https://r.igraph.org/reference/betweenness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex and edge betweenness centrality — betweenness","text":"graph graph analyze. v vertices vertex betweenness calculated. directed Logical, whether directed paths considered determining shortest paths. weights Optional positive weight vector calculating weighted betweenness. graph weight edge attribute, used default. Weights used calculate weighted shortest paths, interpreted distances. normalized Logical scalar, whether normalize betweenness scores. TRUE, results normalized number ordered unordered vertex pairs directed undirected graphs, respectively. undirected graph, $$B^n=\\frac{2B}{(n-1)(n-2)},$$ \\(B^n\\) normalized, \\(B\\) raw betweenness, \\(n\\) number vertices graph. cutoff maximum path length consider calculating betweenness. zero negative limit. e edges edge betweenness calculated.","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Vertex and edge betweenness centrality — betweenness","text":"numeric vector betweenness score vertex v betweenness(). numeric vector edge betweenness score edge e edge_betweenness().","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Vertex and edge betweenness centrality — betweenness","text":"vertex betweenness vertex v defined $$\\sum_{\\ne j, \\ne v, j\\ne v} g_{ivj}/g_{ij}$$ edge betweenness edge e defined $$\\sum_{\\ne j} g_{iej}/g_{ij}.$$ betweenness() calculates vertex betweenness, edge_betweenness() calculates edge betweenness. \\(g_{ij}\\) total number shortest paths vertices \\(\\) \\(j\\) \\(g_{ivj}\\) number shortest paths pass though vertex \\(v\\). functions allow consider paths length cutoff smaller; can run larger graphs, running time quadratic (cutoff small). cutoff negative (default), function calculates exact betweenness scores. Since igraph 1.6.0, cutoff value zero treated literally, .e. paths length larger zero ignored. calculating betweenness similar algorithm one proposed Brandes (see References) used.","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Vertex and edge betweenness centrality — betweenness","text":"edge_betweenness() might give false values graphs multiple edges.","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Vertex and edge betweenness centrality — betweenness","text":"Freeman, L.C. (1979). Centrality Social Networks : Conceptual Clarification. Social Networks, 1, 215-239. Ulrik Brandes, Faster Algorithm Betweenness Centrality. Journal Mathematical Sociology 25(2):163-177, 2001.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/betweenness.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Vertex and edge betweenness centrality — betweenness","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/betweenness.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Vertex and edge betweenness centrality — betweenness","text":"","code":"g <- sample_gnp(10, 3 / 10) betweenness(g) #> [1] 0 0 0 14 0 6 6 0 0 0 edge_betweenness(g) #> [1] 4 2 7 8 12 1 4 2 7 7"},{"path":"https://r.igraph.org/reference/bfs.html","id":null,"dir":"Reference","previous_headings":"","what":"Breadth-first search — bfs","title":"Breadth-first search — bfs","text":"Breadth-first search algorithm traverse graph. start root vertex spread along every edge “simultaneously”.","code":""},{"path":"https://r.igraph.org/reference/bfs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Breadth-first search — bfs","text":"","code":"bfs( graph, root, mode = c(\"out\", \"in\", \"all\", \"total\"), unreachable = TRUE, restricted = NULL, order = TRUE, rank = FALSE, father = FALSE, pred = FALSE, succ = FALSE, dist = FALSE, callback = NULL, extra = NULL, rho = parent.frame(), neimode )"},{"path":"https://r.igraph.org/reference/bfs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Breadth-first search — bfs","text":"graph input graph. root Numeric vector, usually length one. root vertex, root vertices start search . mode directed graphs specifies type edges follow. ‘’ follows outgoing, ‘’ incoming edges. ‘’ ignores edge directions completely. ‘total’ synonym ‘’. argument ignored undirected graphs. unreachable Logical scalar, whether search visit vertices unreachable given root vertex (vertices). TRUE, additional searches performed vertices visited. restricted NULL (=restriction), vector vertices (ids symbolic names). latter case, search restricted given vertices. order Logical scalar, whether return ordering vertices. rank Logical scalar, whether return rank vertices. father Logical scalar, whether return father vertices. pred Logical scalar, whether return predecessors vertices. succ Logical scalar, whether return successors vertices. dist Logical scalar, whether return distance root search tree. callback NULL, must callback function. called whenever vertex visited. See details . extra Additional argument supply callback function. rho environment callback function evaluated. neimode argument deprecated igraph 1.3.0; use mode instead.","code":""},{"path":"https://r.igraph.org/reference/bfs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Breadth-first search — bfs","text":"named list following entries: root Numeric scalar. root vertex used starting point search. neimode Character scalar. mode argument function call. Note undirected graphs always ‘’, irrespectively supplied value. order Numeric vector. vertex ids, order visited search. rank Numeric vector. rank vertex, zero unreachable vertices. father Numeric vector. father vertex, .e. vertex discovered . pred Numeric vector. previously visited vertex vertex, 0 vertex. succ Numeric vector. next vertex visited current one, 0 vertex. dist Numeric vector, vertex distance root search tree. Unreachable vertices negative distance igraph 1.6.0, used NaN. Note order, rank, father, pred, succ dist might NULL corresponding argument FALSE, .e. calculation requested.","code":""},{"path":"https://r.igraph.org/reference/bfs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Breadth-first search — bfs","text":"callback function must following arguments: graph input graph passed callback function . data named numeric vector, following entries: ‘vid’, vertex just visited, ‘pred’, predecessor (zero first vertex), ‘succ’, successor (zero last vertex), ‘rank’, rank current vertex, ‘dist’, distance root search tree. extra extra argument. callback must return FALSE continue search TRUE terminate . See examples use callback function.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/bfs.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Breadth-first search — bfs","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/bfs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Breadth-first search — bfs","text":"","code":"## Two rings bfs(make_ring(10) %du% make_ring(10), root = 1, \"out\", order = TRUE, rank = TRUE, father = TRUE, pred = TRUE, succ = TRUE, dist = TRUE ) #> $root #> [1] 1 #> #> $mode #> [1] \"out\" #> #> $order #> + 20/20 vertices, from b1b68ad: #> [1] 1 2 10 3 9 4 8 5 7 6 11 12 20 13 19 14 18 15 17 16 #> #> $rank #> [1] 1 2 4 6 8 10 9 7 5 3 11 12 14 16 18 20 19 17 15 13 #> #> $father #> + 20/20 vertices, from b1b68ad: #> [1] NA 1 2 3 4 5 8 9 10 1 NA 11 12 13 14 15 18 19 20 11 #> #> $pred #> + 20/20 vertices, from b1b68ad: #> [1] NA 1 10 9 8 7 5 4 3 2 NA 11 20 19 18 17 15 14 13 12 #> #> $succ #> + 20/20 vertices, from b1b68ad: #> [1] 2 10 9 8 7 NA 6 5 4 3 12 20 19 18 17 NA 16 15 14 13 #> #> $dist #> [1] 0 1 2 3 4 5 4 3 2 1 0 1 2 3 4 5 4 3 2 1 #> #> $neimode #> [1] \"out\" #> ## How to use a callback f <- function(graph, data, extra) { print(data) FALSE } tmp <- bfs(make_ring(10) %du% make_ring(10), root = 1, \"out\", callback = f ) #> vid pred succ rank dist #> 1 0 2 1 0 #> vid pred succ rank dist #> 2 1 10 2 1 #> vid pred succ rank dist #> 10 2 3 3 1 #> vid pred succ rank dist #> 3 10 9 4 2 #> vid pred succ rank dist #> 9 3 4 5 2 #> vid pred succ rank dist #> 4 9 8 6 3 #> vid pred succ rank dist #> 8 4 5 7 3 #> vid pred succ rank dist #> 5 8 7 8 4 #> vid pred succ rank dist #> 7 5 6 9 4 #> vid pred succ rank dist #> 6 7 0 10 5 #> vid pred succ rank dist #> 11 0 12 11 0 #> vid pred succ rank dist #> 12 11 20 12 1 #> vid pred succ rank dist #> 20 12 13 13 1 #> vid pred succ rank dist #> 13 20 19 14 2 #> vid pred succ rank dist #> 19 13 14 15 2 #> vid pred succ rank dist #> 14 19 18 16 3 #> vid pred succ rank dist #> 18 14 15 17 3 #> vid pred succ rank dist #> 15 18 17 18 4 #> vid pred succ rank dist #> 17 15 16 19 4 #> vid pred succ rank dist #> 16 17 0 20 5 ## How to use a callback to stop the search ## We stop after visiting all vertices in the initial component f <- function(graph, data, extra) { data[\"succ\"] == -1 } bfs(make_ring(10) %du% make_ring(10), root = 1, callback = f) #> $root #> [1] 1 #> #> $mode #> [1] \"out\" #> #> $order #> + 20/20 vertices, from 74fb5b0: #> [1] 1 2 10 3 9 4 8 5 7 6 11 12 20 13 19 14 18 15 17 16 #> #> $rank #> NULL #> #> $father #> NULL #> #> $pred #> NULL #> #> $succ #> NULL #> #> $dist #> NULL #> #> $neimode #> [1] \"out\" #>"},{"path":"https://r.igraph.org/reference/biconnected.components.html","id":null,"dir":"Reference","previous_headings":"","what":"Biconnected components — biconnected.components","title":"Biconnected components — biconnected.components","text":"biconnected.components() renamed biconnected_components() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/biconnected.components.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Biconnected components — biconnected.components","text":"","code":"biconnected.components(graph)"},{"path":"https://r.igraph.org/reference/biconnected.components.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Biconnected components — biconnected.components","text":"graph input graph. treated undirected graph, even directed.","code":""},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":null,"dir":"Reference","previous_headings":"","what":"Biconnected components — biconnected_components","title":"Biconnected components — biconnected_components","text":"Finding biconnected components graph","code":""},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Biconnected components — biconnected_components","text":"","code":"biconnected_components(graph)"},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Biconnected components — biconnected_components","text":"graph input graph. treated undirected graph, even directed.","code":""},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Biconnected components — biconnected_components","text":"named list three components: Numeric scalar, integer giving number biconnected components graph. tree_edges components , list numeric vectors. vector set edge ids giving edges biconnected component. edges define spanning tree component. component_edges list numeric vectors. gives edges components. components list numeric vectors, vertices components. articulation_points articulation points graph. See articulation_points().","code":""},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Biconnected components — biconnected_components","text":"graph biconnected removal single vertex (adjacent edges) disconnect . biconnected component graph maximal biconnected subgraph . biconnected components graph can given partition edges: every edge member exactly one biconnected component. Note true vertices: vertex can part many biconnected components.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Biconnected components — biconnected_components","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/biconnected_components.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Biconnected components — biconnected_components","text":"","code":"g <- disjoint_union(make_full_graph(5), make_full_graph(5)) clu <- components(g)$membership g <- add_edges(g, c(which(clu == 1), which(clu == 2))) bc <- biconnected_components(g)"},{"path":"https://r.igraph.org/reference/bipartite.mapping.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide whether a graph is bipartite — bipartite.mapping","title":"Decide whether a graph is bipartite — bipartite.mapping","text":"bipartite.mapping() renamed bipartite_mapping() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/bipartite.mapping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide whether a graph is bipartite — bipartite.mapping","text":"","code":"bipartite.mapping(graph)"},{"path":"https://r.igraph.org/reference/bipartite.mapping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide whether a graph is bipartite — bipartite.mapping","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/bipartite.projection.html","id":null,"dir":"Reference","previous_headings":"","what":"Project a bipartite graph — bipartite.projection","title":"Project a bipartite graph — bipartite.projection","text":"bipartite.projection() renamed bipartite_projection() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/bipartite.projection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Project a bipartite graph — bipartite.projection","text":"","code":"bipartite.projection( graph, types = NULL, multiplicity = TRUE, probe1 = NULL, which = c(\"both\", \"true\", \"false\"), remove.type = TRUE )"},{"path":"https://r.igraph.org/reference/bipartite.projection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Project a bipartite graph — bipartite.projection","text":"graph input graph. can directed, edge directions ignored computation. types optional vertex type vector use instead ‘type’ vertex attribute. must supply argument graph ‘type’ vertex attribute. multiplicity TRUE, igraph keeps multiplicity edges edge attribute called ‘weight’. E.g. -C-B also -D-B triple bipartite graph (X, -X-B also graph), multiplicity -B edge projection 2. probe1 argument can used specify order projections resulting list. given, considered vertex id (symbolic vertex name); projection containing vertex first one result list. argument ignored one projection requested argument . character scalar specify projection(s) calculate. default calculate . remove.type Logical scalar, whether remove type vertex attribute projections. makes sense graphs bipartite . However want combine (bipartite graphs), worth keeping attribute. default removed.","code":""},{"path":"https://r.igraph.org/reference/bipartite.projection.size.html","id":null,"dir":"Reference","previous_headings":"","what":"Project a bipartite graph — bipartite.projection.size","title":"Project a bipartite graph — bipartite.projection.size","text":"bipartite.projection.size() renamed bipartite_projection_size() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/bipartite.projection.size.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Project a bipartite graph — bipartite.projection.size","text":"","code":"bipartite.projection.size(graph, types = NULL)"},{"path":"https://r.igraph.org/reference/bipartite.projection.size.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Project a bipartite graph — bipartite.projection.size","text":"graph input graph. can directed, edge directions ignored computation. types optional vertex type vector use instead ‘type’ vertex attribute. must supply argument graph ‘type’ vertex attribute.","code":""},{"path":"https://r.igraph.org/reference/bipartite.random.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Bipartite random graphs — bipartite.random.game","title":"Bipartite random graphs — bipartite.random.game","text":"bipartite.random.game() renamed sample_bipartite() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/bipartite.random.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bipartite random graphs — bipartite.random.game","text":"","code":"bipartite.random.game( n1, n2, type = c(\"gnp\", \"gnm\"), p, m, directed = FALSE, mode = c(\"out\", \"in\", \"all\") )"},{"path":"https://r.igraph.org/reference/bipartite.random.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bipartite random graphs — bipartite.random.game","text":"n1 Integer scalar, number bottom vertices. n2 Integer scalar, number top vertices. type Character scalar, type graph, ‘gnp’ creates \\(G(n,p)\\) graph, ‘gnm’ creates \\(G(n,m)\\) graph. See details . p Real scalar, connection probability \\(G(n,p)\\) graphs. given \\(G(n,m)\\) graphs. m Integer scalar, number edges \\(G(n,m)\\) graphs. given \\(G(n,p)\\) graphs. directed Logical scalar, whether create directed graph. See also mode argument. mode Character scalar, specifies direct edges directed graphs. ‘’, directed edges point bottom vertices top vertices. ‘’, edges point top vertices bottom vertices. ‘’ ‘’ generate mutual edges. argument ‘’, edge direction considered independently mutual edges might generated. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide whether a graph is bipartite — bipartite_mapping","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"function decides whether vertices network can mapped two vertex types way vertices type connected.","code":""},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"","code":"bipartite_mapping(graph)"},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"named list two elements: res logical scalar, TRUE can bipartite, FALSE otherwise. type possible vertex type mapping, logical vector. mapping exists, empty vector.","code":""},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"bipartite graph igraph ‘type’ vertex attribute giving two vertex types. function simply checks whether graph bipartite. tries find mapping gives possible division vertices two classes, two vertices class connected edge. existence mapping equivalent circuits odd length graph. graph loop edges bipartite. Note mapping necessarily unique, e.g. graph least two components, vertices separate components can mapped independently.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/bipartite_mapping.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decide whether a graph is bipartite — bipartite_mapping","text":"","code":"## Rings with an even number of vertices are bipartite g <- make_ring(10) bipartite_mapping(g) #> $res #> [1] TRUE #> #> $type #> [1] FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE #> ## All star graphs are bipartite g2 <- make_star(10) bipartite_mapping(g2) #> $res #> [1] TRUE #> #> $type #> [1] FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> ## A graph containing a triangle is not bipartite g3 <- make_ring(10) g3 <- add_edges(g3, c(1, 3)) bipartite_mapping(g3) #> $res #> [1] FALSE #> #> $type #> logical(0) #>"},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":null,"dir":"Reference","previous_headings":"","what":"Project a bipartite graph — bipartite_projection","title":"Project a bipartite graph — bipartite_projection","text":"bipartite graph projected two one-mode networks","code":""},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Project a bipartite graph — bipartite_projection","text":"","code":"bipartite_projection( graph, types = NULL, multiplicity = TRUE, probe1 = NULL, which = c(\"both\", \"true\", \"false\"), remove.type = TRUE ) bipartite_projection_size(graph, types = NULL)"},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Project a bipartite graph — bipartite_projection","text":"graph input graph. can directed, edge directions ignored computation. types optional vertex type vector use instead ‘type’ vertex attribute. must supply argument graph ‘type’ vertex attribute. multiplicity TRUE, igraph keeps multiplicity edges edge attribute called ‘weight’. E.g. -C-B also -D-B triple bipartite graph (X, -X-B also graph), multiplicity -B edge projection 2. probe1 argument can used specify order projections resulting list. given, considered vertex id (symbolic vertex name); projection containing vertex first one result list. argument ignored one projection requested argument . character scalar specify projection(s) calculate. default calculate . remove.type Logical scalar, whether remove type vertex attribute projections. makes sense graphs bipartite . However want combine (bipartite graphs), worth keeping attribute. default removed.","code":""},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Project a bipartite graph — bipartite_projection","text":"list two undirected graphs. See details .","code":""},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Project a bipartite graph — bipartite_projection","text":"Bipartite graphs type vertex attribute igraph, boolean FALSE vertices first kind TRUE vertices second kind. bipartite_projection_size() calculates number vertices edges two projections bipartite graphs, without calculating projections . useful check much memory projections need large bipartite graph. bipartite_projection() calculates actual projections. can use probe1 argument specify order projections result. default vertex type FALSE first TRUE second. bipartite_projection() keeps vertex attributes.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Project a bipartite graph — bipartite_projection","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/bipartite_projection.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Project a bipartite graph — bipartite_projection","text":"","code":"## Projection of a full bipartite graph is a full graph g <- make_full_bipartite_graph(10, 5) proj <- bipartite_projection(g) graph.isomorphic(proj[[1]], make_full_graph(10)) #> [1] TRUE graph.isomorphic(proj[[2]], make_full_graph(5)) #> [1] TRUE ## The projection keeps the vertex attributes M <- matrix(0, nrow = 5, ncol = 3) rownames(M) <- c(\"Alice\", \"Bob\", \"Cecil\", \"Dan\", \"Ethel\") colnames(M) <- c(\"Party\", \"Skiing\", \"Badminton\") M[] <- sample(0:1, length(M), replace = TRUE) M #> Party Skiing Badminton #> Alice 1 1 0 #> Bob 0 1 0 #> Cecil 0 1 0 #> Dan 0 1 1 #> Ethel 0 0 0 g2 <- graph_from_biadjacency_matrix(M) g2$name <- \"Event network\" proj2 <- bipartite_projection(g2) print(proj2[[1]], g = TRUE, e = TRUE) #> IGRAPH b8eaabc UNW- 5 6 -- Event network #> + attr: name (g/c), name (v/c), weight (e/n) #> + edges from b8eaabc (vertex names): #> [1] Alice--Bob Alice--Cecil Alice--Dan Bob --Cecil Bob --Dan #> [6] Cecil--Dan print(proj2[[2]], g = TRUE, e = TRUE) #> IGRAPH 32b319e UNW- 3 2 -- Event network #> + attr: name (g/c), name (v/c), weight (e/n) #> + edges from 32b319e (vertex names): #> [1] Party --Skiing Skiing--Badminton"},{"path":"https://r.igraph.org/reference/blockGraphs.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Cohesive Blocks — blockGraphs","title":"Calculate Cohesive Blocks — blockGraphs","text":"blockGraphs() renamed graphs_from_cohesive_blocks() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/blockGraphs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Cohesive Blocks — blockGraphs","text":"","code":"blockGraphs(blocks, graph)"},{"path":"https://r.igraph.org/reference/blockGraphs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Cohesive Blocks — blockGraphs","text":"graph cohesive_blocks() graph object class igraph. must undirected simple. (See is_simple().) graphs_from_cohesive_blocks() export_pajek() graph must supplied whose cohesive block structure given blocks() argument.","code":""},{"path":"https://r.igraph.org/reference/bonpow.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Bonacich Power Centrality Scores of Network Positions — bonpow","title":"Find Bonacich Power Centrality Scores of Network Positions — bonpow","text":"bonpow() renamed power_centrality() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/bonpow.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Bonacich Power Centrality Scores of Network Positions — bonpow","text":"","code":"bonpow( graph, nodes = V(graph), loops = FALSE, exponent = 1, rescale = FALSE, tol = 1e-07, sparse = TRUE )"},{"path":"https://r.igraph.org/reference/bonpow.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Bonacich Power Centrality Scores of Network Positions — bonpow","text":"graph input graph. nodes vertex sequence indicating vertices included calculation. default, vertices included. loops boolean indicating whether diagonal treated valid data. Set true data can contain loops. loops FALSE default. exponent exponent (decay rate) Bonacich power centrality score; can negative rescale true, centrality scores rescaled sum 1. tol tolerance near-singularities matrix inversion (see solve()) sparse Logical scalar, whether use sparse matrices calculation. ‘Matrix’ package required sparse matrix support","code":""},{"path":"https://r.igraph.org/reference/c.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate edge sequences — c.igraph.es","title":"Concatenate edge sequences — c.igraph.es","text":"Concatenate edge sequences","code":""},{"path":"https://r.igraph.org/reference/c.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate edge sequences — c.igraph.es","text":"","code":"# S3 method for class 'igraph.es' c(..., recursive = FALSE)"},{"path":"https://r.igraph.org/reference/c.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate edge sequences — c.igraph.es","text":"... edge sequences concatenate. must refer graph. recursive Ignored, included S3 compatibility base c function.","code":""},{"path":"https://r.igraph.org/reference/c.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate edge sequences — c.igraph.es","text":"edge sequence, input sequences concatenated.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/c.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Concatenate edge sequences — c.igraph.es","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) c(E(g)[1], E(g)[\"A|B\"], E(g)[1:4]) #> + 6/10 edges from 7ed7592 (vertex names): #> [1] A--B A--B A--B B--C C--D D--E"},{"path":"https://r.igraph.org/reference/c.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate vertex sequences — c.igraph.vs","title":"Concatenate vertex sequences — c.igraph.vs","text":"Concatenate vertex sequences","code":""},{"path":"https://r.igraph.org/reference/c.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate vertex sequences — c.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' c(..., recursive = FALSE)"},{"path":"https://r.igraph.org/reference/c.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate vertex sequences — c.igraph.vs","text":"... vertex sequences concatenate. must refer graph. recursive Ignored, included S3 compatibility base c function.","code":""},{"path":"https://r.igraph.org/reference/c.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate vertex sequences — c.igraph.vs","text":"vertex sequence, input sequences concatenated.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/c.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Concatenate vertex sequences — c.igraph.vs","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) c(V(g)[1], V(g)[\"A\"], V(g)[1:4]) #> + 6/10 vertices, named, from 9dac6ce: #> [1] A A A B C D"},{"path":"https://r.igraph.org/reference/callaway.traits.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph generation based on different vertex types — callaway.traits.game","title":"Graph generation based on different vertex types — callaway.traits.game","text":"callaway.traits.game() renamed sample_traits_callaway() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/callaway.traits.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph generation based on different vertex types — callaway.traits.game","text":"","code":"callaway.traits.game( nodes, types, edge.per.step = 1, type.dist = rep(1, types), pref.matrix = matrix(1, types, types), directed = FALSE )"},{"path":"https://r.igraph.org/reference/callaway.traits.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph generation based on different vertex types — callaway.traits.game","text":"nodes number vertices graph. types number different vertex types. edge.per.step number edges add graph per time step. type.dist distribution vertex types. assumed stationary time. pref.matrix matrix giving preferences given vertex types. probabilities, .e. numbers zero one. directed Logical constant, whether generate directed graphs.","code":""},{"path":"https://r.igraph.org/reference/canonical.permutation.html","id":null,"dir":"Reference","previous_headings":"","what":"Canonical permutation of a graph — canonical.permutation","title":"Canonical permutation of a graph — canonical.permutation","text":"canonical.permutation() renamed canonical_permutation() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/canonical.permutation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Canonical permutation of a graph — canonical.permutation","text":"","code":"canonical.permutation( graph, colors = NULL, sh = c(\"fm\", \"f\", \"fs\", \"fl\", \"flm\", \"fsm\") )"},{"path":"https://r.igraph.org/reference/canonical.permutation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Canonical permutation of a graph — canonical.permutation","text":"graph input graph, treated undirected. colors colors individual vertices graph; vertices color allowed match automorphism. omitted, igraph uses color attribute vertices, , vertex attribute, simply assumes vertices color. Pass NULL explicitly graph color vertex attribute want use . sh Type heuristics use BLISS algorithm. See details possible values.","code":""},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":null,"dir":"Reference","previous_headings":"","what":"Canonical permutation of a graph — canonical_permutation","title":"Canonical permutation of a graph — canonical_permutation","text":"canonical permutation brings every isomorphic graphs (labeled) graph.","code":""},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Canonical permutation of a graph — canonical_permutation","text":"","code":"canonical_permutation( graph, colors = NULL, sh = c(\"fm\", \"f\", \"fs\", \"fl\", \"flm\", \"fsm\") )"},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Canonical permutation of a graph — canonical_permutation","text":"graph input graph, treated undirected. colors colors individual vertices graph; vertices color allowed match automorphism. omitted, igraph uses color attribute vertices, , vertex attribute, simply assumes vertices color. Pass NULL explicitly graph color vertex attribute want use . sh Type heuristics use BLISS algorithm. See details possible values.","code":""},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Canonical permutation of a graph — canonical_permutation","text":"list following members: labeling canonical permutation takes input graph canonical form. numeric vector, first element new label vertex 0, second element vertex 1, etc. info information BLISS computation. named list following members: \"nof_nodes\" number nodes search tree. \"nof_leaf_nodes\" number leaf nodes search tree. \"nof_bad_nodes\" Number bad nodes. \"nof_canupdates\" Number canrep updates. \"max_level\" Maximum level. \"group_size\" size automorphism group input graph, string. string representation necessary group size can easily exceed values exactly representable floating point.","code":""},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Canonical permutation of a graph — canonical_permutation","text":"canonical_permutation() computes permutation brings graph canonical form, defined BLISS algorithm. isomorphic graphs canonical form. See paper details BLISS. information available http://www.tcs.hut.fi/Software/bliss/index.html. possible values sh argument : \"f\" First non-singleton cell. \"fl\" First largest non-singleton cell. \"fs\" First smallest non-singleton cell. \"fm\" First maximally non-trivially connectec non-singleton cell. \"flm\" Largest maximally non-trivially connected non-singleton cell. \"fsm\" Smallest maximally non-trivially connected non-singleton cell. See paper references details .","code":""},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Canonical permutation of a graph — canonical_permutation","text":"Tommi Junttila Petteri Kaski: Engineering Efficient Canonical Labeling Tool Large Sparse Graphs, Proceedings Ninth Workshop Algorithm Engineering Experiments Fourth Workshop Analytic Algorithms Combinatorics. 2007.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Canonical permutation of a graph — canonical_permutation","text":"Tommi Junttila BLISS, Gabor Csardi csardi.gabor@gmail.com igraph R interfaces.","code":""},{"path":"https://r.igraph.org/reference/canonical_permutation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Canonical permutation of a graph — canonical_permutation","text":"","code":"## Calculate the canonical form of a random graph g1 <- sample_gnm(10, 20) cp1 <- canonical_permutation(g1) cf1 <- permute(g1, cp1$labeling) ## Do the same with a random permutation of it g2 <- permute(g1, sample(vcount(g1))) cp2 <- canonical_permutation(g2) cf2 <- permute(g2, cp2$labeling) ## Check that they are the same el1 <- as_edgelist(cf1) el2 <- as_edgelist(cf2) el1 <- el1[order(el1[, 1], el1[, 2]), ] el2 <- el2[order(el2[, 1], el2[, 2]), ] all(el1 == el2) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/categorical_pal.html","id":null,"dir":"Reference","previous_headings":"","what":"Palette for categories — categorical_pal","title":"Palette for categories — categorical_pal","text":"color blind friendly palette https://jfly.uni-koeln.de/color/. 8 colors.","code":""},{"path":"https://r.igraph.org/reference/categorical_pal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Palette for categories — categorical_pal","text":"","code":"categorical_pal(n)"},{"path":"https://r.igraph.org/reference/categorical_pal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Palette for categories — categorical_pal","text":"n number colors palette. simply take first n colors total 8.","code":""},{"path":"https://r.igraph.org/reference/categorical_pal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Palette for categories — categorical_pal","text":"character vector RGB color codes.","code":""},{"path":"https://r.igraph.org/reference/categorical_pal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Palette for categories — categorical_pal","text":"suggested palette visualizations vertex colors mark categories, e.g. community membership.","code":""},{"path":"https://r.igraph.org/reference/categorical_pal.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Palette for categories — categorical_pal","text":"","code":"library(igraphdata) data(karate) karate <- karate add_layout_(with_fr()) set_vertex_attr(\"size\", value = 10) cl_k <- cluster_optimal(karate) V(karate)$color <- membership(cl_k) karate$palette <- categorical_pal(length(cl_k)) plot(karate)"},{"path":[]},{"path":"https://r.igraph.org/reference/centr_betw.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the betweenness of vertices — centr_betw","title":"Centralize a graph according to the betweenness of vertices — centr_betw","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_betw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the betweenness of vertices — centr_betw","text":"","code":"centr_betw(graph, directed = TRUE, normalized = TRUE)"},{"path":"https://r.igraph.org/reference/centr_betw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the betweenness of vertices — centr_betw","text":"graph input graph. directed logical scalar, whether use directed shortest paths calculating betweenness. normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centr_betw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Centralize a graph according to the betweenness of vertices — centr_betw","text":"named list following components: res node-level centrality scores. centralization graph level centrality index. theoretical_max maximum theoretical graph level centralization score graph given number vertices, using parameters. normalized argument TRUE, result divided number.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_betw.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Centralize a graph according to the betweenness of vertices — centr_betw","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_degree(g)$centralization #> [1] 0.1618335 centr_clo(g, mode = \"all\")$centralization #> [1] 0.437051 centr_betw(g, directed = FALSE)$centralization #> [1] 0.2764392 centr_eigen(g, directed = FALSE)$centralization #> [1] 0.9486925"},{"path":"https://r.igraph.org/reference/centr_betw_tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for betweenness centralization — centr_betw_tmax","title":"Theoretical maximum for betweenness centralization — centr_betw_tmax","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_betw_tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for betweenness centralization — centr_betw_tmax","text":"","code":"centr_betw_tmax(graph = NULL, nodes = 0, directed = TRUE)"},{"path":"https://r.igraph.org/reference/centr_betw_tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for betweenness centralization — centr_betw_tmax","text":"graph input graph. can also NULL, nodes given. nodes number vertices. ignored graph given. directed logical scalar, whether use directed shortest paths calculating betweenness.","code":""},{"path":"https://r.igraph.org/reference/centr_betw_tmax.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Theoretical maximum for betweenness centralization — centr_betw_tmax","text":"Real scalar, theoretical maximum (unnormalized) graph betweenness centrality score graphs given order parameters.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_betw_tmax.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Theoretical maximum for betweenness centralization — centr_betw_tmax","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_betw(g, normalized = FALSE)$centralization %>% `/`(centr_betw_tmax(g)) #> [1] 0.0005692495 centr_betw(g, normalized = TRUE)$centralization #> [1] 0.0005692495"},{"path":"https://r.igraph.org/reference/centr_clo.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the closeness of vertices — centr_clo","title":"Centralize a graph according to the closeness of vertices — centr_clo","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_clo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the closeness of vertices — centr_clo","text":"","code":"centr_clo(graph, mode = c(\"out\", \"in\", \"all\", \"total\"), normalized = TRUE)"},{"path":"https://r.igraph.org/reference/centr_clo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the closeness of vertices — centr_clo","text":"graph input graph. mode mode argument closeness(). normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centr_clo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Centralize a graph according to the closeness of vertices — centr_clo","text":"named list following components: res node-level centrality scores. centralization graph level centrality index. theoretical_max maximum theoretical graph level centralization score graph given number vertices, using parameters. normalized argument TRUE, result divided number.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_clo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Centralize a graph according to the closeness of vertices — centr_clo","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_degree(g)$centralization #> [1] 0.1518135 centr_clo(g, mode = \"all\")$centralization #> [1] 0.413991 centr_betw(g, directed = FALSE)$centralization #> [1] 0.2305906 centr_eigen(g, directed = FALSE)$centralization #> [1] 0.943837"},{"path":"https://r.igraph.org/reference/centr_clo_tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for closeness centralization — centr_clo_tmax","title":"Theoretical maximum for closeness centralization — centr_clo_tmax","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_clo_tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for closeness centralization — centr_clo_tmax","text":"","code":"centr_clo_tmax(graph = NULL, nodes = 0, mode = c(\"out\", \"in\", \"all\", \"total\"))"},{"path":"https://r.igraph.org/reference/centr_clo_tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for closeness centralization — centr_clo_tmax","text":"graph input graph. can also NULL, nodes given. nodes number vertices. ignored graph given. mode mode argument closeness().","code":""},{"path":"https://r.igraph.org/reference/centr_clo_tmax.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Theoretical maximum for closeness centralization — centr_clo_tmax","text":"Real scalar, theoretical maximum (unnormalized) graph closeness centrality score graphs given order parameters.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_clo_tmax.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Theoretical maximum for closeness centralization — centr_clo_tmax","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_clo(g, normalized = FALSE)$centralization %>% `/`(centr_clo_tmax(g)) #> [1] NaN centr_clo(g, normalized = TRUE)$centralization #> [1] NaN"},{"path":"https://r.igraph.org/reference/centr_degree.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the degrees of vertices — centr_degree","title":"Centralize a graph according to the degrees of vertices — centr_degree","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_degree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the degrees of vertices — centr_degree","text":"","code":"centr_degree( graph, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = TRUE, normalized = TRUE )"},{"path":"https://r.igraph.org/reference/centr_degree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the degrees of vertices — centr_degree","text":"graph input graph. mode mode argument degree(). loops Logical scalar, whether consider loops edges calculating degree. normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centr_degree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Centralize a graph according to the degrees of vertices — centr_degree","text":"named list following components: res node-level centrality scores. centralization graph level centrality index. theoretical_max maximum theoretical graph level centralization score graph given number vertices, using parameters. normalized argument TRUE, result divided number.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_degree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Centralize a graph according to the degrees of vertices — centr_degree","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_degree(g)$centralization #> [1] 0.1638375 centr_clo(g, mode = \"all\")$centralization #> [1] 0.4236249 centr_betw(g, directed = FALSE)$centralization #> [1] 0.2452183 centr_eigen(g, directed = FALSE)$centralization #> [1] 0.941744"},{"path":"https://r.igraph.org/reference/centr_degree_tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for degree centralization — centr_degree_tmax","title":"Theoretical maximum for degree centralization — centr_degree_tmax","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_degree_tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for degree centralization — centr_degree_tmax","text":"","code":"centr_degree_tmax( graph = NULL, nodes = 0, mode = c(\"all\", \"out\", \"in\", \"total\"), loops )"},{"path":"https://r.igraph.org/reference/centr_degree_tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for degree centralization — centr_degree_tmax","text":"graph input graph. can also NULL, nodes, mode loops given. nodes number vertices. ignored graph given. mode mode argument degree(). loops Logical scalar, whether consider loops edges calculating degree.","code":""},{"path":"https://r.igraph.org/reference/centr_degree_tmax.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Theoretical maximum for degree centralization — centr_degree_tmax","text":"Real scalar, theoretical maximum (unnormalized) graph degree centrality score graphs given order parameters.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_degree_tmax.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Theoretical maximum for degree centralization — centr_degree_tmax","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_degree(g, normalized = FALSE)$centralization %>% `/`(centr_degree_tmax(g, loops = FALSE)) #> [1] 0.1599896 centr_degree(g, normalized = TRUE)$centralization #> [1] 0.1598295"},{"path":"https://r.igraph.org/reference/centr_eigen.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the eigenvector centrality of vertices — centr_eigen","title":"Centralize a graph according to the eigenvector centrality of vertices — centr_eigen","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_eigen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the eigenvector centrality of vertices — centr_eigen","text":"","code":"centr_eigen( graph, directed = FALSE, scale = TRUE, options = arpack_defaults(), normalized = TRUE )"},{"path":"https://r.igraph.org/reference/centr_eigen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the eigenvector centrality of vertices — centr_eigen","text":"graph input graph. directed logical scalar, whether use directed shortest paths calculating eigenvector centrality. scale Whether rescale eigenvector centrality scores, maximum score one. options passed eigen_centrality(), options ARPACK eigensolver. normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centr_eigen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Centralize a graph according to the eigenvector centrality of vertices — centr_eigen","text":"named list following components: vector node-level centrality scores. value corresponding eigenvalue. options ARPACK options, see return value eigen_centrality() details. centralization graph level centrality index. theoretical_max , theoretical maximum centralization score graph number vertices.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_eigen.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Centralize a graph according to the eigenvector centrality of vertices — centr_eigen","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_degree(g)$centralization #> [1] 0.1523145 centr_clo(g, mode = \"all\")$centralization #> [1] 0.4128655 centr_betw(g, directed = FALSE)$centralization #> [1] 0.2245963 centr_eigen(g, directed = FALSE)$centralization #> [1] 0.9418167 # The most centralized graph according to eigenvector centrality g0 <- make_graph(c(2, 1), n = 10, dir = FALSE) g1 <- make_star(10, mode = \"undirected\") centr_eigen(g0)$centralization #> [1] 1 centr_eigen(g1)$centralization #> [1] 0.75"},{"path":"https://r.igraph.org/reference/centr_eigen_tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for betweenness centralization — centr_eigen_tmax","title":"Theoretical maximum for betweenness centralization — centr_eigen_tmax","text":"See centralize() summary graph centralization.","code":""},{"path":"https://r.igraph.org/reference/centr_eigen_tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for betweenness centralization — centr_eigen_tmax","text":"","code":"centr_eigen_tmax(graph = NULL, nodes = 0, directed = FALSE, scale = TRUE)"},{"path":"https://r.igraph.org/reference/centr_eigen_tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for betweenness centralization — centr_eigen_tmax","text":"graph input graph. can also NULL, nodes given. nodes number vertices. ignored graph given. directed logical scalar, whether use directed shortest paths calculating betweenness. scale Whether rescale eigenvector centrality scores, maximum score one.","code":""},{"path":"https://r.igraph.org/reference/centr_eigen_tmax.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Theoretical maximum for betweenness centralization — centr_eigen_tmax","text":"Real scalar, theoretical maximum (unnormalized) graph betweenness centrality score graphs given order parameters.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centr_eigen_tmax.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Theoretical maximum for betweenness centralization — centr_eigen_tmax","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_eigen(g, normalized = FALSE)$centralization %>% `/`(centr_eigen_tmax(g)) #> [1] 0.9386488 centr_eigen(g, normalized = TRUE)$centralization #> [1] 0.9386488"},{"path":"https://r.igraph.org/reference/centralization.betweenness.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the betweenness of vertices — centralization.betweenness","title":"Centralize a graph according to the betweenness of vertices — centralization.betweenness","text":"centralization.betweenness() renamed centr_betw() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.betweenness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the betweenness of vertices — centralization.betweenness","text":"","code":"centralization.betweenness(graph, directed = TRUE, normalized = TRUE)"},{"path":"https://r.igraph.org/reference/centralization.betweenness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the betweenness of vertices — centralization.betweenness","text":"graph input graph. directed logical scalar, whether use directed shortest paths calculating betweenness. normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centralization.betweenness.tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for betweenness centralization — centralization.betweenness.tmax","title":"Theoretical maximum for betweenness centralization — centralization.betweenness.tmax","text":"centralization.betweenness.tmax() renamed centr_betw_tmax() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.betweenness.tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for betweenness centralization — centralization.betweenness.tmax","text":"","code":"centralization.betweenness.tmax(graph = NULL, nodes = 0, directed = TRUE)"},{"path":"https://r.igraph.org/reference/centralization.betweenness.tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for betweenness centralization — centralization.betweenness.tmax","text":"graph input graph. can also NULL, nodes given. nodes number vertices. ignored graph given. directed logical scalar, whether use directed shortest paths calculating betweenness.","code":""},{"path":"https://r.igraph.org/reference/centralization.closeness.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the closeness of vertices — centralization.closeness","title":"Centralize a graph according to the closeness of vertices — centralization.closeness","text":"centralization.closeness() renamed centr_clo() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.closeness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the closeness of vertices — centralization.closeness","text":"","code":"centralization.closeness( graph, mode = c(\"out\", \"in\", \"all\", \"total\"), normalized = TRUE )"},{"path":"https://r.igraph.org/reference/centralization.closeness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the closeness of vertices — centralization.closeness","text":"graph input graph. mode mode argument closeness(). normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centralization.closeness.tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for closeness centralization — centralization.closeness.tmax","title":"Theoretical maximum for closeness centralization — centralization.closeness.tmax","text":"centralization.closeness.tmax() renamed centr_clo_tmax() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.closeness.tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for closeness centralization — centralization.closeness.tmax","text":"","code":"centralization.closeness.tmax( graph = NULL, nodes = 0, mode = c(\"out\", \"in\", \"all\", \"total\") )"},{"path":"https://r.igraph.org/reference/centralization.closeness.tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for closeness centralization — centralization.closeness.tmax","text":"graph input graph. can also NULL, nodes given. nodes number vertices. ignored graph given. mode mode argument closeness().","code":""},{"path":"https://r.igraph.org/reference/centralization.degree.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the degrees of vertices — centralization.degree","title":"Centralize a graph according to the degrees of vertices — centralization.degree","text":"centralization.degree() renamed centr_degree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.degree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the degrees of vertices — centralization.degree","text":"","code":"centralization.degree( graph, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = TRUE, normalized = TRUE )"},{"path":"https://r.igraph.org/reference/centralization.degree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the degrees of vertices — centralization.degree","text":"graph input graph. mode mode argument degree(). loops Logical scalar, whether consider loops edges calculating degree. normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centralization.degree.tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for degree centralization — centralization.degree.tmax","title":"Theoretical maximum for degree centralization — centralization.degree.tmax","text":"centralization.degree.tmax() renamed centr_degree_tmax() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.degree.tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for degree centralization — centralization.degree.tmax","text":"","code":"centralization.degree.tmax( graph = NULL, nodes = 0, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = FALSE )"},{"path":"https://r.igraph.org/reference/centralization.degree.tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for degree centralization — centralization.degree.tmax","text":"graph input graph. can also NULL, nodes, mode loops given. nodes number vertices. ignored graph given. mode mode argument degree(). loops Logical scalar, whether consider loops edges calculating degree.","code":""},{"path":"https://r.igraph.org/reference/centralization.evcent.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralize a graph according to the eigenvector centrality of vertices — centralization.evcent","title":"Centralize a graph according to the eigenvector centrality of vertices — centralization.evcent","text":"centralization.evcent() renamed centr_eigen() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.evcent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralize a graph according to the eigenvector centrality of vertices — centralization.evcent","text":"","code":"centralization.evcent( graph, directed = FALSE, scale = TRUE, options = arpack_defaults(), normalized = TRUE )"},{"path":"https://r.igraph.org/reference/centralization.evcent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralize a graph according to the eigenvector centrality of vertices — centralization.evcent","text":"graph input graph. directed logical scalar, whether use directed shortest paths calculating eigenvector centrality. scale Whether rescale eigenvector centrality scores, maximum score one. options passed eigen_centrality(), options ARPACK eigensolver. normalized Logical scalar. Whether normalize graph level centrality score dividing theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centralization.evcent.tmax.html","id":null,"dir":"Reference","previous_headings":"","what":"Theoretical maximum for betweenness centralization — centralization.evcent.tmax","title":"Theoretical maximum for betweenness centralization — centralization.evcent.tmax","text":"centralization.evcent.tmax() renamed centr_eigen_tmax() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralization.evcent.tmax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Theoretical maximum for betweenness centralization — centralization.evcent.tmax","text":"","code":"centralization.evcent.tmax( graph = NULL, nodes = 0, directed = FALSE, scale = TRUE )"},{"path":"https://r.igraph.org/reference/centralization.evcent.tmax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Theoretical maximum for betweenness centralization — centralization.evcent.tmax","text":"graph input graph. can also NULL, nodes given. nodes number vertices. ignored graph given. directed logical scalar, whether use directed shortest paths calculating betweenness. scale Whether rescale eigenvector centrality scores, maximum score one.","code":""},{"path":"https://r.igraph.org/reference/centralize.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralization of a graph — centralize","title":"Centralization of a graph — centralize","text":"Centralization method creating graph level centralization measure centrality scores vertices.","code":""},{"path":"https://r.igraph.org/reference/centralize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralization of a graph — centralize","text":"","code":"centralize(scores, theoretical.max = 0, normalized = TRUE)"},{"path":"https://r.igraph.org/reference/centralize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralization of a graph — centralize","text":"scores vertex level centrality scores. theoretical.max Real scalar. graph-level centralization measure centralized graph number vertices graph study. used normalized argument set TRUE. normalized Logical scalar. Whether normalize graph level centrality score dividing supplied theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/centralize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Centralization of a graph — centralize","text":"real scalar, centralization graph scores derived.","code":""},{"path":"https://r.igraph.org/reference/centralize.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Centralization of a graph — centralize","text":"Centralization general method calculating graph-level centrality score based node-level centrality measure. formula $$C(G)=\\sum_v (\\max_w c_w - c_v),$$ \\(c_v\\) centrality vertex \\(v\\). graph-level centralization measure can normalized dividing maximum theoretical score graph number vertices, using parameters, e.g. directedness, whether consider loop edges, etc. degree, closeness betweenness centralized structure version star graph, -star, -star undirected star. eigenvector centrality centralized structure graph single edge (potentially many isolates). centralize() implements general centralization formula calculate graph-level score vertex-level scores.","code":""},{"path":"https://r.igraph.org/reference/centralize.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Centralization of a graph — centralize","text":"Freeman, L.C. (1979). Centrality Social Networks : Conceptual Clarification. Social Networks 1, 215–239. Wasserman, S., Faust, K. (1994). Social Network Analysis: Methods Applications. Cambridge University Press.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/centralize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Centralization of a graph — centralize","text":"","code":"# A BA graph is quite centralized g <- sample_pa(1000, m = 4) centr_degree(g)$centralization #> [1] 0.1643385 centr_clo(g, mode = \"all\")$centralization #> [1] 0.4334008 centr_eigen(g, directed = FALSE)$centralization #> [1] 0.9440868 # Calculate centralization from pre-computed scores deg <- degree(g) tmax <- centr_degree_tmax(g, loops = FALSE) centralize(deg, tmax) #> [1] 0.1645032 # The most centralized graph according to eigenvector centrality g0 <- make_graph(c(2, 1), n = 10, dir = FALSE) g1 <- make_star(10, mode = \"undirected\") centr_eigen(g0)$centralization #> [1] 1 centr_eigen(g1)$centralization #> [1] 0.75"},{"path":"https://r.igraph.org/reference/centralize.scores.html","id":null,"dir":"Reference","previous_headings":"","what":"Centralization of a graph — centralize.scores","title":"Centralization of a graph — centralize.scores","text":"centralize.scores() renamed centralize() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/centralize.scores.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Centralization of a graph — centralize.scores","text":"","code":"centralize.scores(scores, theoretical.max = 0, normalized = TRUE)"},{"path":"https://r.igraph.org/reference/centralize.scores.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Centralization of a graph — centralize.scores","text":"scores vertex level centrality scores. theoretical.max Real scalar. graph-level centralization measure centralized graph number vertices graph study. used normalized argument set TRUE. normalized Logical scalar. Whether normalize graph level centrality score dividing supplied theoretical maximum.","code":""},{"path":"https://r.igraph.org/reference/cited.type.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Random citation graphs — cited.type.game","title":"Random citation graphs — cited.type.game","text":"cited.type.game() renamed sample_cit_types() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/cited.type.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random citation graphs — cited.type.game","text":"","code":"cited.type.game( n, edges = 1, types = rep(0, n), pref = rep(1, length(types)), directed = TRUE, attr = TRUE )"},{"path":"https://r.igraph.org/reference/cited.type.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random citation graphs — cited.type.game","text":"n Number vertices. edges Number edges per step. types Vector length ‘n’, types vertices. Types numbered zero. pref Vector (sample_last_cit() sample_cit_types() matrix (sample_cit_cit_types()) giving (unnormalized) citation probabilities different vertex types. directed Logical scalar, whether generate directed networks. attr Logical scalar, whether add vertex types generated graph vertex attribute called ‘type’.","code":""},{"path":"https://r.igraph.org/reference/citing.cited.type.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Random citation graphs — citing.cited.type.game","title":"Random citation graphs — citing.cited.type.game","text":"citing.cited.type.game() renamed sample_cit_cit_types() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/citing.cited.type.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random citation graphs — citing.cited.type.game","text":"","code":"citing.cited.type.game( n, edges = 1, types = rep(0, n), pref = matrix(1, nrow = length(types), ncol = length(types)), directed = TRUE, attr = TRUE )"},{"path":"https://r.igraph.org/reference/citing.cited.type.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random citation graphs — citing.cited.type.game","text":"n Number vertices. edges Number edges per step. types Vector length ‘n’, types vertices. Types numbered zero. pref Vector (sample_last_cit() sample_cit_types() matrix (sample_cit_cit_types()) giving (unnormalized) citation probabilities different vertex types. directed Logical scalar, whether generate directed networks. attr Logical scalar, whether add vertex types generated graph vertex attribute called ‘type’.","code":""},{"path":"https://r.igraph.org/reference/clique.number.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to find cliques, i.e. complete subgraphs in a graph — clique.number","title":"Functions to find cliques, i.e. complete subgraphs in a graph — clique.number","text":"clique.number() renamed clique_num() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/clique.number.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to find cliques, i.e. complete subgraphs in a graph — clique.number","text":"","code":"clique.number(graph)"},{"path":"https://r.igraph.org/reference/clique.number.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to find cliques, i.e. complete subgraphs in a graph — clique.number","text":"graph input graph, directed graphs considered undirected ones, multiple edges loops ignored.","code":""},{"path":"https://r.igraph.org/reference/cliques.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"functions find , largest maximal cliques undirected graph. size largest clique can also calculated.","code":""},{"path":"https://r.igraph.org/reference/cliques.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"","code":"cliques(graph, min = 0, max = 0) largest_cliques(graph) max_cliques(graph, min = NULL, max = NULL, subset = NULL, file = NULL) count_max_cliques(graph, min = NULL, max = NULL, subset = NULL) clique_num(graph) largest_weighted_cliques(graph, vertex.weights = NULL) weighted_clique_num(graph, vertex.weights = NULL) clique_size_counts(graph, min = 0, max = 0, maximal = FALSE)"},{"path":"https://r.igraph.org/reference/cliques.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"graph input graph, directed graphs considered undirected ones, multiple edges loops ignored. min Numeric constant, lower limit size cliques find. NULL means limit, .e. 0. max Numeric constant, upper limit size cliques find. NULL means limit. subset NULL, must vector vertex ids, numeric symbolic graph named. algorithm run vertices , subset maximal cliques returned. See Eppstein paper details. argument makes possible easily parallelize finding maximal cliques. file NULL, must file name, .e. character scalar. output algorithm written file. (exists, overwritten.) clique separate line file, given numeric ids vertices, separated whitespace. vertex.weights Vertex weight vector. graph weight vertex attribute, used default. graph weight vertex attribute argument NULL, every vertex assumed weight 1. Note current implementation weighted clique finder supports positive integer weights . maximal Specifies whether look weighted cliques (FALSE) maximal ones (TRUE).","code":""},{"path":"https://r.igraph.org/reference/cliques.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"cliques(), largest_cliques() clique_num() return list containing numeric vectors vertex ids. list element clique, .e. vertex sequence class igraph.vs(). max_cliques() returns NULL, invisibly, file argument NULL. output written specified file case. clique_num() count_max_cliques() return integer scalar. clique_size_counts() returns numeric vector clique sizes -th item belongs cliques size . Trailing zeros currently truncated, might change future versions.","code":""},{"path":"https://r.igraph.org/reference/cliques.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"cliques() find complete subgraphs input graph, obeying size limitations given min max arguments. largest_cliques() finds largest cliques input graph. clique largest clique including vertices. max_cliques() finds maximal cliques input graph. clique maximal extended larger clique. largest cliques always maximal, maximal clique necessarily largest. count_max_cliques() counts maximal cliques. clique_num() calculates size largest clique(s). clique_size_counts() returns numeric vector representing histogram clique sizes, given minimum maximum clique size.","code":""},{"path":"https://r.igraph.org/reference/cliques.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"maximal cliques following algorithm implemented: David Eppstein, Maarten Loffler, Darren Strash: Listing Maximal Cliques Sparse Graphs Near-optimal Time. https://arxiv.org/abs/1006.5440","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cliques.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/cliques.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functions to find cliques, i.e. complete subgraphs in a graph — cliques","text":"","code":"# this usually contains cliques of size six g <- sample_gnp(100, 0.3) clique_num(g) #> [1] 6 cliques(g, min = 6) #> [[1]] #> + 6/100 vertices, from 091e5e3: #> [1] 6 7 20 76 87 94 #> #> [[2]] #> + 6/100 vertices, from 091e5e3: #> [1] 7 20 28 53 76 94 #> #> [[3]] #> + 6/100 vertices, from 091e5e3: #> [1] 17 24 50 57 87 93 #> #> [[4]] #> + 6/100 vertices, from 091e5e3: #> [1] 8 15 31 40 56 63 #> #> [[5]] #> + 6/100 vertices, from 091e5e3: #> [1] 8 31 40 56 63 97 #> #> [[6]] #> + 6/100 vertices, from 091e5e3: #> [1] 8 13 68 69 75 97 #> #> [[7]] #> + 6/100 vertices, from 091e5e3: #> [1] 8 13 56 68 75 97 #> #> [[8]] #> + 6/100 vertices, from 091e5e3: #> [1] 56 63 68 81 82 97 #> #> [[9]] #> + 6/100 vertices, from 091e5e3: #> [1] 15 28 31 66 85 93 #> #> [[10]] #> + 6/100 vertices, from 091e5e3: #> [1] 3 38 50 68 96 99 #> #> [[11]] #> + 6/100 vertices, from 091e5e3: #> [1] 5 14 28 72 79 94 #> #> [[12]] #> + 6/100 vertices, from 091e5e3: #> [1] 5 14 54 72 79 94 #> #> [[13]] #> + 6/100 vertices, from 091e5e3: #> [1] 5 14 63 79 94 97 #> #> [[14]] #> + 6/100 vertices, from 091e5e3: #> [1] 5 14 63 77 94 97 #> #> [[15]] #> + 6/100 vertices, from 091e5e3: #> [1] 5 13 14 33 79 97 #> #> [[16]] #> + 6/100 vertices, from 091e5e3: #> [1] 5 14 17 63 77 97 #> #> [[17]] #> + 6/100 vertices, from 091e5e3: #> [1] 8 14 18 60 63 97 #> #> [[18]] #> + 6/100 vertices, from 091e5e3: #> [1] 17 24 46 57 84 91 #> #> [[19]] #> + 6/100 vertices, from 091e5e3: #> [1] 17 24 46 47 57 91 #> largest_cliques(g) #> [[1]] #> + 6/100 vertices, from 091e5e3: #> [1] 3 99 50 96 68 38 #> #> [[2]] #> + 6/100 vertices, from 091e5e3: #> [1] 5 14 28 72 79 94 #> #> [[3]] #> + 6/100 vertices, from 091e5e3: #> [1] 5 14 54 79 72 94 #> #> [[4]] #> + 6/100 vertices, from 091e5e3: #> [1] 5 14 97 17 63 77 #> #> [[5]] #> + 6/100 vertices, from 091e5e3: #> [1] 5 14 97 79 13 33 #> #> [[6]] #> + 6/100 vertices, from 091e5e3: #> [1] 5 14 97 79 63 94 #> #> [[7]] #> + 6/100 vertices, from 091e5e3: #> [1] 5 14 97 77 94 63 #> #> [[8]] #> + 6/100 vertices, from 091e5e3: #> [1] 6 7 94 87 20 76 #> #> [[9]] #> + 6/100 vertices, from 091e5e3: #> [1] 7 53 94 28 76 20 #> #> [[10]] #> + 6/100 vertices, from 091e5e3: #> [1] 8 97 13 68 75 56 #> #> [[11]] #> + 6/100 vertices, from 091e5e3: #> [1] 8 97 13 68 75 69 #> #> [[12]] #> + 6/100 vertices, from 091e5e3: #> [1] 8 97 63 14 60 18 #> #> [[13]] #> + 6/100 vertices, from 091e5e3: #> [1] 8 97 63 40 56 31 #> #> [[14]] #> + 6/100 vertices, from 091e5e3: #> [1] 8 15 63 56 40 31 #> #> [[15]] #> + 6/100 vertices, from 091e5e3: #> [1] 15 93 31 85 28 66 #> #> [[16]] #> + 6/100 vertices, from 091e5e3: #> [1] 17 93 50 87 57 24 #> #> [[17]] #> + 6/100 vertices, from 091e5e3: #> [1] 17 46 91 57 24 84 #> #> [[18]] #> + 6/100 vertices, from 091e5e3: #> [1] 17 46 91 57 24 47 #> #> [[19]] #> + 6/100 vertices, from 091e5e3: #> [1] 56 97 82 68 81 63 #> # To have a bit less maximal cliques, about 100-200 usually g <- sample_gnp(100, 0.03) max_cliques(g) #> [[1]] #> + 1/100 vertex, from bc22543: #> [1] 49 #> #> [[2]] #> + 1/100 vertex, from bc22543: #> [1] 64 #> #> [[3]] #> + 1/100 vertex, from bc22543: #> [1] 28 #> #> [[4]] #> + 1/100 vertex, from bc22543: #> [1] 27 #> #> [[5]] #> + 1/100 vertex, from bc22543: #> [1] 56 #> #> [[6]] #> + 1/100 vertex, from bc22543: #> [1] 35 #> #> [[7]] #> + 1/100 vertex, from bc22543: #> [1] 4 #> #> [[8]] #> + 2/100 vertices, from bc22543: #> [1] 89 80 #> #> [[9]] #> + 2/100 vertices, from bc22543: #> [1] 38 57 #> #> [[10]] #> + 2/100 vertices, from bc22543: #> [1] 70 1 #> #> [[11]] #> + 2/100 vertices, from bc22543: #> [1] 12 31 #> #> [[12]] #> + 2/100 vertices, from bc22543: #> [1] 93 22 #> #> [[13]] #> + 2/100 vertices, from bc22543: #> [1] 21 63 #> #> [[14]] #> + 2/100 vertices, from bc22543: #> [1] 73 50 #> #> [[15]] #> + 2/100 vertices, from bc22543: #> [1] 96 31 #> #> [[16]] #> + 2/100 vertices, from bc22543: #> [1] 25 23 #> #> [[17]] #> + 2/100 vertices, from bc22543: #> [1] 99 94 #> #> [[18]] #> + 2/100 vertices, from bc22543: #> [1] 32 75 #> #> [[19]] #> + 2/100 vertices, from bc22543: #> [1] 100 39 #> #> [[20]] #> + 2/100 vertices, from bc22543: #> [1] 44 16 #> #> [[21]] #> + 2/100 vertices, from bc22543: #> [1] 62 61 #> #> [[22]] #> + 2/100 vertices, from bc22543: #> [1] 36 2 #> #> [[23]] #> + 2/100 vertices, from bc22543: #> [1] 50 87 #> #> [[24]] #> + 2/100 vertices, from bc22543: #> [1] 51 3 #> #> [[25]] #> + 2/100 vertices, from bc22543: #> [1] 33 85 #> #> [[26]] #> + 2/100 vertices, from bc22543: #> [1] 33 65 #> #> [[27]] #> + 2/100 vertices, from bc22543: #> [1] 34 98 #> #> [[28]] #> + 2/100 vertices, from bc22543: #> [1] 34 58 #> #> [[29]] #> + 2/100 vertices, from bc22543: #> [1] 37 88 #> #> [[30]] #> + 2/100 vertices, from bc22543: #> [1] 37 85 #> #> [[31]] #> + 2/100 vertices, from bc22543: #> [1] 37 65 #> #> [[32]] #> + 2/100 vertices, from bc22543: #> [1] 39 72 #> #> [[33]] #> + 2/100 vertices, from bc22543: #> [1] 39 57 #> #> [[34]] #> + 2/100 vertices, from bc22543: #> [1] 39 46 #> #> [[35]] #> + 2/100 vertices, from bc22543: #> [1] 40 66 #> #> [[36]] #> + 2/100 vertices, from bc22543: #> [1] 40 61 #> #> [[37]] #> + 2/100 vertices, from bc22543: #> [1] 40 60 #> #> [[38]] #> + 2/100 vertices, from bc22543: #> [1] 40 31 #> #> [[39]] #> + 2/100 vertices, from bc22543: #> [1] 41 82 #> #> [[40]] #> + 2/100 vertices, from bc22543: #> [1] 41 18 #> #> [[41]] #> + 2/100 vertices, from bc22543: #> [1] 41 8 #> #> [[42]] #> + 2/100 vertices, from bc22543: #> [1] 42 79 #> #> [[43]] #> + 2/100 vertices, from bc22543: #> [1] 42 76 #> #> [[44]] #> + 2/100 vertices, from bc22543: #> [1] 43 97 #> #> [[45]] #> + 2/100 vertices, from bc22543: #> [1] 43 74 #> #> [[46]] #> + 2/100 vertices, from bc22543: #> [1] 43 58 #> #> [[47]] #> + 2/100 vertices, from bc22543: #> [1] 43 46 #> #> [[48]] #> + 2/100 vertices, from bc22543: #> [1] 45 30 #> #> [[49]] #> + 2/100 vertices, from bc22543: #> [1] 45 10 #> #> [[50]] #> + 2/100 vertices, from bc22543: #> [1] 47 19 #> #> [[51]] #> + 2/100 vertices, from bc22543: #> [1] 47 9 #> #> [[52]] #> + 2/100 vertices, from bc22543: #> [1] 47 6 #> #> [[53]] #> + 2/100 vertices, from bc22543: #> [1] 48 29 #> #> [[54]] #> + 2/100 vertices, from bc22543: #> [1] 48 5 #> #> [[55]] #> + 2/100 vertices, from bc22543: #> [1] 52 95 #> #> [[56]] #> + 2/100 vertices, from bc22543: #> [1] 52 6 #> #> [[57]] #> + 2/100 vertices, from bc22543: #> [1] 53 87 #> #> [[58]] #> + 2/100 vertices, from bc22543: #> [1] 53 9 #> #> [[59]] #> + 2/100 vertices, from bc22543: #> [1] 54 69 #> #> [[60]] #> + 2/100 vertices, from bc22543: #> [1] 54 24 #> #> [[61]] #> + 2/100 vertices, from bc22543: #> [1] 54 8 #> #> [[62]] #> + 2/100 vertices, from bc22543: #> [1] 55 78 #> #> [[63]] #> + 2/100 vertices, from bc22543: #> [1] 55 67 #> #> [[64]] #> + 2/100 vertices, from bc22543: #> [1] 55 26 #> #> [[65]] #> + 2/100 vertices, from bc22543: #> [1] 57 80 #> #> [[66]] #> + 2/100 vertices, from bc22543: #> [1] 57 69 #> #> [[67]] #> + 2/100 vertices, from bc22543: #> [1] 57 3 #> #> [[68]] #> + 2/100 vertices, from bc22543: #> [1] 58 90 #> #> [[69]] #> + 2/100 vertices, from bc22543: #> [1] 58 79 #> #> [[70]] #> + 2/100 vertices, from bc22543: #> [1] 58 59 #> #> [[71]] #> + 2/100 vertices, from bc22543: #> [1] 59 85 #> #> [[72]] #> + 2/100 vertices, from bc22543: #> [1] 60 86 #> #> [[73]] #> + 2/100 vertices, from bc22543: #> [1] 61 80 #> #> [[74]] #> + 2/100 vertices, from bc22543: #> [1] 61 75 #> #> [[75]] #> + 2/100 vertices, from bc22543: #> [1] 61 23 #> #> [[76]] #> + 2/100 vertices, from bc22543: #> [1] 63 78 #> #> [[77]] #> + 2/100 vertices, from bc22543: #> [1] 63 77 #> #> [[78]] #> + 2/100 vertices, from bc22543: #> [1] 63 19 #> #> [[79]] #> + 2/100 vertices, from bc22543: #> [1] 65 20 #> #> [[80]] #> + 2/100 vertices, from bc22543: #> [1] 65 16 #> #> [[81]] #> + 2/100 vertices, from bc22543: #> [1] 66 15 #> #> [[82]] #> + 2/100 vertices, from bc22543: #> [1] 66 13 #> #> [[83]] #> + 2/100 vertices, from bc22543: #> [1] 67 30 #> #> [[84]] #> + 2/100 vertices, from bc22543: #> [1] 67 16 #> #> [[85]] #> + 2/100 vertices, from bc22543: #> [1] 68 92 #> #> [[86]] #> + 2/100 vertices, from bc22543: #> [1] 68 85 #> #> [[87]] #> + 2/100 vertices, from bc22543: #> [1] 68 24 #> #> [[88]] #> + 2/100 vertices, from bc22543: #> [1] 68 2 #> #> [[89]] #> + 2/100 vertices, from bc22543: #> [1] 69 7 #> #> [[90]] #> + 2/100 vertices, from bc22543: #> [1] 71 87 #> #> [[91]] #> + 2/100 vertices, from bc22543: #> [1] 71 13 #> #> [[92]] #> + 2/100 vertices, from bc22543: #> [1] 71 11 #> #> [[93]] #> + 2/100 vertices, from bc22543: #> [1] 72 88 #> #> [[94]] #> + 2/100 vertices, from bc22543: #> [1] 72 78 #> #> [[95]] #> + 2/100 vertices, from bc22543: #> [1] 72 9 #> #> [[96]] #> + 2/100 vertices, from bc22543: #> [1] 74 84 #> #> [[97]] #> + 2/100 vertices, from bc22543: #> [1] 74 26 #> #> [[98]] #> + 2/100 vertices, from bc22543: #> [1] 75 90 #> #> [[99]] #> + 2/100 vertices, from bc22543: #> [1] 75 26 #> #> [[100]] #> + 2/100 vertices, from bc22543: #> [1] 76 87 #> #> [[101]] #> + 2/100 vertices, from bc22543: #> [1] 77 90 #> #> [[102]] #> + 2/100 vertices, from bc22543: #> [1] 77 87 #> #> [[103]] #> + 2/100 vertices, from bc22543: #> [1] 77 29 #> #> [[104]] #> + 2/100 vertices, from bc22543: #> [1] 77 9 #> #> [[105]] #> + 2/100 vertices, from bc22543: #> [1] 78 92 #> #> [[106]] #> + 2/100 vertices, from bc22543: #> [1] 78 13 #> #> [[107]] #> + 2/100 vertices, from bc22543: #> [1] 78 7 #> #> [[108]] #> + 3/100 vertices, from bc22543: #> [1] 81 17 84 #> #> [[109]] #> + 2/100 vertices, from bc22543: #> [1] 81 5 #> #> [[110]] #> + 2/100 vertices, from bc22543: #> [1] 82 86 #> #> [[111]] #> + 2/100 vertices, from bc22543: #> [1] 82 19 #> #> [[112]] #> + 2/100 vertices, from bc22543: #> [1] 83 22 #> #> [[113]] #> + 2/100 vertices, from bc22543: #> [1] 83 13 #> #> [[114]] #> + 2/100 vertices, from bc22543: #> [1] 84 97 #> #> [[115]] #> + 2/100 vertices, from bc22543: #> [1] 84 24 #> #> [[116]] #> + 2/100 vertices, from bc22543: #> [1] 84 22 #> #> [[117]] #> + 2/100 vertices, from bc22543: #> [1] 84 14 #> #> [[118]] #> + 2/100 vertices, from bc22543: #> [1] 85 26 #> #> [[119]] #> + 2/100 vertices, from bc22543: #> [1] 86 92 #> #> [[120]] #> + 2/100 vertices, from bc22543: #> [1] 86 90 #> #> [[121]] #> + 2/100 vertices, from bc22543: #> [1] 87 15 #> #> [[122]] #> + 2/100 vertices, from bc22543: #> [1] 90 94 #> #> [[123]] #> + 2/100 vertices, from bc22543: #> [1] 90 22 #> #> [[124]] #> + 2/100 vertices, from bc22543: #> [1] 91 14 #> #> [[125]] #> + 2/100 vertices, from bc22543: #> [1] 91 13 #> #> [[126]] #> + 2/100 vertices, from bc22543: #> [1] 94 98 #> #> [[127]] #> + 2/100 vertices, from bc22543: #> [1] 94 17 #> #> [[128]] #> + 2/100 vertices, from bc22543: #> [1] 95 26 #> #> [[129]] #> + 2/100 vertices, from bc22543: #> [1] 97 23 #> #> [[130]] #> + 2/100 vertices, from bc22543: #> [1] 98 23 #> #> [[131]] #> + 2/100 vertices, from bc22543: #> [1] 98 5 #> #> [[132]] #> + 3/100 vertices, from bc22543: #> [1] 2 13 26 #> #> [[133]] #> + 2/100 vertices, from bc22543: #> [1] 3 26 #> #> [[134]] #> + 2/100 vertices, from bc22543: #> [1] 6 26 #> #> [[135]] #> + 2/100 vertices, from bc22543: #> [1] 6 14 #> #> [[136]] #> + 2/100 vertices, from bc22543: #> [1] 10 31 #> #> [[137]] #> + 2/100 vertices, from bc22543: #> [1] 10 11 #> #> [[138]] #> + 2/100 vertices, from bc22543: #> [1] 15 30 #> #> [[139]] #> + 2/100 vertices, from bc22543: #> [1] 16 26 #> #> [[140]] #> + 2/100 vertices, from bc22543: #> [1] 18 20 #> #> [[141]] #> + 2/100 vertices, from bc22543: #> [1] 19 23 #>"},{"path":"https://r.igraph.org/reference/closeness.html","id":null,"dir":"Reference","previous_headings":"","what":"Closeness centrality of vertices — closeness","title":"Closeness centrality of vertices — closeness","text":"Closeness centrality measures many steps required access every vertex given vertex.","code":""},{"path":"https://r.igraph.org/reference/closeness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Closeness centrality of vertices — closeness","text":"","code":"closeness( graph, vids = V(graph), mode = c(\"out\", \"in\", \"all\", \"total\"), weights = NULL, normalized = FALSE, cutoff = -1 )"},{"path":"https://r.igraph.org/reference/closeness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Closeness centrality of vertices — closeness","text":"graph graph analyze. vids vertices closeness calculated. mode Character string, defined types paths used measuring distance directed graphs. “” measures paths vertex, “” measures paths vertex, uses undirected paths. argument ignored undirected graphs. weights Optional positive weight vector calculating weighted closeness. graph weight edge attribute, used default. Weights used calculating weighted shortest paths, interpreted distances. normalized Logical scalar, whether calculate normalized closeness, .e. inverse average distance reachable vertices. non-normalized closeness inverse sum distances reachable vertices. cutoff maximum path length consider calculating closeness. zero negative limit.","code":""},{"path":"https://r.igraph.org/reference/closeness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Closeness centrality of vertices — closeness","text":"Numeric vector closeness values vertices v.","code":""},{"path":"https://r.igraph.org/reference/closeness.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Closeness centrality of vertices — closeness","text":"closeness centrality vertex defined inverse sum distances vertices graph: $$\\frac{1}{\\sum_{\\ne v} d_{vi}}$$ (directed) path vertex v , omitted calculation. vertices reachable v, closeness returned NaN. cutoff smaller. can run larger graphs, running time quadratic (cutoff small). cutoff negative (default), function calculates exact closeness scores. Since igraph 1.6.0, cutoff value zero treated literally, .e. path length greater zero ignored. Closeness centrality meaningful connected graphs. disconnected graphs, consider using harmonic centrality harmonic_centrality()","code":""},{"path":"https://r.igraph.org/reference/closeness.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Closeness centrality of vertices — closeness","text":"Freeman, L.C. (1979). Centrality Social Networks : Conceptual Clarification. Social Networks, 1, 215-239.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/closeness.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Closeness centrality of vertices — closeness","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/closeness.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Closeness centrality of vertices — closeness","text":"","code":"g <- make_ring(10) g2 <- make_star(10) closeness(g) #> [1] 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 closeness(g2, mode = \"in\") #> [1] 0.1111111 NaN NaN NaN NaN NaN NaN #> [8] NaN NaN NaN closeness(g2, mode = \"out\") #> [1] NaN 1 1 1 1 1 1 1 1 1 closeness(g2, mode = \"all\") #> [1] 0.11111111 0.05882353 0.05882353 0.05882353 0.05882353 0.05882353 #> [7] 0.05882353 0.05882353 0.05882353 0.05882353"},{"path":"https://r.igraph.org/reference/cluster.distribution.html","id":null,"dir":"Reference","previous_headings":"","what":"Connected components of a graph — cluster.distribution","title":"Connected components of a graph — cluster.distribution","text":"cluster.distribution() renamed component_distribution() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/cluster.distribution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connected components of a graph — cluster.distribution","text":"","code":"cluster.distribution(graph, cumulative = FALSE, mul.size = FALSE, ...)"},{"path":"https://r.igraph.org/reference/cluster.distribution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connected components of a graph — cluster.distribution","text":"graph graph analyze. cumulative Logical, TRUE cumulative distirubution (relative frequency) calculated. mul.size Logical. TRUE relative frequencies multiplied cluster sizes. ... Additional attributes pass cluster, right now mode makes sense.","code":""},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure detection based on edge betweenness — cluster_edge_betweenness","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"Many networks consist modules densely connected sparsely connected modules.","code":""},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"","code":"cluster_edge_betweenness( graph, weights = NULL, directed = TRUE, edge.betweenness = TRUE, merges = TRUE, bridges = TRUE, modularity = TRUE, membership = TRUE )"},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"graph graph analyze. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. Edge weights used calculate weighted edge betweenness. means edges interpreted distances, connection strengths. directed Logical constant, whether calculate directed edge betweenness directed graphs. ignored undirected graphs. edge.betweenness Logical constant, whether return edge betweenness edges time removal. merges Logical constant, whether return merge matrix representing hierarchical community structure network. argument called merges, even community structure algorithm divisive agglomerative: builds tree top bottom. one line merge (.e. split) matrix, first line first merge (last split). communities identified integer number starting one. Community ids smaller equal \\(N\\), number vertices graph, belong singleton communities, .e. individual vertices. first merge \\(N\\) communities numbered one \\(N\\). first merge, first line matrix creates community \\(N+1\\), second merge creates community \\(N+2\\), etc. bridges Logical constant, whether return list edge removals actually splitted component graph. modularity Logical constant, whether calculate maximum modularity score, considering possibly community structures along edge-betweenness based edge removals. membership Logical constant, whether calculate membership vector corresponding highest possible modularity score.","code":""},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"cluster_edge_betweenness() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"edge betweenness score edge measures number shortest paths , see edge_betweenness() details. idea edge betweenness based community structure detection likely edges connecting separate modules high edge betweenness shortest paths one module another must traverse . gradually remove edge highest edge betweenness score get hierarchical map, rooted tree, called dendrogram graph. leafs tree individual vertices root tree represents whole graph. cluster_edge_betweenness() performs algorithm calculating edge betweenness graph, removing edge highest edge betweenness score, recalculating edge betweenness edges removing one highest score, etc. edge.betweeness.community returns various information collected run algorithm. See return value .","code":""},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"M Newman M Girvan: Finding evaluating community structure networks, Physical Review E 69, 026113 (2004)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/cluster_edge_betweenness.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community structure detection based on edge betweenness — cluster_edge_betweenness","text":"","code":"g <- sample_pa(100, m = 2, directed = FALSE) eb <- cluster_edge_betweenness(g) g <- make_full_graph(10) %du% make_full_graph(10) g <- add_edges(g, c(1, 11)) eb <- cluster_edge_betweenness(g) eb #> IGRAPH clustering edge betweenness, groups: 2, mod: 0.49 #> + groups: #> $`1` #> [1] 1 2 3 4 5 6 7 8 9 10 #> #> $`2` #> [1] 11 12 13 14 15 16 17 18 19 20 #>"},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure via greedy optimization of modularity — cluster_fast_greedy","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"function tries find dense subgraph, also called communities graphs via directly optimizing modularity score.","code":""},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"","code":"cluster_fast_greedy( graph, merges = TRUE, modularity = TRUE, membership = TRUE, weights = NULL )"},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"graph input graph merges Logical scalar, whether return merge matrix. modularity Logical scalar, whether return vector containing modularity merge. membership Logical scalar, whether calculate membership vector corresponding maximum modularity score, considering possible community structures along merges. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function.","code":""},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"cluster_fast_greedy() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"function implements fast greedy modularity optimization algorithm finding community structure, see Clauset, MEJ Newman, C Moore: Finding community structure large networks, http://www.arxiv.org/abs/cond-mat/0408187 details.","code":""},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"Clauset, MEJ Newman, C Moore: Finding community structure large networks, http://www.arxiv.org/abs/cond-mat/0408187","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com R interface.","code":""},{"path":"https://r.igraph.org/reference/cluster_fast_greedy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community structure via greedy optimization of modularity — cluster_fast_greedy","text":"","code":"g <- make_full_graph(5) %du% make_full_graph(5) %du% make_full_graph(5) g <- add_edges(g, c(1, 6, 1, 11, 6, 11)) fc <- cluster_fast_greedy(g) membership(fc) #> [1] 3 3 3 3 3 1 1 1 1 1 2 2 2 2 2 sizes(fc) #> Community sizes #> 1 2 3 #> 5 5 5"},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":null,"dir":"Reference","previous_headings":"","what":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"algorithm detects communities based simple idea several fluids interacting non-homogeneous environment (graph topology), expanding contracting based interaction density.","code":""},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"","code":"cluster_fluid_communities(graph, no.of.communities)"},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"graph input graph. graph must simple connected. Empty graphs supported well single vertex graphs. Edge directions ignored. Weights considered. ..communities number communities found. Must greater 0 fewer number vertices graph.","code":""},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"cluster_fluid_communities() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"Parés F, Gasulla DG, et. al. (2018) Fluid Communities: Competitive, Scalable Diverse Community Detection Algorithm. : Complex Networks & Applications VI: Proceedings Complex Networks 2017 (Sixth International Conference Complex Networks Applications), Springer, vol 689, p 229, doi: 10.1007/978-3-319-72150-7_19","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"Ferran Parés","code":""},{"path":"https://r.igraph.org/reference/cluster_fluid_communities.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community detection algorithm based on interacting fluids — cluster_fluid_communities","text":"","code":"g <- make_graph(\"Zachary\") comms <- cluster_fluid_communities(g, 2)"},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":null,"dir":"Reference","previous_headings":"","what":"Infomap community finding — cluster_infomap","title":"Infomap community finding — cluster_infomap","text":"Find community structure minimizes expected description length random walker trajectory. graph directed, edge directions taken account.","code":""},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Infomap community finding — cluster_infomap","text":"","code":"cluster_infomap( graph, e.weights = NULL, v.weights = NULL, nb.trials = 10, modularity = TRUE )"},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Infomap community finding — cluster_infomap","text":"graph input graph. Edge directions taken account. e.weights NULL, numeric vector edge weights. length must match number edges graph. default ‘weight’ edge attribute used weights. present, edges considered weight. Larger edge weights correspond stronger connections. v.weights NULL, numeric vector vertex weights. length must match number vertices graph. default ‘weight’ vertex attribute used weights. present, vertices considered weight. larger vertex weight means larger probability random surfer jumps vertex. nb.trials number attempts partition network (can integer value equal larger 1). modularity Logical scalar, whether calculate modularity score detected community structure.","code":""},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Infomap community finding — cluster_infomap","text":"cluster_infomap() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Infomap community finding — cluster_infomap","text":"Please see details method references given .","code":""},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Infomap community finding — cluster_infomap","text":"original paper: M. Rosvall C. T. Bergstrom, Maps information flow reveal community structure complex networks, PNAS 105, 1118 (2008) doi:10.1073/pnas.0706851105 , https://arxiv.org/abs/0707.0609 detailed paper: M. Rosvall, D. Axelsson, C. T. Bergstrom, map equation, Eur. Phys. J. Special Topics 178, 13 (2009). doi:10.1140/epjst/e2010-01179-1 , https://arxiv.org/abs/0906.1405.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Infomap community finding — cluster_infomap","text":"Martin Rosvall wrote original C++ code. ported igraph-like Emmanuel Navarro. R interface cosmetics done Gabor Csardi csardi.gabor@gmail.com.","code":""},{"path":"https://r.igraph.org/reference/cluster_infomap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Infomap community finding — cluster_infomap","text":"","code":"## Zachary's karate club g <- make_graph(\"Zachary\") imc <- cluster_infomap(g) membership(imc) #> [1] 1 1 1 1 2 2 2 1 3 1 2 1 1 1 3 3 2 1 3 1 3 1 3 3 3 3 3 3 3 3 3 3 3 3 communities(imc) #> $`1` #> [1] 1 2 3 4 8 10 12 13 14 18 20 22 #> #> $`2` #> [1] 5 6 7 11 17 #> #> $`3` #> [1] 9 15 16 19 21 23 24 25 26 27 28 29 30 31 32 33 34 #>"},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding communities based on propagating labels — cluster_label_prop","title":"Finding communities based on propagating labels — cluster_label_prop","text":"fast, nearly linear time algorithm detecting community structure networks. works labeling vertices unique labels updating labels majority voting neighborhood vertex.","code":""},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding communities based on propagating labels — cluster_label_prop","text":"","code":"cluster_label_prop( graph, weights = NULL, ..., mode = c(\"out\", \"in\", \"all\"), initial = NULL, fixed = NULL )"},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding communities based on propagating labels — cluster_label_prop","text":"graph input graph. Note algorithm wsa originally defined undirected graphs. advised set ‘mode’ pass directed graph treat undirected. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. ... dots future extensions must empty. mode Logical, whether consider edge directions label propagation, , direction labels propagate. Ignored undirected graphs. \"\" means ignore edge directions (even directed graphs). \"\" means propagate labels along natural direction edges. \"\" means propagate labels backwards (.e. head tail). initial initial state. NULL, every vertex different label beginning. Otherwise must vector entry vertex. Non-negative values denote different labels, negative entries denote vertices without labels. fixed Logical vector denoting labels fixed. course makes sense provided initial state, otherwise element ignored. Also note vertices without labels fixed.","code":""},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finding communities based on propagating labels — cluster_label_prop","text":"cluster_label_prop() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Finding communities based on propagating labels — cluster_label_prop","text":"function implements community detection method described : Raghavan, U.N. Albert, R. Kumara, S.: Near linear time algorithm detect community structures large-scale networks. Phys Rev E 76, 036106. (2007). version extends original method ability take edge weights consideration also allowing labels fixed. abstract paper: “algorithm every node initialized unique label every step node adopts label neighbors currently . iterative process densely connected groups nodes form consensus unique label form communities.”","code":""},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Finding communities based on propagating labels — cluster_label_prop","text":"Raghavan, U.N. Albert, R. Kumara, S.: Near linear time algorithm detect community structures large-scale networks. Phys Rev E 76, 036106. (2007)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Finding communities based on propagating labels — cluster_label_prop","text":"Tamas Nepusz ntamas@gmail.com C implementation, Gabor Csardi csardi.gabor@gmail.com manual page.","code":""},{"path":"https://r.igraph.org/reference/cluster_label_prop.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Finding communities based on propagating labels — cluster_label_prop","text":"","code":"g <- sample_gnp(10, 5 / 10) %du% sample_gnp(9, 5 / 9) g <- add_edges(g, c(1, 12)) cluster_label_prop(g) #> IGRAPH clustering label propagation, groups: 2, mod: 0.48 #> + groups: #> $`1` #> [1] 1 2 3 4 5 6 7 8 9 10 #> #> $`2` #> [1] 11 12 13 14 15 16 17 18 19 #>"},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"function tries find densely connected subgraphs graph calculating leading non-negative eigenvector modularity matrix graph.","code":""},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"","code":"cluster_leading_eigen( graph, steps = -1, weights = NULL, start = NULL, options = arpack_defaults(), callback = NULL, extra = NULL, env = parent.frame() )"},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"graph input graph. undirected method needs symmetric matrix. steps number steps take, actually number tries make step. particularly useful parameter. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. start NULL, numeric membership vector, giving start configuration algorithm. options named list override ARPACK options. callback NULL, must callback function. called iteration, calculating leading eigenvector modularity matrix. See details . extra Additional argument supply callback function. env environment callback function evaluated.","code":""},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"cluster_leading_eigen() returns named list following members: membership membership vector end algorithm, splits possible. merges merges matrix starting state described membership member. two-column matrix line describes merge two communities, first line first merge creates community ‘N’, N number initial communities graph, second line creates community N+1, etc. options Information underlying ARPACK computation, see arpack() details.","code":""},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"function documented section implements ‘leading eigenvector’ method developed Mark Newman, see reference . heart method definition modularity matrix, B, B=-P, adjacency matrix (undirected) network, P contains probability certain edges present according ‘configuration model’. words, P[,j] element P probability edge vertices j random network degrees vertices input graph. leading eigenvector method works calculating eigenvector modularity matrix largest positive eigenvalue separating vertices two community based sign corresponding element eigenvector. elements eigenvector sign means network underlying comuunity structure. Check Newman's paper understand good method detecting community structure.","code":""},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"callback-functions","dir":"Reference","previous_headings":"","what":"Callback functions","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"callback argument can used supply function called eigenvector calculation. following arguments supplied function: membership actual membership vector, zero-based indexing. community community algorithm just tried split, community numbering starts zero . value eigenvalue belonging leading eigenvector algorithm just found. vector leading eigenvector algorithm just found. multiplier R function can used multiple actual modularity matrix arbitrary vector. Supply vector argument perform multiplication. function can used ARPACK. extra extra argument passed cluster_leading_eigen().","code":""},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"MEJ Newman: Finding community structure using eigenvectors matrices, Physical Review E 74 036104, 2006.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/cluster_leading_eigen.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community structure detecting based on the leading eigenvector of the community matrix — cluster_leading_eigen","text":"","code":"g <- make_full_graph(5) %du% make_full_graph(5) %du% make_full_graph(5) g <- add_edges(g, c(1, 6, 1, 11, 6, 11)) lec <- cluster_leading_eigen(g) lec #> IGRAPH clustering leading eigenvector, groups: 3, mod: 0.58 #> + groups: #> $`1` #> [1] 1 2 3 4 5 #> #> $`2` #> [1] 6 7 8 9 10 #> #> $`3` #> [1] 11 12 13 14 15 #> cluster_leading_eigen(g, start = membership(lec)) #> IGRAPH clustering leading eigenvector, groups: 3, mod: 0.58 #> + groups: #> $`1` #> [1] 1 2 3 4 5 #> #> $`2` #> [1] 6 7 8 9 10 #> #> $`3` #> [1] 11 12 13 14 15 #>"},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"Leiden algorithm similar Louvain algorithm, cluster_louvain(), faster yields higher quality solutions. can optimize modularity Constant Potts Model, suffer resolution-limit (see preprint http://arxiv.org/abs/1104.3083).","code":""},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"","code":"cluster_leiden( graph, objective_function = c(\"CPM\", \"modularity\"), weights = NULL, resolution_parameter = 1, beta = 0.01, initial_membership = NULL, n_iterations = 2, vertex_weights = NULL )"},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"graph input graph, undirected graphs supported. objective_function Whether use Constant Potts Model (CPM) modularity. Must either \"CPM\" \"modularity\". weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. resolution_parameter resolution parameter use. Higher resolutions lead smaller communities, lower resolutions lead fewer larger communities. beta Parameter affecting randomness Leiden algorithm. affects refinement step algorithm. initial_membership provided, Leiden algorithm try improve provided membership. argument provided, aglorithm simply starts singleton partition. n_iterations number iterations iterate Leiden algorithm. iteration may improve partition . vertex_weights vertex weights used Leiden algorithm. provided, automatically determined basis objective_function. Please see details function interpret vertex weights.","code":""},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"cluster_leiden() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"Leiden algorithm consists three phases: (1) local moving nodes, (2) refinement partition (3) aggregation network based refined partition, using non-refined partition create initial partition aggregate network. local move procedure Leiden algorithm, nodes whose neighborhood changed visited. refinement done restarting singleton partition within cluster gradually merging subclusters. aggregating, single cluster may represented several nodes (subclusters identified refinement). Leiden algorithm provides several guarantees. Leiden algorithm typically iterated: output one iteration used input next iteration. iteration clusters guaranteed connected well-separated. iteration nothing changed, nodes parts guaranteed locally optimally assigned. Finally, asymptotically, subsets clusters guaranteed locally optimally assigned. details, please see Traag, Waltman & van Eck (2019). objective function optimized $$\\frac{1}{2m} \\sum_{ij} (A_{ij} - \\gamma n_i n_j)\\delta(\\sigma_i, \\sigma_j)$$ \\(m\\) total edge weight, \\(A_{ij}\\) weight edge \\((, j)\\), \\(\\gamma\\) -called resolution parameter, \\(n_i\\) node weight node \\(\\), \\(\\sigma_i\\) cluster node \\(\\) \\(\\delta(x, y) = 1\\) \\(x = y\\) \\(0\\) otherwise. setting \\(n_i = k_i\\), degree node \\(\\), dividing \\(\\gamma\\) \\(2m\\), effectively obtain expression modularity. Hence, standard modularity optimized supply degrees vertex_weights supplying resolution parameter \\(\\frac{1}{2m}\\), \\(m\\) number edges. specify vertex_weights, correct vertex weights scaling \\(\\gamma\\) determined automatically objective_function argument.","code":""},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"Traag, V. ., Waltman, L., & van Eck, N. J. (2019). Louvain Leiden: guaranteeing well-connected communities. Scientific reports, 9(1), 5233. doi: 10.1038/s41598-019-41695-z, arXiv:1810.08473v3 [cs.SI]","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"Vincent Traag","code":""},{"path":"https://r.igraph.org/reference/cluster_leiden.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Finding community structure of a graph using the Leiden algorithm of Traag, van Eck & Waltman. — cluster_leiden","text":"","code":"g <- make_graph(\"Zachary\") # By default CPM is used r <- quantile(strength(g))[2] / (gorder(g) - 1) # Set seed for sake of reproducibility set.seed(1) ldc <- cluster_leiden(g, resolution_parameter = r) print(ldc) #> IGRAPH clustering leiden, groups: 2, mod: NA #> + groups: #> $`1` #> [1] 1 2 3 4 5 6 7 8 10 11 12 13 14 17 18 20 22 #> #> $`2` #> [1] 9 15 16 19 21 23 24 25 26 27 28 29 30 31 32 33 34 #> plot(ldc, g)"},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding community structure by multi-level optimization of modularity — cluster_louvain","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"function implements multi-level modularity optimization algorithm finding community structure, see references . based modularity measure hierarchical approach.","code":""},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"","code":"cluster_louvain(graph, weights = NULL, resolution = 1)"},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"graph input graph. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. resolution Optional resolution parameter allows user adjust resolution parameter modularity function algorithm uses internally. Lower values typically yield fewer, larger clusters. original definition modularity recovered resolution parameter set 1.","code":""},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"cluster_louvain() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"function implements multi-level modularity optimization algorithm finding community structure, see VD Blondel, J-L Guillaume, R Lambiotte E Lefebvre: Fast unfolding community hierarchies large networks, https://arxiv.org/abs/0803.0476 details. based modularity measure hierarchical approach. Initially, vertex assigned community . every step, vertices re-assigned communities local, greedy way: vertex moved community achieves highest contribution modularity. vertices can reassigned, community considered vertex , process starts merged communities. process stops single vertex left modularity increased step. Since igraph 1.3, vertices processed random order. function contributed Tom Gregorovic.","code":""},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"Vincent D. Blondel, Jean-Loup Guillaume, Renaud Lambiotte, Etienne Lefebvre: Fast unfolding communities large networks. J. Stat. Mech. (2008) P10008","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"Tom Gregorovic, Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/cluster_louvain.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Finding community structure by multi-level optimization of modularity — cluster_louvain","text":"","code":"# This is so simple that we will have only one level g <- make_full_graph(5) %du% make_full_graph(5) %du% make_full_graph(5) g <- add_edges(g, c(1, 6, 1, 11, 6, 11)) cluster_louvain(g) #> IGRAPH clustering multi level, groups: 3, mod: 0.58 #> + groups: #> $`1` #> [1] 1 2 3 4 5 #> #> $`2` #> [1] 6 7 8 9 10 #> #> $`3` #> [1] 11 12 13 14 15 #>"},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":null,"dir":"Reference","previous_headings":"","what":"Optimal community structure — cluster_optimal","title":"Optimal community structure — cluster_optimal","text":"function calculates optimal community structure graph, maximizing modularity measure possible partitions.","code":""},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Optimal community structure — cluster_optimal","text":"","code":"cluster_optimal(graph, weights = NULL)"},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Optimal community structure — cluster_optimal","text":"graph input graph. Edge directions ignored directed graphs. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function.","code":""},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Optimal community structure — cluster_optimal","text":"cluster_optimal() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Optimal community structure — cluster_optimal","text":"function calculates optimal community structure graph, terms maximal modularity score. calculation done transforming modularity maximization integer programming problem, calling GLPK library solve . Please reference details. Note modularity optimization NP-complete problem, known algorithms exponential time complexity. means probably want run function larger graphs. Graphs fifty vertices fine, graphs couple hundred vertices might possible.","code":""},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Optimal community structure — cluster_optimal","text":"","code":"## Zachary's karate club g <- make_graph(\"Zachary\") ## We put everything into a big 'try' block, in case ## igraph was compiled without GLPK support ## The calculation only takes a couple of seconds oc <- cluster_optimal(g) ## Double check the result print(modularity(oc)) print(modularity(g, membership(oc))) ## Compare to the greedy optimizer fc <- cluster_fast_greedy(g) print(modularity(fc))"},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Optimal community structure — cluster_optimal","text":"Ulrik Brandes, Daniel Delling, Marco Gaertler, Robert Gorke, Martin Hoefer, Zoran Nikoloski, Dorothea Wagner: Modularity Clustering, IEEE Transactions Knowledge Data Engineering 20(2):172-188, 2008.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_optimal.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Optimal community structure — cluster_optimal","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"function tries find communities graphs via spin-glass model simulated annealing.","code":""},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"","code":"cluster_spinglass( graph, weights = NULL, vertex = NULL, spins = 25, parupdate = FALSE, start.temp = 1, stop.temp = 0.01, cool.fact = 0.99, update.rule = c(\"config\", \"random\", \"simple\"), gamma = 1, implementation = c(\"orig\", \"neg\"), gamma.minus = 1 )"},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"graph input graph, can directed direction edges neglected. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. vertex parameter can used calculate community given vertex without calculating communities. Note argument present arguments ignored. spins Integer constant, number spins use. upper limit number communities. problem supply (reasonably) big number , case spin states unpopulated. parupdate Logical constant, whether update spins vertices parallel (synchronously) . argument ignored second form function used (.e. ‘vertex’ argument present). also implemented “neg” implementation. start.temp Real constant, start temperature. argument ignored second form function used (.e. ‘vertex’ argument present). stop.temp Real constant, stop temperature. simulation terminates temperature lowers level. argument ignored second form function used (.e. ‘vertex’ argument present). cool.fact Cooling factor simulated annealing. argument ignored second form function used (.e. ‘vertex’ argument present). update.rule Character constant giving ‘null-model’ simulation. Possible values: “simple” “config”. “simple” uses random graph number edges baseline probability “config” uses random graph vertex degrees input graph. gamma Real constant, gamma argument algorithm. specifies balance importance present non-present edges community. Roughly, comunity set vertices many edges inside community edges outside community. default 1.0 value makes existing non-existing links equally important. Smaller values make existing links, greater values missing links important. implementation Character scalar. Currently igraph contains two implementations Spin-glass community finding algorithm. faster original implementation default. implementation, takes account negative weights, can chosen supplying ‘neg’ . gamma.minus Real constant, gamma.minus parameter algorithm. specifies balance importance present non-present negative weighted edges community. Smaller values gamma.minus, leads communities lesser negative intra-connectivity. argument set zero, algorithm reduces graph coloring algorithm, using number spins number colors. argument ignored ‘orig’ implementation chosen.","code":""},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"vertex argument given, .e. first form used cluster_spinglass() returns communities() object. vertex argument present, .e. second form used named list returned following components: community Numeric vector giving ids vertices community vertex. cohesion cohesion score result, see references. adhesion adhesion score result, see references. inner.links number edges within community vertex. outer.links number edges community vertex rest graph.","code":""},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"function tries find communities graph. community set nodes many edges inside community edges outside (.e. community rest graph.) idea reversed edges negative weight, .e. negative edges inside community many negative edges communities. Note ‘neg’ implementation supports negative edge weights. spinglass.cummunity function can solve two problems related community detection. vertex argument given (NULL), regular community detection problem solved (approximately), .e. partitioning vertices communities, optimizing energy function. vertex argument given NULL, must vertex id, energy function used find community given vertex. See also examples .","code":""},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"J. Reichardt S. Bornholdt: Statistical Mechanics Community Detection, Phys. Rev. E, 74, 016110 (2006), https://arxiv.org/abs/cond-mat/0603718 M. E. J. Newman M. Girvan: Finding evaluating community structure networks, Phys. Rev. E 69, 026113 (2004) V.. Traag Jeroen Bruggeman: Community detection networks positive negative links, https://arxiv.org/abs/0811.2329 (2008).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"Jorg Reichardt original code Gabor Csardi csardi.gabor@gmail.com igraph glue code. Changes original function including possibility negative ties implemented Vincent Traag (https://www.traag.net/).","code":""},{"path":"https://r.igraph.org/reference/cluster_spinglass.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Finding communities in graphs based on statistical meachanics — cluster_spinglass","text":"","code":"g <- sample_gnp(10, 5 / 10) %du% sample_gnp(9, 5 / 9) g <- add_edges(g, c(1, 12)) g <- induced_subgraph(g, subcomponent(g, 1)) cluster_spinglass(g, spins = 2) #> IGRAPH clustering spinglass, groups: 2, mod: 0.47 #> + groups: #> $`1` #> [1] 11 12 13 14 15 16 17 18 19 #> #> $`2` #> [1] 1 2 3 4 5 6 7 8 9 10 #> cluster_spinglass(g, vertex = 1) #> $community #> [1] 1 3 4 6 7 10 9 8 5 2 #> #> $cohesion #> [1] 8.940789 #> #> $adhesion #> [1] -17.88158 #> #> $inner.links #> [1] 20 #> #> $outer.links #> [1] 1 #>"},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure via short random walks — cluster_walktrap","title":"Community structure via short random walks — cluster_walktrap","text":"function tries find densely connected subgraphs, also called communities graph via random walks. idea short random walks tend stay community.","code":""},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure via short random walks — cluster_walktrap","text":"","code":"cluster_walktrap( graph, weights = NULL, steps = 4, merges = TRUE, modularity = TRUE, membership = TRUE )"},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure via short random walks — cluster_walktrap","text":"graph input graph, edge directions ignored directed graphs. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. Larger edge weights increase probability edge selected random walker. words, larger edge weights correspond stronger connections. steps length random walks perform. merges Logical scalar, whether include merge matrix result. modularity Logical scalar, whether include vector modularity scores result. membership argument true, always calculated. membership Logical scalar, whether calculate membership vector split corresponding highest modularity value.","code":""},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Community structure via short random walks — cluster_walktrap","text":"cluster_walktrap() returns communities() object, please see communities() manual page details.","code":""},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Community structure via short random walks — cluster_walktrap","text":"function implementation Walktrap community finding algorithm, see Pascal Pons, Matthieu Latapy: Computing communities large networks using random walks, https://arxiv.org/abs/physics/0512106","code":""},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Community structure via short random walks — cluster_walktrap","text":"Pascal Pons, Matthieu Latapy: Computing communities large networks using random walks, https://arxiv.org/abs/physics/0512106","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community structure via short random walks — cluster_walktrap","text":"Pascal Pons (http://psl.pons.free.fr/) Gabor Csardi csardi.gabor@gmail.com R igraph interface","code":""},{"path":"https://r.igraph.org/reference/cluster_walktrap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community structure via short random walks — cluster_walktrap","text":"","code":"g <- make_full_graph(5) %du% make_full_graph(5) %du% make_full_graph(5) g <- add_edges(g, c(1, 6, 1, 11, 6, 11)) cluster_walktrap(g) #> IGRAPH clustering walktrap, groups: 3, mod: 0.58 #> + groups: #> $`1` #> [1] 11 12 13 14 15 #> #> $`2` #> [1] 6 7 8 9 10 #> #> $`3` #> [1] 1 2 3 4 5 #>"},{"path":"https://r.igraph.org/reference/clusters.html","id":null,"dir":"Reference","previous_headings":"","what":"Connected components of a graph — clusters","title":"Connected components of a graph — clusters","text":"clusters() renamed components() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/clusters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connected components of a graph — clusters","text":"","code":"clusters(graph, mode = c(\"weak\", \"strong\"))"},{"path":"https://r.igraph.org/reference/clusters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connected components of a graph — clusters","text":"graph graph analyze. mode Character string, either “weak” “strong”. directed graphs “weak” implies weakly, “strong” strongly connected components search. ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/cocitation.html","id":null,"dir":"Reference","previous_headings":"","what":"Cocitation coupling — cocitation","title":"Cocitation coupling — cocitation","text":"Two vertices cocited another vertex citing . cocitation() simply counts many types two vertices cocited. bibliographic coupling two vertices number vertices cite, bibcoupling() calculates .","code":""},{"path":"https://r.igraph.org/reference/cocitation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cocitation coupling — cocitation","text":"","code":"cocitation(graph, v = V(graph)) bibcoupling(graph, v = V(graph))"},{"path":"https://r.igraph.org/reference/cocitation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cocitation coupling — cocitation","text":"graph graph object analyze v Vertex sequence numeric vector, vertex ids cocitation bibliographic coupling values want calculate. default vertices.","code":""},{"path":"https://r.igraph.org/reference/cocitation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cocitation coupling — cocitation","text":"numeric matrix length(v) lines vcount(graph) columns. Element (,j) contains cocitation bibliographic coupling vertices v[] j.","code":""},{"path":"https://r.igraph.org/reference/cocitation.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cocitation coupling — cocitation","text":"cocitation() calculates cocitation counts vertices v argument vertices graph. bibcoupling() calculates bibliographic coupling vertices v vertices graph. Calculating cocitation bibliographic coupling one vertex costs amount computation vertices. might change future.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cocitation.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cocitation coupling — cocitation","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/cocitation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cocitation coupling — cocitation","text":"","code":"g <- make_kautz_graph(2, 3) cocitation(g) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 0 2 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 2 0 0 0 0 0 0 0 0 0 0 0 0 #> [3,] 0 0 0 2 0 0 0 0 0 0 0 0 0 #> [4,] 0 0 2 0 0 0 0 0 0 0 0 0 0 #> [5,] 0 0 0 0 0 2 0 0 0 0 0 0 0 #> [6,] 0 0 0 0 2 0 0 0 0 0 0 0 0 #> [7,] 0 0 0 0 0 0 0 2 0 0 0 0 0 #> [8,] 0 0 0 0 0 0 2 0 0 0 0 0 0 #> [9,] 0 0 0 0 0 0 0 0 0 2 0 0 0 #> [10,] 0 0 0 0 0 0 0 0 2 0 0 0 0 #> [11,] 0 0 0 0 0 0 0 0 0 0 0 2 0 #> [12,] 0 0 0 0 0 0 0 0 0 0 2 0 0 #> [13,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [14,] 0 0 0 0 0 0 0 0 0 0 0 0 2 #> [15,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [16,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [17,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [18,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [19,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [20,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [21,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [22,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [23,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [24,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 0 0 0 0 0 0 0 0 0 #> [3,] 0 0 0 0 0 0 0 0 0 0 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 #> [5,] 0 0 0 0 0 0 0 0 0 0 0 #> [6,] 0 0 0 0 0 0 0 0 0 0 0 #> [7,] 0 0 0 0 0 0 0 0 0 0 0 #> [8,] 0 0 0 0 0 0 0 0 0 0 0 #> [9,] 0 0 0 0 0 0 0 0 0 0 0 #> [10,] 0 0 0 0 0 0 0 0 0 0 0 #> [11,] 0 0 0 0 0 0 0 0 0 0 0 #> [12,] 0 0 0 0 0 0 0 0 0 0 0 #> [13,] 2 0 0 0 0 0 0 0 0 0 0 #> [14,] 0 0 0 0 0 0 0 0 0 0 0 #> [15,] 0 0 2 0 0 0 0 0 0 0 0 #> [16,] 0 2 0 0 0 0 0 0 0 0 0 #> [17,] 0 0 0 0 2 0 0 0 0 0 0 #> [18,] 0 0 0 2 0 0 0 0 0 0 0 #> [19,] 0 0 0 0 0 0 2 0 0 0 0 #> [20,] 0 0 0 0 0 2 0 0 0 0 0 #> [21,] 0 0 0 0 0 0 0 0 2 0 0 #> [22,] 0 0 0 0 0 0 0 2 0 0 0 #> [23,] 0 0 0 0 0 0 0 0 0 0 2 #> [24,] 0 0 0 0 0 0 0 0 0 2 0 bibcoupling(g) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [3,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [5,] 0 0 0 0 0 0 0 0 0 0 0 0 2 #> [6,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [7,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [8,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [9,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [10,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [11,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [12,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [13,] 0 0 0 0 2 0 0 0 0 0 0 0 0 #> [14,] 0 0 0 0 0 2 0 0 0 0 0 0 0 #> [15,] 0 0 0 0 0 0 2 0 0 0 0 0 0 #> [16,] 0 0 0 0 0 0 0 2 0 0 0 0 0 #> [17,] 0 0 0 0 0 0 0 0 2 0 0 0 0 #> [18,] 0 0 0 0 0 0 0 0 0 2 0 0 0 #> [19,] 0 0 0 0 0 0 0 0 0 0 2 0 0 #> [20,] 0 0 0 0 0 0 0 0 0 0 0 2 0 #> [21,] 2 0 0 0 0 0 0 0 0 0 0 0 0 #> [22,] 0 2 0 0 0 0 0 0 0 0 0 0 0 #> [23,] 0 0 2 0 0 0 0 0 0 0 0 0 0 #> [24,] 0 0 0 2 0 0 0 0 0 0 0 0 0 #> [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] #> [1,] 0 0 0 0 0 0 0 2 0 0 0 #> [2,] 0 0 0 0 0 0 0 0 2 0 0 #> [3,] 0 0 0 0 0 0 0 0 0 2 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 2 #> [5,] 0 0 0 0 0 0 0 0 0 0 0 #> [6,] 2 0 0 0 0 0 0 0 0 0 0 #> [7,] 0 2 0 0 0 0 0 0 0 0 0 #> [8,] 0 0 2 0 0 0 0 0 0 0 0 #> [9,] 0 0 0 2 0 0 0 0 0 0 0 #> [10,] 0 0 0 0 2 0 0 0 0 0 0 #> [11,] 0 0 0 0 0 2 0 0 0 0 0 #> [12,] 0 0 0 0 0 0 2 0 0 0 0 #> [13,] 0 0 0 0 0 0 0 0 0 0 0 #> [14,] 0 0 0 0 0 0 0 0 0 0 0 #> [15,] 0 0 0 0 0 0 0 0 0 0 0 #> [16,] 0 0 0 0 0 0 0 0 0 0 0 #> [17,] 0 0 0 0 0 0 0 0 0 0 0 #> [18,] 0 0 0 0 0 0 0 0 0 0 0 #> [19,] 0 0 0 0 0 0 0 0 0 0 0 #> [20,] 0 0 0 0 0 0 0 0 0 0 0 #> [21,] 0 0 0 0 0 0 0 0 0 0 0 #> [22,] 0 0 0 0 0 0 0 0 0 0 0 #> [23,] 0 0 0 0 0 0 0 0 0 0 0 #> [24,] 0 0 0 0 0 0 0 0 0 0 0"},{"path":"https://r.igraph.org/reference/code.length.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to deal with the result of network community detection — code.length","title":"Functions to deal with the result of network community detection — code.length","text":"code.length() renamed code_len() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/code.length.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to deal with the result of network community detection — code.length","text":"","code":"code.length(communities)"},{"path":"https://r.igraph.org/reference/cohesive.blocks.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Cohesive Blocks — cohesive.blocks","title":"Calculate Cohesive Blocks — cohesive.blocks","text":"cohesive.blocks() renamed cohesive_blocks() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/cohesive.blocks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Cohesive Blocks — cohesive.blocks","text":"","code":"cohesive.blocks(graph, labels = TRUE)"},{"path":"https://r.igraph.org/reference/cohesive.blocks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Cohesive Blocks — cohesive.blocks","text":"graph cohesive_blocks() graph object class igraph. must undirected simple. (See is_simple().) graphs_from_cohesive_blocks() export_pajek() graph must supplied whose cohesive block structure given blocks() argument. labels Logical scalar, whether add vertex labels result object. labels can used reporting plotting cohesive blocks.","code":""},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Cohesive Blocks — cohesive_blocks","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"Calculates cohesive blocks objects class igraph.","code":""},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"","code":"cohesive_blocks(graph, labels = TRUE) # S3 method for class 'cohesiveBlocks' length(x) blocks(blocks) graphs_from_cohesive_blocks(blocks, graph) # S3 method for class 'cohesiveBlocks' cohesion(x, ...) hierarchy(blocks) parent(blocks) # S3 method for class 'cohesiveBlocks' print(x, ...) # S3 method for class 'cohesiveBlocks' summary(object, ...) # S3 method for class 'cohesiveBlocks' plot( x, y, colbar = rainbow(max(cohesion(x)) + 1), col = colbar[max_cohesion(x) + 1], mark.groups = blocks(x)[-1], ... ) plot_hierarchy( blocks, layout = layout_as_tree(hierarchy(blocks), root = 1), ... ) export_pajek(blocks, graph, file, project.file = TRUE) max_cohesion(blocks)"},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"graph cohesive_blocks() graph object class igraph. must undirected simple. (See is_simple().) graphs_from_cohesive_blocks() export_pajek() graph must supplied whose cohesive block structure given blocks() argument. labels Logical scalar, whether add vertex labels result object. labels can used reporting plotting cohesive blocks. blocks, x, object cohesiveBlocks object, created cohesive_blocks() function. ... Additional arguments. plot_hierarchy() plot() pass plot.igraph(). print() summary() ignore . y graph whose cohesive blocks supplied x argument. colbar Color bar vertex colors. length least \\(m+1\\), \\(m\\) maximum cohesion graph. Alternatively, vertex colors can also directly specified via col argument. col vector vertex colors, usual formats. (Symbolic color names (e.g. ‘red’, ‘blue’, etc.) , RGB colors (e.g. ‘#FF9900FF’), integer numbers referring current palette. default given colbar used vertices maximal cohesion color. mark.groups list vertex sets mark plot circling . default cohesive blocks marked, except one corresponding vertices. layout layout plot, simply passed plot.igraph(), see possible formats . default Reingold-Tilford layout generator used. file Defines file (connection) Pajek file written . project.file argument TRUE, can filename (extension), file object, general king connection object. file/connection opened already. project.file argument FALSE, several files created file must character scalar containing base name files, without extension. (can contain path files.) See also details . project.file Logical scalar, whether create single Pajek project file containing data, create separated files item. See details .","code":""},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"cohesive_blocks() returns cohesiveBlocks object. blocks() returns list numeric vectors, containing vertex ids. graphs_from_cohesive_blocks() returns list igraph graphs, corresponding cohesive blocks. cohesion() returns numeric vector, cohesion block. hierarchy() returns igraph graph, representation cohesive block hierarchy. parent() returns numeric vector giving parent block cohesive block, block hierarchy. block root hierarchy parent 0 returned . plot_hierarchy(), plot() export_pajek() return NULL, invisibly. max_cohesion() returns numeric vector one entry vertex, giving cohesion cohesive block. print() summary() return cohesiveBlocks object , invisibly. length returns numeric scalar, number blocks.","code":""},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"Cohesive blocking method determining hierarchical subsets graph vertices based structural cohesion (vertex connectivity). given graph \\(G\\), subset vertices \\(S\\subset V(G)\\) said maximally \\(k\\)-cohesive superset \\(S\\) vertex connectivity greater equal \\(k\\). Cohesive blocking process , given \\(k\\)-cohesive set vertices, maximally \\(l\\)-cohesive subsets recursively identified \\(l>k\\). Thus hierarchy vertex subsets found, entire graph \\(G\\) root. function cohesive_blocks() implements cohesive blocking. returns cohesiveBlocks object. cohesiveBlocks handled opaque class, .e. internal structure accessed directly, functions listed . function length can used cohesiveBlocks objects gives number blocks. function blocks() returns actual blocks stored cohesiveBlocks object. returned list numeric vectors, containing vertex ids. function graphs_from_cohesive_blocks() similar, returns blocks (induced) subgraphs input graph. various (graph, vertex edge) attributes kept subgraph. function cohesion() returns numeric vector, cohesion different blocks. order blocks blocks() graphs_from_cohesive_blocks() functions. block hierarchy can queried using hierarchy() function. returns igraph graph, vertex ids ordered according order blocks blocks() graphs_from_cohesive_blocks(), cohesion(), etc. functions. parent() gives parent vertex block, block hierarchy, root vertex gives 0. plot_hierarchy() plots hierarchy tree cohesive blocks active graphics device, calling igraph.plot. export_pajek() function can used export graph cohesive blocks Pajek format. can either export single Pajek project file information, set files, depending project.file argument. project.file TRUE, following information written file (connection) given file argument: (1) input graph, together attributes, see write_graph() details; (2) hierarchy graph; (3) one binary partition cohesive block. project.file FALSE, file argument must character scalar used base name generated files. file ‘basename’, following files created: (1) ‘basename.net’ original graph; (2) ‘basename_hierarchy.net’ hierarchy graph; (3) ‘basename_block_x.net’ cohesive block, ‘x’ number block, starting one. max_cohesion() returns maximal cohesion vertex, .e. cohesion cohesive block vertex. generic function summary() works cohesiveBlocks objects prints one line summary terminal. generic function print() also defined cohesiveBlocks objects invoked automatically name cohesiveBlocks object typed . produces output like : left part shows block structure, case five blocks. first block always corresponds whole graph, even cohesion zero. cohesion block number vertices block shown. last part printed display wide enough shows vertices blocks, ordered vertex ids. ‘o’ means vertex included, dot means , vertices shown groups ten. generic function plot() plots graph, showing one cohesive blocks .","code":"Cohesive block structure: B-1 c 1, n 23 '- B-2 c 2, n 14 oooooooo.. .o......oo ooo '- B-4 c 5, n 7 ooooooo... .......... ... '- B-3 c 2, n 10 ......o.oo o.oooooo.. ... '- B-5 c 3, n 4 ......o.oo o......... ..."},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"J. Moody D. R. White. Structural cohesion embeddedness: hierarchical concept social groups. American Sociological Review, 68(1):103–127, Feb 2003.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"Gabor Csardi csardi.gabor@gmail.com current implementation, Peter McMahan (https://socialsciences.uchicago.edu/news/alumni-profile-peter-mcmahan-phd17-sociology) wrote first version R.","code":""},{"path":"https://r.igraph.org/reference/cohesive_blocks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate Cohesive Blocks — cohesive_blocks","text":"","code":"## The graph from the Moody-White paper mw <- graph_from_literal( 1 - 2:3:4:5:6, 2 - 3:4:5:7, 3 - 4:6:7, 4 - 5:6:7, 5 - 6:7:21, 6 - 7, 7 - 8:11:14:19, 8 - 9:11:14, 9 - 10, 10 - 12:13, 11 - 12:14, 12 - 16, 13 - 16, 14 - 15, 15 - 16, 17 - 18:19:20, 18 - 20:21, 19 - 20:22:23, 20 - 21, 21 - 22:23, 22 - 23 ) mwBlocks <- cohesive_blocks(mw) # Inspect block membership and cohesion mwBlocks #> Cohesive block structure: #> B-1 c 1, n 23 #> '- B-2 c 2, n 14 oooooooo.. .o......oo ooo #> '- B-4 c 5, n 7 ooooooo... .......... ... #> '- B-3 c 2, n 10 ......o.oo o.oooooo.. ... #> '- B-5 c 3, n 4 ......o.oo o......... ... blocks(mwBlocks) #> [[1]] #> + 23/23 vertices, named, from 9713c0e: #> [1] 1 2 3 4 5 6 7 21 8 11 14 19 9 10 12 13 16 15 17 18 20 22 23 #> #> [[2]] #> + 14/23 vertices, named, from 9713c0e: #> [1] 1 2 3 4 5 6 7 21 19 17 18 20 22 23 #> #> [[3]] #> + 10/23 vertices, named, from 9713c0e: #> [1] 7 8 11 14 9 10 12 13 16 15 #> #> [[4]] #> + 7/23 vertices, named, from 9713c0e: #> [1] 1 2 3 4 5 6 7 #> #> [[5]] #> + 4/23 vertices, named, from 9713c0e: #> [1] 7 8 11 14 #> cohesion(mwBlocks) #> [1] 1 2 2 5 3 # Save results in a Pajek file file <- tempfile(fileext = \".paj\") export_pajek(mwBlocks, mw, file = file) if (!interactive()) { unlink(file) } # Plot the results plot(mwBlocks, mw) ## The science camp network camp <- graph_from_literal( Harry:Steve:Don:Bert - Harry:Steve:Don:Bert, Pam:Brazey:Carol:Pat - Pam:Brazey:Carol:Pat, Holly - Carol:Pat:Pam:Jennie:Bill, Bill - Pauline:Michael:Lee:Holly, Pauline - Bill:Jennie:Ann, Jennie - Holly:Michael:Lee:Ann:Pauline, Michael - Bill:Jennie:Ann:Lee:John, Ann - Michael:Jennie:Pauline, Lee - Michael:Bill:Jennie, Gery - Pat:Steve:Russ:John, Russ - Steve:Bert:Gery:John, John - Gery:Russ:Michael ) campBlocks <- cohesive_blocks(camp) campBlocks #> Cohesive block structure: #> B-1 c 2, n 18 #> '- B-2 c 3, n 4 oooo...... ........ #> '- B-3 c 3, n 5 ....ooooo. ........ #> '- B-4 c 3, n 6 .........o ooooo... plot(campBlocks, camp, vertex.label = V(camp)$name, margin = -0.2, vertex.shape = \"rectangle\", vertex.size = 24, vertex.size2 = 8, mark.border = 1, colbar = c(NA, NA, \"cyan\", \"orange\") )"},{"path":"https://r.igraph.org/reference/communities.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to deal with the result of network community detection — membership","title":"Functions to deal with the result of network community detection — membership","text":"igraph community detection functions return results object communities class. manual page describes operations class.","code":""},{"path":"https://r.igraph.org/reference/communities.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to deal with the result of network community detection — membership","text":"","code":"membership(communities) # S3 method for class 'communities' print(x, ...) # S3 method for class 'communities' modularity(x, ...) # S3 method for class 'communities' length(x) sizes(communities) algorithm(communities) merges(communities) crossing(communities, graph) code_len(communities) is_hierarchical(communities) # S3 method for class 'communities' as.dendrogram(object, hang = -1, use.modularity = FALSE, ...) # S3 method for class 'communities' as.hclust(x, hang = -1, use.modularity = FALSE, ...) cut_at(communities, no, steps) show_trace(communities) # S3 method for class 'communities' plot( x, y, col = membership(x), mark.groups = communities(x), edge.color = c(\"black\", \"red\")[crossing(x, y) + 1], ... ) communities(x)"},{"path":"https://r.igraph.org/reference/communities.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to deal with the result of network community detection — membership","text":"communities, x, object communities object, result igraph community detection function. ... Additional arguments. plot.communities passes plot.igraph(). functions silently ignore . graph igraph graph object, corresponding communities. hang Numeric scalar indicating height leaves computed heights parents; see plot.hclust(). use.modularity Logical scalar, whether use modularity values define height branches. Integer scalar, desired number communities. low two high, error message given. Exactly one steps must supplied. steps number merge operations perform produce communities. Exactly one steps must supplied. y igraph graph object, corresponding communities x. col vector colors, format accepted regular R plotting methods. vector gives colors vertices explicitly. mark.groups list numeric vectors. communities can highlighted using colored polygons. groups polygons drawn given . default use groups given communities. Supply NULL want highlight groups. edge.color colors edges. default edges within communities colored green edges red. membership Numeric vector, one value vertex, membership vector community structure. Might also NULL community structure given another way, e.g. merge matrix. algorithm NULL (meaning unknown algorithm), character scalar, name algorithm produced community structure. merges NULL, merge matrix hierarchical community structure. See merges() information format. modularity Numeric scalar vector, modularity value community structure. can also NULL, modularity (best) split available.","code":""},{"path":"https://r.igraph.org/reference/communities.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Functions to deal with the result of network community detection — membership","text":"print() returns communities object , invisibly. length returns integer scalar. sizes() returns numeric vector. membership() returns numeric vector, one number vertex graph input community detection. modularity() returns numeric scalar. algorithm() returns character scalar. crossing() returns logical vector. is_hierarchical() returns logical scalar. merges() returns two-column numeric matrix. cut_at() returns numeric vector, membership vector vertices. .dendrogram() returns dendrogram object. show_trace() returns character vector. code_len() returns numeric scalar communities found InfoMAP method NULL methods. plot() communities objects returns NULL, invisibly.","code":""},{"path":"https://r.igraph.org/reference/communities.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Functions to deal with the result of network community detection — membership","text":"Community structure detection algorithms try find dense subgraphs directed undirected graphs, optimizing criteria, usually using heuristics. igraph implements number community detection methods (see ), return object class communities. community structure detection algorithms different, communities objects always structure. Nevertheless, common operations, documented . print() generic function defined communities, prints short summary. length generic function call called communities returns number communities. sizes() function returns community sizes, order ids. membership() gives division vertices, communities. returns numeric vector, one value vertex, id community. Community ids start one. Note algorithms calculate complete (incomplete) hierarchical structure communities, just single partitioning. algorithms typically membership highest modularity value returned, see also manual pages individual algorithms. communities() also name function, returns list communities, identified vertices. vertices symbolic names add.vertex.names igraph option set, graph named. Otherwise numeric vertex ids used. modularity() gives modularity score partitioning. (See modularity.igraph() details. algorithms result single partitioning, highest modularity value returned. algorithm() gives name algorithm used calculate community structure. crossing() returns logical vector, one value edge, ordered according edge ids. value TRUE iff edge connects two different communities, according (best) membership vector, returned membership(). is_hierarchical() checks whether hierarchical algorithm used find community structure. functions make sense hierarchical methods (e.g. merges(), cut_at() .dendrogram()). merges() returns merge matrix hierarchical methods. error message given, non-hierarchical method used find community structure. can check calling is_hierarchical() communities object. cut_at() cuts merge tree hierarchical community finding method, desired place returns membership vector. desired place can expressed desired number communities number merge steps make. function gives error message, called non-hierarchical method. .dendrogram() converts hierarchical community structure dendrogram object. works hierarchical methods, gives error message others. See stats::dendrogram() details. stats::.hclust() similar .dendrogram(), converts hierarchical community structure hclust object. ape::.phylo() converts hierarchical community structure phylo object, need ape package . show_trace() works (currently) communities found leading eigenvector method (cluster_leading_eigen()), returns character vector gives steps performed algorithm finding communities. code_len() defined InfoMAP method (cluster_infomap() returns code length partition. possibly call plot() function communities objects. plot graph (uses plot.igraph() internally), communities shown. default colores vertices according communities, also marks vertex groups corresponding communities. passes additional arguments plot.igraph(), please see also igraph.plotting change plot.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/communities.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Functions to deal with the result of network community detection — membership","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/communities.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functions to deal with the result of network community detection — membership","text":"","code":"karate <- make_graph(\"Zachary\") wc <- cluster_walktrap(karate) modularity(wc) #> [1] 0.3532216 membership(wc) #> [1] 1 1 2 1 5 5 5 1 2 2 5 1 1 2 3 3 5 1 3 1 3 1 3 4 4 4 3 4 2 3 2 2 3 3 plot(wc, karate)"},{"path":"https://r.igraph.org/reference/compare.html","id":null,"dir":"Reference","previous_headings":"","what":"Compares community structures using various metrics — compare","title":"Compares community structures using various metrics — compare","text":"function assesses distance two community structures.","code":""},{"path":"https://r.igraph.org/reference/compare.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compares community structures using various metrics — compare","text":"","code":"compare( comm1, comm2, method = c(\"vi\", \"nmi\", \"split.join\", \"rand\", \"adjusted.rand\") )"},{"path":"https://r.igraph.org/reference/compare.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compares community structures using various metrics — compare","text":"comm1 communities() object containing community structure; numeric vector, membership vector first community structure. membership vector contain community id vertex, numbering communities starts one. comm2 communities() object containing community structure; numeric vector, membership vector second community structure, format previous argument. method Character scalar, comparison method use. Possible values: ‘vi’ variation information (VI) metric Meila (2003), ‘nmi’ normalized mutual information measure proposed Danon et al. (2005), ‘split.join’ split-join distance can Dongen (2000), ‘rand’ Rand index Rand (1971), ‘adjusted.rand’ adjusted Rand index Hubert Arabie (1985).","code":""},{"path":"https://r.igraph.org/reference/compare.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compares community structures using various metrics — compare","text":"real number.","code":""},{"path":"https://r.igraph.org/reference/compare.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compares community structures using various metrics — compare","text":"Meila M: Comparing clusterings variation information. : Scholkopf B, Warmuth MK (eds.). Learning Theory Kernel Machines: 16th Annual Conference Computational Learning Theory 7th Kernel Workshop, COLT/Kernel 2003, Washington, DC, USA. Lecture Notes Computer Science, vol. 2777, Springer, 2003. ISBN: 978-3-540-40720-1. Danon L, Diaz-Guilera , Duch J, Arenas : Comparing community structure identification. J Stat Mech P09008, 2005. van Dongen S: Performance criteria graph clustering Markov cluster experiments. Technical Report INS-R0012, National Research Institute Mathematics Computer Science Netherlands, Amsterdam, May 2000. Rand WM: Objective criteria evaluation clustering methods. J Stat Assoc 66(336):846-850, 1971. Hubert L Arabie P: Comparing partitions. Journal Classification 2:193-218, 1985.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/compare.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compares community structures using various metrics — compare","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/compare.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compares community structures using various metrics — compare","text":"","code":"g <- make_graph(\"Zachary\") sg <- cluster_spinglass(g) le <- cluster_leading_eigen(g) compare(sg, le, method = \"rand\") #> [1] 0.9500891 compare(membership(sg), membership(le)) #> [1] 0.2765712"},{"path":"https://r.igraph.org/reference/complementer.html","id":null,"dir":"Reference","previous_headings":"","what":"Complementer of a graph — complementer","title":"Complementer of a graph — complementer","text":"complementer graph contains edges present input graph.","code":""},{"path":"https://r.igraph.org/reference/complementer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Complementer of a graph — complementer","text":"","code":"complementer(graph, loops = FALSE)"},{"path":"https://r.igraph.org/reference/complementer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Complementer of a graph — complementer","text":"graph input graph, can directed undirected. loops Logical constant, whether generate loop edges.","code":""},{"path":"https://r.igraph.org/reference/complementer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Complementer of a graph — complementer","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/complementer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Complementer of a graph — complementer","text":"complementer() creates complementer graph. edges present original graph included new graph. complementer() keeps graph vertex attriubutes, edge attributes lost.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/complementer.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Complementer of a graph — complementer","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/complementer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Complementer of a graph — complementer","text":"","code":"## Complementer of a ring g <- make_ring(10) complementer(g) #> IGRAPH ca1fe78 U--- 10 35 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from ca1fe78: #> [1] 1-- 9 1-- 8 1-- 7 1-- 6 1-- 5 1-- 4 1-- 3 2--10 2-- 9 2-- 8 2-- 7 2-- 6 #> [13] 2-- 5 2-- 4 3--10 3-- 9 3-- 8 3-- 7 3-- 6 3-- 5 4--10 4-- 9 4-- 8 4-- 7 #> [25] 4-- 6 5--10 5-- 9 5-- 8 5-- 7 6--10 6-- 9 6-- 8 7--10 7-- 9 8--10 ## A graph and its complementer give together the full graph g <- make_ring(10) gc <- complementer(g) gu <- union(g, gc) gu #> IGRAPH f913701 U--- 10 45 -- #> + attr: name_1 (g/c), name_2 (g/c), mutual_1 (g/l), mutual_2 (g/l), #> | circular_1 (g/l), circular_2 (g/l) #> + edges from f913701: #> [1] 9--10 8--10 8-- 9 7--10 7-- 9 7-- 8 6--10 6-- 9 6-- 8 6-- 7 5--10 5-- 9 #> [13] 5-- 8 5-- 7 5-- 6 4--10 4-- 9 4-- 8 4-- 7 4-- 6 4-- 5 3--10 3-- 9 3-- 8 #> [25] 3-- 7 3-- 6 3-- 5 3-- 4 2--10 2-- 9 2-- 8 2-- 7 2-- 6 2-- 5 2-- 4 2-- 3 #> [37] 1--10 1-- 9 1-- 8 1-- 7 1-- 6 1-- 5 1-- 4 1-- 3 1-- 2 graph.isomorphic(gu, make_full_graph(vcount(g))) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/component_wise.html","id":null,"dir":"Reference","previous_headings":"","what":"Component-wise layout — component_wise","title":"Component-wise layout — component_wise","text":"layout modifier function, can used calculate layout separately component graph.","code":""},{"path":"https://r.igraph.org/reference/component_wise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Component-wise layout — component_wise","text":"","code":"component_wise(merge_method = \"dla\")"},{"path":"https://r.igraph.org/reference/component_wise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Component-wise layout — component_wise","text":"merge_method Merging algorithm, method argument merge_coords().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/component_wise.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Component-wise layout — component_wise","text":"","code":"g <- make_ring(10) + make_ring(10) g %>% add_layout_(in_circle(), component_wise()) %>% plot()"},{"path":"https://r.igraph.org/reference/components.html","id":null,"dir":"Reference","previous_headings":"","what":"Connected components of a graph — component_distribution","title":"Connected components of a graph — component_distribution","text":"Calculate maximal (weakly strongly) connected components graph","code":""},{"path":"https://r.igraph.org/reference/components.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connected components of a graph — component_distribution","text":"","code":"component_distribution(graph, cumulative = FALSE, mul.size = FALSE, ...) largest_component(graph, mode = c(\"weak\", \"strong\")) components(graph, mode = c(\"weak\", \"strong\")) is_connected(graph, mode = c(\"weak\", \"strong\")) count_components(graph, mode = c(\"weak\", \"strong\"))"},{"path":"https://r.igraph.org/reference/components.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connected components of a graph — component_distribution","text":"graph graph analyze. cumulative Logical, TRUE cumulative distirubution (relative frequency) calculated. mul.size Logical. TRUE relative frequencies multiplied cluster sizes. ... Additional attributes pass cluster, right now mode makes sense. mode Character string, either “weak” “strong”. directed graphs “weak” implies weakly, “strong” strongly connected components search. ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/components.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Connected components of a graph — component_distribution","text":"is_connected() logical constant. components() named list three components: membership numeric vector giving cluster id vertex belongs. csize numeric vector giving sizes clusters. numeric constant, number clusters. count_components() integer constant returned. component_distribution() numeric vector relative frequencies. length vector size largest component plus one. Note (currently unknown reasons) first element vector number clusters size zero, always zero. largest_component() largest connected component graph.","code":""},{"path":"https://r.igraph.org/reference/components.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Connected components of a graph — component_distribution","text":"is_connected() decides whether graph weakly strongly connected. null graph considered disconnected. components() finds maximal (weakly strongly) connected components graph. count_components() almost components() returns number clusters found instead returning actual clusters. component_distribution() creates histogram maximal connected component sizes. largest_component() returns largest connected component graph. directed graphs, optionally largest weakly strongly connected component. case tie, first component vertex ID order returned. Vertex IDs original graph retained returned graph. weakly connected components found simple breadth-first search. strongly connected components implemented two consecutive depth-first searches.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/components.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Connected components of a graph — component_distribution","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/components.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Connected components of a graph — component_distribution","text":"","code":"g <- sample_gnp(20, 1 / 20) clu <- components(g) groups(clu) #> $`1` #> [1] 1 2 5 7 9 11 17 19 #> #> $`2` #> [1] 3 14 #> #> $`3` #> [1] 4 8 10 #> #> $`4` #> [1] 6 #> #> $`5` #> [1] 12 #> #> $`6` #> [1] 13 #> #> $`7` #> [1] 15 #> #> $`8` #> [1] 16 #> #> $`9` #> [1] 18 #> #> $`10` #> [1] 20 #> largest_component(g) #> IGRAPH da62ae4 U--- 8 8 -- Erdos-Renyi (gnp) graph #> + attr: name (g/c), type (g/c), loops (g/l), p (g/n) #> + edges from da62ae4: #> [1] 1--3 2--3 2--5 3--6 3--7 4--7 3--8 5--8"},{"path":"https://r.igraph.org/reference/compose.html","id":null,"dir":"Reference","previous_headings":"","what":"Compose two graphs as binary relations — compose","title":"Compose two graphs as binary relations — compose","text":"Relational composition two graph.","code":""},{"path":"https://r.igraph.org/reference/compose.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compose two graphs as binary relations — compose","text":"","code":"compose(g1, g2, byname = \"auto\")"},{"path":"https://r.igraph.org/reference/compose.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compose two graphs as binary relations — compose","text":"g1 first input graph. g2 second input graph. byname logical scalar, character scalar auto. Whether perform operation based symbolic vertex names. auto, means TRUE graphs named FALSE otherwise. warning generated auto one graph, graphs named.","code":""},{"path":"https://r.igraph.org/reference/compose.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compose two graphs as binary relations — compose","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/compose.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compose two graphs as binary relations — compose","text":"compose() creates relational composition two graphs. new graph contain (,b) edge vertex c, edge (,c) included first graph (c,b) included second graph. corresponding operator %c%. function gives error one input graphs directed undirected. byname argument TRUE (auto graphs named), operation performed based symbolic vertex names. Otherwise numeric vertex ids used. compose() keeps attributes graphs. graph, vertex edge attributes copied result. attribute present multiple graphs result name clash, attribute renamed adding suffixes: _1, _2, etc. name vertex attribute treated specially operation performed based symbolic vertex names. case name must present graphs, renamed result graph. Note edge result graph corresponds two edges input, one first graph, one second. mapping injective several edges result might correspond edge first (/second) graph. edge attributes result graph updated accordingly. Also note function may generate multigraphs, one way find edges (,b) g1 (b,c) g2 edge (,c) result. See simplify() want get rid multiple edges. function may create loop edges, edges (,b) (b,) present g1 g2, respectively, (,) included result. See simplify() want get rid self-loops.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/compose.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compose two graphs as binary relations — compose","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/compose.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compose two graphs as binary relations — compose","text":"","code":"g1 <- make_ring(10) g2 <- make_star(10, mode = \"undirected\") gc <- compose(g1, g2) print_all(gc) #> IGRAPH 383d701 U--- 10 36 -- #> + attr: name_1 (g/c), name_2 (g/c), mutual (g/l), circular (g/l), mode #> | (g/c), center (g/n) #> + edges: #> 1 -- 1 1 1 1 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 #> 2 -- 1 2 2 3 4 5 6 7 8 9 10 10 #> 3 -- 1 1 2 10 #> 4 -- 1 1 2 10 #> 5 -- 1 1 2 10 #> 6 -- 1 1 2 10 #> 7 -- 1 1 2 10 #> 8 -- 1 1 2 10 #> 9 -- 1 1 2 10 #> 10 -- 1 2 2 3 4 5 6 7 8 9 10 10 print_all(simplify(gc)) #> IGRAPH 6d22e35 U--- 10 24 -- #> + attr: name_1 (g/c), name_2 (g/c), mutual (g/l), circular (g/l), mode #> | (g/c), center (g/n) #> + edges: #> 1 -- 2 3 4 5 6 7 8 9 10 2 -- 1 3 4 5 6 7 8 9 10 #> 3 -- 1 2 10 4 -- 1 2 10 #> 5 -- 1 2 10 6 -- 1 2 10 #> 7 -- 1 2 10 8 -- 1 2 10 #> 9 -- 1 2 10 10 -- 1 2 3 4 5 6 7 8 9"},{"path":"https://r.igraph.org/reference/connect.neighborhood.html","id":null,"dir":"Reference","previous_headings":"","what":"Neighborhood of graph vertices — connect.neighborhood","title":"Neighborhood of graph vertices — connect.neighborhood","text":"connect.neighborhood() renamed connect() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/connect.neighborhood.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neighborhood of graph vertices — connect.neighborhood","text":"","code":"connect.neighborhood(graph, order, mode = c(\"all\", \"out\", \"in\", \"total\"))"},{"path":"https://r.igraph.org/reference/connect.neighborhood.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neighborhood of graph vertices — connect.neighborhood","text":"graph input graph. order Integer giving order neighborhood. mode Character constant, specifies use direction edges directed graph analyzed. ‘’ outgoing edges followed, vertices reachable source vertex order steps counted. ‘\"\"’ vertices source vertex reachable order steps counted. ‘\"\"’ ignores direction edges. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/consensus_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a consensus tree from several hierarchical random graph models — consensus_tree","title":"Create a consensus tree from several hierarchical random graph models — consensus_tree","text":"consensus_tree() creates consensus tree several fitted hierarchical random graph models, using phylogeny methods. hrg() argument given start set TRUE, starts sampling given HRG. Otherwise optimizes HRG log-likelihood first, samples starting optimum.","code":""},{"path":"https://r.igraph.org/reference/consensus_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a consensus tree from several hierarchical random graph models — consensus_tree","text":"","code":"consensus_tree(graph, hrg = NULL, start = FALSE, num.samples = 10000)"},{"path":"https://r.igraph.org/reference/consensus_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a consensus tree from several hierarchical random graph models — consensus_tree","text":"graph graph models fitted . hrg hierarchical random graph model, form igraphHRG object. consensus_tree() allows NULL well, HRG fitted graph first, random starting point. start Logical, whether start fitting/sampling supplied igraphHRG object, random starting point. num.samples Number samples use consensus generation missing edge prediction.","code":""},{"path":"https://r.igraph.org/reference/consensus_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a consensus tree from several hierarchical random graph models — consensus_tree","text":"consensus_tree() returns list two objects. first igraphHRGConsensus object, second igraphHRG object. igraphHRGConsensus object following members: parents vertex, id parent vertex stored, zero, vertex root vertex tree. first n vertex ids (0) refer original vertices graph, ids refer vertex groups. weights Numeric vector, counts number times given tree split occurred generated network samples, internal vertices. order parents vector.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/console.html","id":null,"dir":"Reference","previous_headings":"","what":"The igraph console — console","title":"The igraph console — console","text":"igraph console GUI window shows currently running igraph function .","code":""},{"path":"https://r.igraph.org/reference/console.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The igraph console — console","text":"","code":"console() .igraph.progress(percent, message, clean = FALSE) .igraph.status(message)"},{"path":"https://r.igraph.org/reference/console.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The igraph console — console","text":"percent, message, clean Used internally .igraph.progress() .igraph.status()","code":""},{"path":"https://r.igraph.org/reference/console.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The igraph console — console","text":"NULL, invisibly.","code":""},{"path":"https://r.igraph.org/reference/console.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The igraph console — console","text":"console can started calling console() function. stays open, user closes . Another way start set verbose igraph option “tkconsole” via igraph_options(). console (re)opens time igraph function supporting starts; close , set verbose option another value. console written Tcl/Tk required tcltk package.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/console.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The igraph console — console","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/constraint.html","id":null,"dir":"Reference","previous_headings":"","what":"Burt's constraint — constraint","title":"Burt's constraint — constraint","text":"Given graph, constraint() calculates Burt's constraint vertex.","code":""},{"path":"https://r.igraph.org/reference/constraint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Burt's constraint — constraint","text":"","code":"constraint(graph, nodes = V(graph), weights = NULL)"},{"path":"https://r.igraph.org/reference/constraint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Burt's constraint — constraint","text":"graph graph object, input graph. nodes vertices constraint calculated. Defaults vertices. weights weights edges. NULL weight edge attribute used. edge attribute edges weight.","code":""},{"path":"https://r.igraph.org/reference/constraint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Burt's constraint — constraint","text":"numeric vector constraint scores","code":""},{"path":"https://r.igraph.org/reference/constraint.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Burt's constraint — constraint","text":"Burt's constraint higher ego less, mutually stronger related (.e. redundant) contacts. Burt's measure constraint, \\(C_i\\), vertex \\(\\)'s ego network \\(V_i\\), defined directed valued graphs, $$C_i=\\sum_{j \\V_i \\setminus \\{\\}} (p_{ij}+\\sum_{q \\V_i \\setminus \\{,j\\}} p_{iq} p_{qj})^2$$ graph order (.e. number vertices) \\(N\\), proportional tie strengths defined $$p_{ij} = \\frac{a_{ij}+a_{ji}}{\\sum_{k \\V_i \\setminus \\{\\}}(a_{ik}+a_{ki})},$$ \\(a_{ij}\\) elements \\(\\) latter graph adjacency matrix. isolated vertices, constraint undefined.","code":""},{"path":"https://r.igraph.org/reference/constraint.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Burt's constraint — constraint","text":"Burt, R.S. (2004). Structural holes good ideas. American Journal Sociology 110, 349-399.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/constraint.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Burt's constraint — constraint","text":"Jeroen Bruggeman (https://sites.google.com/site/jebrug/jeroen-bruggeman-social-science) Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/constraint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Burt's constraint — constraint","text":"","code":"g <- sample_gnp(20, 5 / 20) constraint(g) #> [1] 0.3300405 0.4968112 0.3333333 0.2526342 0.2569221 0.2456340 0.2966327 #> [8] 0.2383629 0.2533896 0.5000000 0.3134091 0.4091840 0.4718793 0.5000000 #> [15] 0.3055581 0.2302969 0.2513974 0.2866015 0.2837931 0.2012429"},{"path":"https://r.igraph.org/reference/contract.html","id":null,"dir":"Reference","previous_headings":"","what":"Contract several vertices into a single one — contract","title":"Contract several vertices into a single one — contract","text":"function creates new graph, merging several vertices one. vertices new graph correspond sets vertices input graph.","code":""},{"path":"https://r.igraph.org/reference/contract.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Contract several vertices into a single one — contract","text":"","code":"contract(graph, mapping, vertex.attr.comb = igraph_opt(\"vertex.attr.comb\"))"},{"path":"https://r.igraph.org/reference/contract.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Contract several vertices into a single one — contract","text":"graph input graph, can directed undirected. mapping numeric vector specifies mapping. elements correspond vertices, element id new graph given. vertex.attr.comb Specifies combine vertex attributes new graph. Please see attribute.combination() details.","code":""},{"path":"https://r.igraph.org/reference/contract.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Contract several vertices into a single one — contract","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/contract.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Contract several vertices into a single one — contract","text":"attributes graph kept. Graph edge attributes unchanged, vertex attributes combined, according vertex.attr.comb parameter.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/contract.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Contract several vertices into a single one — contract","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/contract.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Contract several vertices into a single one — contract","text":"","code":"g <- make_ring(10) g$name <- \"Ring\" V(g)$name <- letters[1:vcount(g)] E(g)$weight <- runif(ecount(g)) g2 <- contract(g, rep(1:5, each = 2), vertex.attr.comb = toString ) ## graph and edge attributes are kept, vertex attributes are ## combined using the 'toString' function. print(g2, g = TRUE, v = TRUE, e = TRUE) #> IGRAPH ca808bc UNW- 5 10 -- Ring #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c), weight #> | (e/n) #> + edges from ca808bc (vertex names): #> [1] a, b--a, b a, b--c, d c, d--c, d c, d--e, f e, f--e, f e, f--g, h #> [7] g, h--g, h g, h--i, j i, j--i, j a, b--i, j"},{"path":"https://r.igraph.org/reference/contract.vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Contract several vertices into a single one — contract.vertices","title":"Contract several vertices into a single one — contract.vertices","text":"contract.vertices() renamed contract() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/contract.vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Contract several vertices into a single one — contract.vertices","text":"","code":"contract.vertices( graph, mapping, vertex.attr.comb = igraph_opt(\"vertex.attr.comb\") )"},{"path":"https://r.igraph.org/reference/contract.vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Contract several vertices into a single one — contract.vertices","text":"graph input graph, can directed undirected. mapping numeric vector specifies mapping. elements correspond vertices, element id new graph given. vertex.attr.comb Specifies combine vertex attributes new graph. Please see attribute.combination() details.","code":""},{"path":"https://r.igraph.org/reference/convex.hull.html","id":null,"dir":"Reference","previous_headings":"","what":"Convex hull of a set of vertices — convex.hull","title":"Convex hull of a set of vertices — convex.hull","text":"convex.hull() renamed convex_hull() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/convex.hull.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convex hull of a set of vertices — convex.hull","text":"","code":"convex.hull(data)"},{"path":"https://r.igraph.org/reference/convex.hull.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convex hull of a set of vertices — convex.hull","text":"data data points, numeric matrix two columns.","code":""},{"path":"https://r.igraph.org/reference/convex_hull.html","id":null,"dir":"Reference","previous_headings":"","what":"Convex hull of a set of vertices — convex_hull","title":"Convex hull of a set of vertices — convex_hull","text":"Calculate convex hull set points, .e. covering polygon smallest area.","code":""},{"path":"https://r.igraph.org/reference/convex_hull.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convex hull of a set of vertices — convex_hull","text":"","code":"convex_hull(data)"},{"path":"https://r.igraph.org/reference/convex_hull.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convex hull of a set of vertices — convex_hull","text":"data data points, numeric matrix two columns.","code":""},{"path":"https://r.igraph.org/reference/convex_hull.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convex hull of a set of vertices — convex_hull","text":"named list components: resverts indices input vertices constritute convex hull. rescoords coordinates corners convex hull.","code":""},{"path":"https://r.igraph.org/reference/convex_hull.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convex hull of a set of vertices — convex_hull","text":"Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein. Introduction Algorithms, Second Edition. MIT Press McGraw-Hill, 2001. ISBN 0262032937. Pages 949-955 section 33.3: Finding convex hull.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/convex_hull.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convex hull of a set of vertices — convex_hull","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/convex_hull.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convex hull of a set of vertices — convex_hull","text":"","code":"M <- cbind(runif(100), runif(100)) convex_hull(M) #> $resverts #> [1] 2 7 16 41 76 26 74 27 3 47 34 12 #> #> $rescoords #> [,1] [,2] #> [1,] 0.6719538004 0.01473970 #> [2,] 0.1656575357 0.01706923 #> [3,] 0.0259869604 0.05662120 #> [4,] 0.0035739134 0.25649774 #> [5,] 0.0005793779 0.94277215 #> [6,] 0.4011788100 0.98036703 #> [7,] 0.5896703757 0.98986755 #> [8,] 0.9254656709 0.97552540 #> [9,] 0.9968461362 0.96956068 #> [10,] 0.9982071253 0.96651406 #> [11,] 0.9824077103 0.09188934 #> [12,] 0.9303184026 0.04629297 #>"},{"path":"https://r.igraph.org/reference/coreness.html","id":null,"dir":"Reference","previous_headings":"","what":"K-core decomposition of graphs — coreness","title":"K-core decomposition of graphs — coreness","text":"k-core graph maximal subgraph vertex least degree k. coreness vertex k belongs k-core (k+1)-core.","code":""},{"path":"https://r.igraph.org/reference/coreness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"K-core decomposition of graphs — coreness","text":"","code":"coreness(graph, mode = c(\"all\", \"out\", \"in\"))"},{"path":"https://r.igraph.org/reference/coreness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"K-core decomposition of graphs — coreness","text":"graph input graph, can directed undirected mode type core directed graphs. Character constant, possible values: : -cores computed, : -cores computed, : corresponding undirected graph considered. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/coreness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"K-core decomposition of graphs — coreness","text":"Numeric vector integer numbers giving coreness vertex.","code":""},{"path":"https://r.igraph.org/reference/coreness.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"K-core decomposition of graphs — coreness","text":"k-core graph maximal subgraph every vertex least degree k. cores graph form layers: (k+1)-core always subgraph k-core. function calculates coreness vertex.","code":""},{"path":"https://r.igraph.org/reference/coreness.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"K-core decomposition of graphs — coreness","text":"Vladimir Batagelj, Matjaz Zaversnik: O(m) Algorithm Cores Decomposition Networks, 2002 Seidman S. B. (1983) Network structure minimum degree, Social Networks, 5, 269–287.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/coreness.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"K-core decomposition of graphs — coreness","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/coreness.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"K-core decomposition of graphs — coreness","text":"","code":"g <- make_ring(10) g <- add_edges(g, c(1, 2, 2, 3, 1, 3)) coreness(g) # small core triangle in a ring #> [1] 3 3 3 2 2 2 2 2 2 2"},{"path":"https://r.igraph.org/reference/count.multiple.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the multiple or loop edges in a graph — count.multiple","title":"Find the multiple or loop edges in a graph — count.multiple","text":"count.multiple() renamed count_multiple() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/count.multiple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the multiple or loop edges in a graph — count.multiple","text":"","code":"count.multiple(graph, eids = E(graph))"},{"path":"https://r.igraph.org/reference/count.multiple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the multiple or loop edges in a graph — count.multiple","text":"graph input graph. eids edges query restricted. default edges graph.","code":""},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of automorphisms — count_automorphisms","title":"Number of automorphisms — count_automorphisms","text":"Calculate number automorphisms graph, .e. number isomorphisms .","code":""},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of automorphisms — count_automorphisms","text":"","code":"count_automorphisms( graph, colors = NULL, sh = c(\"fm\", \"f\", \"fs\", \"fl\", \"flm\", \"fsm\") )"},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of automorphisms — count_automorphisms","text":"graph input graph, treated undirected. colors colors individual vertices graph; vertices color allowed match automorphism. omitted, igraph uses color attribute vertices, , vertex attribute, simply assumes vertices color. Pass NULL explicitly graph color vertex attribute want use . sh splitting heuristics BLISS algorithm. Possible values : ‘f’: first non-singleton cell, ‘fl’: first largest non-singleton cell, ‘fs’: first smallest non-singleton cell, ‘fm’: first maximally non-trivially connected non-singleton cell, ‘flm’: first largest maximally non-trivially connected non-singleton cell, ‘fsm’: first smallest maximally non-trivially connected non-singleton cell.","code":""},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Number of automorphisms — count_automorphisms","text":"named list following members: group_size size automorphism group input graph, string. number exact igraph compiled GMP library, approximate otherwise. nof_nodes number nodes search tree. nof_leaf_nodes number leaf nodes search tree. nof_bad_nodes Number bad nodes. nof_canupdates Number canrep updates. max_level Maximum level.","code":""},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Number of automorphisms — count_automorphisms","text":"automorphism graph permutation vertices brings graph . function calculates number automorphism graph using BLISS algorithm. See also BLISS homepage http://www.tcs.hut.fi/Software/bliss/index.html. need automorphisms , use automorphism_group() obtain compact representation automorphism group.","code":""},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Number of automorphisms — count_automorphisms","text":"Tommi Junttila Petteri Kaski: Engineering Efficient Canonical Labeling Tool Large Sparse Graphs, Proceedings Ninth Workshop Algorithm Engineering Experiments Fourth Workshop Analytic Algorithms Combinatorics. 2007.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Number of automorphisms — count_automorphisms","text":"Tommi Junttila (http://users.ics.aalto.fi/tjunttil/) BLISS Gabor Csardi csardi.gabor@gmail.com igraph glue code manual page.","code":""},{"path":"https://r.igraph.org/reference/count_automorphisms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Number of automorphisms — count_automorphisms","text":"","code":"## A ring has n*2 automorphisms, you can \"turn\" it by 0-9 vertices ## and each of these graphs can be \"flipped\" g <- make_ring(10) count_automorphisms(g) #> $nof_nodes #> [1] 6 #> #> $nof_leaf_nodes #> [1] 4 #> #> $nof_bad_nodes #> [1] 0 #> #> $nof_canupdates #> [1] 1 #> #> $max_level #> [1] 2 #> #> $group_size #> [1] \"20\" #> ## A full graph has n! automorphisms; however, we restrict the vertex ## matching by colors, leading to only 4 automorphisms g <- make_full_graph(4) count_automorphisms(g, colors = c(1, 2, 1, 2)) #> $nof_nodes #> [1] 5 #> #> $nof_leaf_nodes #> [1] 3 #> #> $nof_bad_nodes #> [1] 0 #> #> $nof_canupdates #> [1] 1 #> #> $max_level #> [1] 2 #> #> $group_size #> [1] \"4\" #>"},{"path":"https://r.igraph.org/reference/count_isomorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","title":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","text":"Count number isomorphic mappings two graphs","code":""},{"path":"https://r.igraph.org/reference/count_isomorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","text":"","code":"count_isomorphisms(graph1, graph2, method = \"vf2\", ...)"},{"path":"https://r.igraph.org/reference/count_isomorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","text":"graph1 first graph. graph2 second graph. method Currently ‘vf2’ supported, see isomorphic() details extra arguments. ... Passed individual methods.","code":""},{"path":"https://r.igraph.org/reference/count_isomorphisms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","text":"Number isomorphic mappings two graphs.","code":""},{"path":"https://r.igraph.org/reference/count_isomorphisms.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","text":"LP Cordella, P Foggia, C Sansone, M Vento: improved algorithm matching large graphs, Proc. 3rd IAPR TC-15 Workshop Graphbased Representations Pattern Recognition, 149–159, 2001.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/count_isomorphisms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Count the number of isomorphic mappings between two graphs — count_isomorphisms","text":"","code":"# colored graph isomorphism g1 <- make_ring(10) g2 <- make_ring(10) isomorphic(g1, g2) #> [1] TRUE V(g1)$color <- rep(1:2, length = vcount(g1)) V(g2)$color <- rep(2:1, length = vcount(g2)) # consider colors by default count_isomorphisms(g1, g2) #> [1] 10 # ignore colors count_isomorphisms(g1, g2, vertex.color1 = NULL, vertex.color2 = NULL ) #> [1] 20"},{"path":"https://r.igraph.org/reference/count_motifs.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph motifs — count_motifs","title":"Graph motifs — count_motifs","text":"Graph motifs small connected induced subgraphs well-defined structure. functions search graph various motifs.","code":""},{"path":"https://r.igraph.org/reference/count_motifs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph motifs — count_motifs","text":"","code":"count_motifs(graph, size = 3, cut.prob = rep(0, size))"},{"path":"https://r.igraph.org/reference/count_motifs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph motifs — count_motifs","text":"graph Graph object, input graph. size size motif. cut.prob Numeric vector giving probabilities search graph cut certain level. length size motif (size argument). default cuts made.","code":""},{"path":"https://r.igraph.org/reference/count_motifs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph motifs — count_motifs","text":"count_motifs() returns numeric scalar.","code":""},{"path":"https://r.igraph.org/reference/count_motifs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph motifs — count_motifs","text":"count_motifs() calculates total number motifs given size graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/count_motifs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph motifs — count_motifs","text":"","code":"g <- sample_pa(100) motifs(g, 3) #> [1] NA NA 281 NA 82 0 0 0 0 0 0 0 0 0 0 0 count_motifs(g, 3) #> [1] 363 sample_motifs(g, 3) #> [1] 360"},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"Count isomorphic mappings graph subgraphs another graph","code":""},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"","code":"count_subgraph_isomorphisms(pattern, target, method = c(\"lad\", \"vf2\"), ...)"},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"pattern smaller graph, might directed undirected. Undirected graphs treated directed graphs mutual edges. target bigger graph, might directed undirected. Undirected graphs treated directed graphs mutual edges. method method use. Possible values: ‘lad’, ‘vf2’. See details . ... Additional arguments, passed various methods.","code":""},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"Logical scalar, TRUE pattern isomorphic (possibly induced) subgraph target.","code":""},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":"-lad-method","dir":"Reference","previous_headings":"","what":"‘lad’ method","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"LAD algorithm Solnon, see reference . following extra arguments: domains NULL, specifies matching restrictions. must list target vertex sets, given numeric vertex ids symbolic vertex names. length list must vcount(pattern) vertex pattern gives allowed matching vertices target. Defaults NULL. induced Logical scalar, whether search induced subgraph. FALSE default. time.limit processor time limit computation, seconds. defaults Inf, means limit.","code":""},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":"-vf-method","dir":"Reference","previous_headings":"","what":"‘vf2’ method","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"method uses VF2 algorithm Cordella, Foggia et al., see references . supports vertex edge colors following extra arguments: vertex.color1, vertex.color2 Optional integer vectors giving colors vertices colored graph isomorphism. given, graph “color” vertex attribute, used. want ignore attributes, supply NULL arguments. See also examples . edge.color1, edge.color2 Optional integer vectors giving colors edges edge-colored (sub)graph isomorphism. given, graph “color” edge attribute, used. want ignore attributes, supply NULL arguments.","code":""},{"path":"https://r.igraph.org/reference/count_subgraph_isomorphisms.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Count the isomorphic mappings between a graph and the subgraphs of another graph — count_subgraph_isomorphisms","text":"LP Cordella, P Foggia, C Sansone, M Vento: improved algorithm matching large graphs, Proc. 3rd IAPR TC-15 Workshop Graphbased Representations Pattern Recognition, 149–159, 2001. C. Solnon: AllDifferent-based Filtering Subgraph Isomorphism, Artificial Intelligence 174(12-13):850–864, 2010.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/count_triangles.html","id":null,"dir":"Reference","previous_headings":"","what":"Find triangles in graphs — triangles","title":"Find triangles in graphs — triangles","text":"Count many triangles vertex part , graph, just list triangles graph.","code":""},{"path":"https://r.igraph.org/reference/count_triangles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find triangles in graphs — triangles","text":"","code":"triangles(graph) count_triangles(graph, vids = V(graph))"},{"path":"https://r.igraph.org/reference/count_triangles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find triangles in graphs — triangles","text":"graph input graph. might directed, edge directions ignored. vids vertices query, default. might vector numeric ids, character vector symbolic vertex names named graphs.","code":""},{"path":"https://r.igraph.org/reference/count_triangles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find triangles in graphs — triangles","text":"triangles() numeric vector vertex ids, first three vertices belong first triangle found, etc. count_triangles() numeric vector, number triangles vertices queried.","code":""},{"path":"https://r.igraph.org/reference/count_triangles.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find triangles in graphs — triangles","text":"triangles() lists triangles graph. efficiency, triangles returned single vector. first three vertices belong first triangle, etc. count_triangles() counts many triangles vertex part .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/count_triangles.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find triangles in graphs — triangles","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/count_triangles.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find triangles in graphs — triangles","text":"","code":"## A small graph kite <- make_graph(\"Krackhardt_Kite\") plot(kite) matrix(triangles(kite), nrow = 3) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] #> [1,] 4 4 4 4 4 4 4 4 6 6 7 #> [2,] 1 1 2 6 6 6 7 7 1 7 2 #> [3,] 2 3 5 1 3 7 2 5 3 8 5 ## Adjacenct triangles atri <- count_triangles(kite) plot(kite, vertex.label = atri) ## Always true sum(count_triangles(kite)) == length(triangles(kite)) #> [1] TRUE ## Should match, local transitivity is the ## number of adjacent triangles divided by the number ## of adjacency triples transitivity(kite, type = \"local\") #> [1] 0.6666667 0.6666667 1.0000000 0.5333333 1.0000000 0.5000000 0.5000000 #> [8] 0.3333333 0.0000000 NaN count_triangles(kite) / (degree(kite) * (degree(kite) - 1) / 2) #> [1] 0.6666667 0.6666667 1.0000000 0.5333333 1.0000000 0.5000000 0.5000000 #> [8] 0.3333333 0.0000000 NaN"},{"path":"https://r.igraph.org/reference/create.communities.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a communities object. — create.communities","title":"Creates a communities object. — create.communities","text":"create.communities() renamed make_clusters() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/create.communities.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a communities object. — create.communities","text":"","code":"create.communities( graph, membership = NULL, algorithm = NULL, merges = NULL, modularity = TRUE )"},{"path":"https://r.igraph.org/reference/create.communities.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a communities object. — create.communities","text":"graph graph community structure. membership membership vector community structure, numeric vector denoting id community vertex. might NULL hierarchical community structures. algorithm Character string, algorithm generated community structure, can arbitrary. merges merge matrix, hierarchical community structures (NULL otherwise. modularity Modularity value community structure. TRUE membership vector available, modularity values calculated automatically.","code":""},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":null,"dir":"Reference","previous_headings":"","what":"Optimal edge curvature when plotting graphs — curve_multiple","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"graphs multiple edges, drawing straight lines show plotting graphs; top . One solution bend edges, diffenent curvature, visible.","code":""},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"","code":"curve_multiple(graph, start = 0.5)"},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"graph input graph. start curvature two extreme edges. edges curvature -start start, spaced equally.","code":""},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"numeric vector, length number edges graph.","code":""},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"curve_multiple() calculates optimal edge.curved vector plotting graph multiple edges, edges visible.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/curve_multiple.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Optimal edge curvature when plotting graphs — curve_multiple","text":"","code":"g <- make_graph(c( 0, 1, 1, 0, 1, 2, 1, 3, 1, 3, 1, 3, 2, 3, 2, 3, 2, 3, 2, 3, 0, 1 ) + 1) curve_multiple(g) #> [1] -0.5000000 0.0000000 0.0000000 -0.5000000 0.0000000 0.5000000 #> [7] -0.5000000 -0.1666667 0.1666667 0.5000000 0.5000000 set.seed(42) plot(g)"},{"path":"https://r.igraph.org/reference/cutat.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to deal with the result of network community detection — cutat","title":"Functions to deal with the result of network community detection — cutat","text":"cutat() renamed cut_at() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/cutat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to deal with the result of network community detection — cutat","text":"","code":"cutat(communities, no, steps)"},{"path":"https://r.igraph.org/reference/cutat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to deal with the result of network community detection — cutat","text":"Integer scalar, desired number communities. low two high, error message given. Exactly one steps must supplied. steps number merge operations perform produce communities. Exactly one steps must supplied.","code":""},{"path":"https://r.igraph.org/reference/decompose.graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Decompose a graph into components — decompose.graph","title":"Decompose a graph into components — decompose.graph","text":"decompose.graph() renamed decompose() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/decompose.graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decompose a graph into components — decompose.graph","text":"","code":"decompose.graph( graph, mode = c(\"weak\", \"strong\"), max.comps = NA, min.vertices = 0 )"},{"path":"https://r.igraph.org/reference/decompose.graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decompose a graph into components — decompose.graph","text":"graph original graph. mode Character constant giving type components, wither weak weakly connected components strong strongly connected components. max.comps maximum number components return. first max.comps components returned (hold least min.vertices vertices, see next parameter), others ignored. Supply NA want limit number components. min.vertices minimum number vertices component contain order place result list. E.g. supply 2 ignore isolate vertices.","code":""},{"path":"https://r.igraph.org/reference/decompose.html","id":null,"dir":"Reference","previous_headings":"","what":"Decompose a graph into components — decompose","title":"Decompose a graph into components — decompose","text":"Creates separate graph connected component graph.","code":""},{"path":"https://r.igraph.org/reference/decompose.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decompose a graph into components — decompose","text":"","code":"decompose(graph, mode = c(\"weak\", \"strong\"), max.comps = NA, min.vertices = 0)"},{"path":"https://r.igraph.org/reference/decompose.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decompose a graph into components — decompose","text":"graph original graph. mode Character constant giving type components, wither weak weakly connected components strong strongly connected components. max.comps maximum number components return. first max.comps components returned (hold least min.vertices vertices, see next parameter), others ignored. Supply NA want limit number components. min.vertices minimum number vertices component contain order place result list. E.g. supply 2 ignore isolate vertices.","code":""},{"path":"https://r.igraph.org/reference/decompose.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decompose a graph into components — decompose","text":"list graph objects.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/decompose.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Decompose a graph into components — decompose","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/decompose.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decompose a graph into components — decompose","text":"","code":"# the diameter of each component in a random graph g <- sample_gnp(1000, 1 / 1000) components <- decompose(g, min.vertices = 2) sapply(components, diameter) #> [1] 1 2 1 15 11 14 1 4 20 3 1 8 5 5 14 1 2 8 6 2 4 3 2 4 2 #> [26] 6 15 1 4 1 1 2 1 6 4 5 1 1 7 2 1 2 1 1 1 1 1 5 1 2 #> [51] 7 1 2 1 1 5 1 6 3 1 1 7 2 2 1 2 3 3 1 1 1 1 4 3 1 #> [76] 1 3 4 2 1 1 4 1 2 4 1 1 2 2 2 5 1 2 1 1 1 1 2 1 2 #> [101] 1 1 1 1 2 1 3 1 1 1 1 1 1 2 1 1 2 1 1 1 1 3 1 1 1 #> [126] 1 2 1 1 1 2 1 1 1"},{"path":"https://r.igraph.org/reference/degree.distribution.html","id":null,"dir":"Reference","previous_headings":"","what":"Degree and degree distribution of the vertices — degree.distribution","title":"Degree and degree distribution of the vertices — degree.distribution","text":"degree.distribution() renamed degree_distribution() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/degree.distribution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Degree and degree distribution of the vertices — degree.distribution","text":"","code":"degree.distribution(graph, cumulative = FALSE, ...)"},{"path":"https://r.igraph.org/reference/degree.distribution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Degree and degree distribution of the vertices — degree.distribution","text":"graph graph analyze. cumulative Logical; whether cumulative degree distribution calculated. ... Additional arguments pass degree(), e.g. mode useful also v loops make sense.","code":""},{"path":"https://r.igraph.org/reference/degree.html","id":null,"dir":"Reference","previous_headings":"","what":"Degree and degree distribution of the vertices — degree","title":"Degree and degree distribution of the vertices — degree","text":"degree vertex basic structural property, number adjacent edges.","code":""},{"path":"https://r.igraph.org/reference/degree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Degree and degree distribution of the vertices — degree","text":"","code":"degree( graph, v = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), loops = TRUE, normalized = FALSE ) degree_distribution(graph, cumulative = FALSE, ...)"},{"path":"https://r.igraph.org/reference/degree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Degree and degree distribution of the vertices — degree","text":"graph graph analyze. v ids vertices degree calculated. mode Character string, “” -degree, “” -degree “total” sum two. undirected graphs argument ignored. “” synonym “total”. loops Logical; whether loop edges also counted. normalized Logical scalar, whether normalize degree. TRUE result divided \\(n-1\\), \\(n\\) number vertices graph. cumulative Logical; whether cumulative degree distribution calculated. ... Additional arguments pass degree(), e.g. mode useful also v loops make sense.","code":""},{"path":"https://r.igraph.org/reference/degree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Degree and degree distribution of the vertices — degree","text":"degree() numeric vector length argument v. degree_distribution() numeric vector length maximum degree plus one. first element relative frequency zero degree vertices, second vertices degree one, etc.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/degree.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Degree and degree distribution of the vertices — degree","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/degree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Degree and degree distribution of the vertices — degree","text":"","code":"g <- make_ring(10) degree(g) #> [1] 2 2 2 2 2 2 2 2 2 2 g2 <- sample_gnp(1000, 10 / 1000) degree_distribution(g2) #> [1] 0.001 0.000 0.002 0.005 0.026 0.038 0.058 0.101 0.118 0.117 0.118 0.113 #> [13] 0.098 0.081 0.057 0.027 0.019 0.010 0.004 0.004 0.000 0.002 0.001"},{"path":"https://r.igraph.org/reference/degree.sequence.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs with a given degree sequence — degree.sequence.game","title":"Generate random graphs with a given degree sequence — degree.sequence.game","text":"degree.sequence.game() renamed sample_degseq() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/degree.sequence.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs with a given degree sequence — degree.sequence.game","text":"","code":"degree.sequence.game( out.deg, in.deg = NULL, method = c(\"simple\", \"vl\", \"simple.no.multiple\", \"simple.no.multiple.uniform\") )"},{"path":"https://r.igraph.org/reference/degree.sequence.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs with a given degree sequence — degree.sequence.game","text":".deg Numeric vector, sequence degrees (undirected graphs) -degrees (directed graphs). undirected graphs sum even. directed graphs sum sum .deg. .deg directed graph, -degree sequence. default NULL undirected graph created. method Character, method generating graph. Right now “simple”, “simple..multiple” “vl” methods implemented.","code":""},{"path":"https://r.igraph.org/reference/delete.edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete edges from a graph — delete.edges","title":"Delete edges from a graph — delete.edges","text":"delete.edges() renamed delete_edges() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/delete.edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete edges from a graph — delete.edges","text":"","code":"delete.edges(graph, edges)"},{"path":"https://r.igraph.org/reference/delete.edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete edges from a graph — delete.edges","text":"graph input graph. edges edges remove, specified edge sequence. Typically either numeric vector containing edge IDs, character vector containing IDs names source target vertices, separated |","code":""},{"path":"https://r.igraph.org/reference/delete.vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete vertices from a graph — delete.vertices","title":"Delete vertices from a graph — delete.vertices","text":"delete.vertices() renamed delete_vertices() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/delete.vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete vertices from a graph — delete.vertices","text":"","code":"delete.vertices(graph, v)"},{"path":"https://r.igraph.org/reference/delete.vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete vertices from a graph — delete.vertices","text":"graph input graph. v vertices remove, vertex sequence.","code":""},{"path":"https://r.igraph.org/reference/delete_edge_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete an edge attribute — delete_edge_attr","title":"Delete an edge attribute — delete_edge_attr","text":"Delete edge attribute","code":""},{"path":"https://r.igraph.org/reference/delete_edge_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete an edge attribute — delete_edge_attr","text":"","code":"delete_edge_attr(graph, name)"},{"path":"https://r.igraph.org/reference/delete_edge_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete an edge attribute — delete_edge_attr","text":"graph graph name name edge attribute delete.","code":""},{"path":"https://r.igraph.org/reference/delete_edge_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete an edge attribute — delete_edge_attr","text":"graph, specified edge attribute removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/delete_edge_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delete an edge attribute — delete_edge_attr","text":"","code":"g <- make_ring(10) %>% set_edge_attr(\"name\", value = LETTERS[1:10]) edge_attr_names(g) #> [1] \"name\" g2 <- delete_edge_attr(g, \"name\") edge_attr_names(g2) #> character(0)"},{"path":"https://r.igraph.org/reference/delete_edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete edges from a graph — delete_edges","title":"Delete edges from a graph — delete_edges","text":"Delete edges graph","code":""},{"path":"https://r.igraph.org/reference/delete_edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete edges from a graph — delete_edges","text":"","code":"delete_edges(graph, edges)"},{"path":"https://r.igraph.org/reference/delete_edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete edges from a graph — delete_edges","text":"graph input graph. edges edges remove, specified edge sequence. Typically either numeric vector containing edge IDs, character vector containing IDs names source target vertices, separated |","code":""},{"path":"https://r.igraph.org/reference/delete_edges.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete edges from a graph — delete_edges","text":"graph, edges removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/delete_edges.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delete edges from a graph — delete_edges","text":"","code":"g <- make_ring(10) %>% delete_edges(seq(1, 9, by = 2)) g #> IGRAPH d769bde U--- 10 5 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from d769bde: #> [1] 2-- 3 4-- 5 6-- 7 8-- 9 1--10 g <- make_ring(10) %>% delete_edges(\"10|1\") g #> IGRAPH c9fd53f U--- 10 9 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from c9fd53f: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 g <- make_ring(5) g <- delete_edges(g, get.edge.ids(g, c(1, 5, 4, 5))) g #> IGRAPH 01bec05 U--- 5 3 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from 01bec05: #> [1] 1--2 2--3 3--4"},{"path":"https://r.igraph.org/reference/delete_graph_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete a graph attribute — delete_graph_attr","title":"Delete a graph attribute — delete_graph_attr","text":"Delete graph attribute","code":""},{"path":"https://r.igraph.org/reference/delete_graph_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete a graph attribute — delete_graph_attr","text":"","code":"delete_graph_attr(graph, name)"},{"path":"https://r.igraph.org/reference/delete_graph_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete a graph attribute — delete_graph_attr","text":"graph graph. name Name attribute delete.","code":""},{"path":"https://r.igraph.org/reference/delete_graph_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete a graph attribute — delete_graph_attr","text":"graph, specified attribute removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/delete_graph_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delete a graph attribute — delete_graph_attr","text":"","code":"g <- make_ring(10) graph_attr_names(g) #> [1] \"name\" \"mutual\" \"circular\" g2 <- delete_graph_attr(g, \"name\") graph_attr_names(g2) #> [1] \"mutual\" \"circular\""},{"path":"https://r.igraph.org/reference/delete_vertex_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete a vertex attribute — delete_vertex_attr","title":"Delete a vertex attribute — delete_vertex_attr","text":"Delete vertex attribute","code":""},{"path":"https://r.igraph.org/reference/delete_vertex_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete a vertex attribute — delete_vertex_attr","text":"","code":"delete_vertex_attr(graph, name)"},{"path":"https://r.igraph.org/reference/delete_vertex_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete a vertex attribute — delete_vertex_attr","text":"graph graph name name vertex attribute delete.","code":""},{"path":"https://r.igraph.org/reference/delete_vertex_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete a vertex attribute — delete_vertex_attr","text":"graph, specified vertex attribute removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/delete_vertex_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delete a vertex attribute — delete_vertex_attr","text":"","code":"g <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) vertex_attr_names(g) #> [1] \"name\" g2 <- delete_vertex_attr(g, \"name\") vertex_attr_names(g2) #> character(0)"},{"path":"https://r.igraph.org/reference/delete_vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete vertices from a graph — delete_vertices","title":"Delete vertices from a graph — delete_vertices","text":"Delete vertices graph","code":""},{"path":"https://r.igraph.org/reference/delete_vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete vertices from a graph — delete_vertices","text":"","code":"delete_vertices(graph, v)"},{"path":"https://r.igraph.org/reference/delete_vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete vertices from a graph — delete_vertices","text":"graph input graph. v vertices remove, vertex sequence.","code":""},{"path":"https://r.igraph.org/reference/delete_vertices.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete vertices from a graph — delete_vertices","text":"graph, vertices removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/delete_vertices.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delete vertices from a graph — delete_vertices","text":"","code":"g <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) g #> IGRAPH fd964cd UN-- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from fd964cd (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J V(g) #> + 10/10 vertices, named, from fd964cd: #> [1] A B C D E F G H I J g2 <- delete_vertices(g, c(1, 5)) %>% delete_vertices(\"B\") g2 #> IGRAPH ef87af5 UN-- 7 5 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from ef87af5 (vertex names): #> [1] C--D F--G G--H H--I I--J V(g2) #> + 7/7 vertices, named, from ef87af5: #> [1] C D F G H I J"},{"path":"https://r.igraph.org/reference/dendPlot.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure dendrogram plots — dendPlot","title":"Community structure dendrogram plots — dendPlot","text":"dendPlot() renamed plot_dendrogram() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/dendPlot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure dendrogram plots — dendPlot","text":"","code":"dendPlot(x, mode = igraph_opt(\"dend.plot.type\"), ...)"},{"path":"https://r.igraph.org/reference/dendPlot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure dendrogram plots — dendPlot","text":"x object containing community structure graph. See communities() details. mode dendrogram plotting function use. See details . ... Additional arguments supply dendrogram plotting function.","code":""},{"path":"https://r.igraph.org/reference/dfs.html","id":null,"dir":"Reference","previous_headings":"","what":"Depth-first search — dfs","title":"Depth-first search — dfs","text":"Depth-first search algorithm traverse graph. starts root vertex tries go quickly far possible.","code":""},{"path":"https://r.igraph.org/reference/dfs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Depth-first search — dfs","text":"","code":"dfs( graph, root, mode = c(\"out\", \"in\", \"all\", \"total\"), unreachable = TRUE, order = TRUE, order.out = FALSE, father = FALSE, dist = FALSE, in.callback = NULL, out.callback = NULL, extra = NULL, rho = parent.frame(), neimode )"},{"path":"https://r.igraph.org/reference/dfs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Depth-first search — dfs","text":"graph input graph. root single root vertex start search . mode directed graphs specifies type edges follow. ‘’ follows outgoing, ‘’ incoming edges. ‘’ ignores edge directions completely. ‘total’ synonym ‘’. argument ignored undirected graphs. unreachable Logical scalar, whether search visit vertices unreachable given root vertex (vertices). TRUE, additional searches performed vertices visited. order Logical scalar, whether return DFS ordering vertices. order.Logical scalar, whether return ordering based leaving subtree vertex. father Logical scalar, whether return father vertices. dist Logical scalar, whether return distance root search tree. .callback NULL, must callback function. called whenever vertex visited. See details . .callback NULL, must callback function. called whenever subtree vertex completed algorithm. See details . extra Additional argument supply callback function. rho environment callback function evaluated. neimode argument deprecated igraph 1.3.0; use mode instead.","code":""},{"path":"https://r.igraph.org/reference/dfs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Depth-first search — dfs","text":"named list following entries: root Numeric scalar. root vertex used starting point search. neimode Character scalar. mode argument function call. Note undirected graphs always ‘’, irrespectively supplied value. order Numeric vector. vertex ids, order visited search. order.Numeric vector, vertex ids, order completion subtree. father Numeric vector. father vertex, .e. vertex discovered . dist Numeric vector, vertex distance root search tree. Note order, order., father, dist might NULL corresponding argument FALSE, .e. calculation requested.","code":""},{"path":"https://r.igraph.org/reference/dfs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Depth-first search — dfs","text":"callback functions must following arguments: graph input graph passed callback function . data named numeric vector, following entries: ‘vid’, vertex just visited ‘dist’, distance root search tree. extra extra argument. callback must return FALSE continue search TRUE terminate . See examples use callback functions.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/dfs.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Depth-first search — dfs","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/dfs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Depth-first search — dfs","text":"","code":"## A graph with two separate trees dfs(make_tree(10) %du% make_tree(10), root = 1, \"out\", TRUE, TRUE, TRUE, TRUE ) #> $root #> [1] 1 #> #> $mode #> [1] \"out\" #> #> $order #> + 20/20 vertices, from 40a4b3d: #> [1] 1 2 4 8 9 5 10 3 6 7 11 12 14 18 19 15 20 13 16 17 #> #> $order.out #> + 20/20 vertices, from 40a4b3d: #> [1] 8 9 4 10 5 2 6 7 3 1 18 19 14 20 15 12 16 17 13 11 #> #> $father #> + 20/20 vertices, from 40a4b3d: #> [1] NA 1 1 2 2 3 3 4 4 5 NA 11 11 12 12 13 13 14 14 15 #> #> $dist #> NULL #> #> $neimode #> [1] \"out\" #> ## How to use a callback f.in <- function(graph, data, extra) { cat(\"in:\", paste(collapse = \", \", data), \"\\n\") FALSE } f.out <- function(graph, data, extra) { cat(\"out:\", paste(collapse = \", \", data), \"\\n\") FALSE } tmp <- dfs(make_tree(10), root = 1, \"out\", in.callback = f.in, out.callback = f.out ) #> in: 1, 0 #> in: 2, 1 #> in: 4, 2 #> in: 8, 3 #> out: 8, 2 #> in: 9, 3 #> out: 9, 2 #> out: 4, 1 #> in: 5, 2 #> in: 10, 3 #> out: 10, 2 #> out: 5, 1 #> out: 2, 0 #> in: 3, 1 #> in: 6, 2 #> out: 6, 1 #> in: 7, 2 #> out: 7, 1 #> out: 3, 0 #> out: 1, -1 ## Terminate after the first component, using a callback f.out <- function(graph, data, extra) { data[\"vid\"] == 1 } tmp <- dfs(make_tree(10) %du% make_tree(10), root = 1, out.callback = f.out )"},{"path":"https://r.igraph.org/reference/diameter.html","id":null,"dir":"Reference","previous_headings":"","what":"Diameter of a graph — diameter","title":"Diameter of a graph — diameter","text":"diameter graph length longest geodesic.","code":""},{"path":"https://r.igraph.org/reference/diameter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Diameter of a graph — diameter","text":"","code":"diameter(graph, directed = TRUE, unconnected = TRUE, weights = NULL) get_diameter(graph, directed = TRUE, unconnected = TRUE, weights = NULL) farthest_vertices(graph, directed = TRUE, unconnected = TRUE, weights = NULL)"},{"path":"https://r.igraph.org/reference/diameter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Diameter of a graph — diameter","text":"graph graph analyze. directed Logical, whether directed undirected paths considered. ignored undirected graphs. unconnected Logical, graph unconnected. FALSE, function return number one larger largest possible diameter, always number vertices. TRUE, diameters connected components calculated largest one returned. weights Optional positive weight vector calculating weighted distances. graph weight edge attribute, used default.","code":""},{"path":"https://r.igraph.org/reference/diameter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Diameter of a graph — diameter","text":"numeric constant diameter(), numeric vector get_diameter(). farthest_vertices() returns list two entries: vertices two vertices farthest. distance distance.","code":""},{"path":"https://r.igraph.org/reference/diameter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Diameter of a graph — diameter","text":"diameter calculated using breadth-first search like method. get_diameter() returns path actual diameter. many shortest paths length diameter, returns first one found. farthest_vertices() returns two vertex ids, vertices connected diameter path.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/diameter.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Diameter of a graph — diameter","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/diameter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Diameter of a graph — diameter","text":"","code":"g <- make_ring(10) g2 <- delete_edges(g, c(1, 2, 1, 10)) diameter(g2, unconnected = TRUE) #> [1] 7 diameter(g2, unconnected = FALSE) #> [1] Inf ## Weighted diameter set.seed(1) g <- make_ring(10) E(g)$weight <- sample(seq_len(ecount(g))) diameter(g) #> [1] 27 get_diameter(g) #> + 5/10 vertices, from 7ccc57a: #> [1] 1 10 9 8 7 diameter(g, weights = NA) #> [1] 5 get_diameter(g, weights = NA) #> + 6/10 vertices, from 7ccc57a: #> [1] 1 2 3 4 5 6"},{"path":"https://r.igraph.org/reference/difference.html","id":null,"dir":"Reference","previous_headings":"","what":"Difference of two sets — difference","title":"Difference of two sets — difference","text":"S3 generic function. See methods(\"difference\") actual implementations various S3 classes. Initially implemented igraph graphs (difference edges two graphs), igraph vertex edge sequences. See difference.igraph(), difference.igraph.vs().","code":""},{"path":"https://r.igraph.org/reference/difference.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Difference of two sets — difference","text":"","code":"difference(...)"},{"path":"https://r.igraph.org/reference/difference.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Difference of two sets — difference","text":"... Arguments, number interpretation depends function implements difference().","code":""},{"path":"https://r.igraph.org/reference/difference.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Difference of two sets — difference","text":"Depends function implements method.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/difference.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Difference of edge sequences — difference.igraph.es","title":"Difference of edge sequences — difference.igraph.es","text":"Difference edge sequences","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Difference of edge sequences — difference.igraph.es","text":"","code":"# S3 method for class 'igraph.es' difference(big, small, ...)"},{"path":"https://r.igraph.org/reference/difference.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Difference of edge sequences — difference.igraph.es","text":"big ‘big’ edge sequence. small ‘small’ edge sequence. ... Ignored, included S3 signature compatibility.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Difference of edge sequences — difference.igraph.es","text":"edge sequence contains edges part big, part small.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.es.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Difference of edge sequences — difference.igraph.es","text":"must belong graph. Note function ‘set’ semantics multiplicity edges lost result.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/difference.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Difference of edge sequences — difference.igraph.es","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) difference(V(g), V(g)[6:10]) #> + 5/10 vertices, named, from a890567: #> [1] A B C D E"},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Difference of graphs — difference.igraph","title":"Difference of graphs — difference.igraph","text":"difference two graphs created.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Difference of graphs — difference.igraph","text":"","code":"# S3 method for class 'igraph' difference(big, small, byname = \"auto\", ...)"},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Difference of graphs — difference.igraph","text":"big left hand side argument minus operator. directed undirected graph. small right hand side argument minus operator. directed ot undirected graph. byname logical scalar, character scalar auto. Whether perform operation based symbolic vertex names. auto, means TRUE graphs named FALSE otherwise. warning generated auto one graph, graphs named. ... Ignored, included S3 compatibility.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Difference of graphs — difference.igraph","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Difference of graphs — difference.igraph","text":"difference() creates difference two graphs. edges present first graph second included new graph. corresponding operator %m%. byname argument TRUE (auto graphs named), operation performed based symbolic vertex names. Otherwise numeric vertex ids used. difference() keeps attributes (graph, vertex edge) first graph. Note big small must directed undirected, otherwise error message given.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Difference of graphs — difference.igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Difference of graphs — difference.igraph","text":"","code":"## Create a wheel graph wheel <- union( make_ring(10), make_star(11, center = 11, mode = \"undirected\") ) V(wheel)$name <- letters[seq_len(vcount(wheel))] ## Subtract a star graph from it sstar <- make_star(6, center = 6, mode = \"undirected\") V(sstar)$name <- letters[c(1, 3, 5, 7, 9, 11)] G <- wheel %m% sstar print_all(G) #> IGRAPH 80025ba UN-- 11 15 -- #> + attr: name_1 (g/c), name_2 (g/c), mutual (g/l), circular (g/l), mode #> | (g/c), center (g/n), name (v/c) #> + edges (vertex names): #> a -- b, j #> b -- a, c, k #> c -- b, d #> d -- c, e, k #> e -- d, f #> f -- e, g, k #> g -- f, h #> h -- g, i, k #> i -- h, j #> j -- a, i, k #> k -- b, d, f, h, j plot(G, layout = layout_nicely(wheel))"},{"path":"https://r.igraph.org/reference/difference.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Difference of vertex sequences — difference.igraph.vs","title":"Difference of vertex sequences — difference.igraph.vs","text":"Difference vertex sequences","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Difference of vertex sequences — difference.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' difference(big, small, ...)"},{"path":"https://r.igraph.org/reference/difference.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Difference of vertex sequences — difference.igraph.vs","text":"big ‘big’ vertex sequence. small ‘small’ vertex sequence. ... Ignored, included S3 signature compatibility.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Difference of vertex sequences — difference.igraph.vs","text":"vertex sequence contains vertices part big, part small.","code":""},{"path":"https://r.igraph.org/reference/difference.igraph.vs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Difference of vertex sequences — difference.igraph.vs","text":"must belong graph. Note function ‘set’ semantics multiplicity vertices lost result.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/difference.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Difference of vertex sequences — difference.igraph.vs","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) difference(V(g), V(g)[6:10]) #> + 5/10 vertices, named, from f945b9a: #> [1] A B C D E"},{"path":"https://r.igraph.org/reference/dim_select.html","id":null,"dir":"Reference","previous_headings":"","what":"Dimensionality selection for singular values using profile likelihood. — dim_select","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"Select number significant singular values, finding ‘elbow’ scree plot, principled way.","code":""},{"path":"https://r.igraph.org/reference/dim_select.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"","code":"dim_select(sv)"},{"path":"https://r.igraph.org/reference/dim_select.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"sv numeric vector, ordered singular values.","code":""},{"path":"https://r.igraph.org/reference/dim_select.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"numeric scalar, estimate \\(d\\).","code":""},{"path":"https://r.igraph.org/reference/dim_select.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"input function numeric vector contains measure ‘importance’ dimension. spectral embedding, singular values adjacency matrix. singular values assumed generated Gaussian mixture distribution two components different means variance. dimensionality \\(d\\) chosen maximize likelihood \\(d\\) largest singular values assigned one component mixture rest singular values assigned component. function can also used general separation problem, assume left right vector coming two Normal distributions, different means, want know border. See examples .","code":""},{"path":"https://r.igraph.org/reference/dim_select.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"M. Zhu, . Ghodsi (2006). Automatic dimensionality selection scree plot via use profile likelihood. Computational Statistics Data Analysis, Vol. 51, 918–930.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/dim_select.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/dim_select.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dimensionality selection for singular values using profile likelihood. — dim_select","text":"","code":"# Generate the two groups of singular values with # Gaussian mixture of two components that have different means sing.vals <- c(rnorm(10, mean = 1, sd = 1), rnorm(10, mean = 3, sd = 1)) dim.chosen <- dim_select(sing.vals) dim.chosen #> [1] 9 # Sample random vectors with multivariate normal distribution # and normalize to unit length lpvs <- matrix(rnorm(200), 10, 20) lpvs <- apply(lpvs, 2, function(x) { (abs(x) / sqrt(sum(x^2))) }) RDP.graph <- sample_dot_product(lpvs) dim_select(embed_adjacency_matrix(RDP.graph, 10)$D) #> [1] 1 # Sample random vectors with the Dirichlet distribution lpvs.dir <- sample_dirichlet(n = 20, rep(1, 10)) RDP.graph.2 <- sample_dot_product(lpvs.dir) dim_select(embed_adjacency_matrix(RDP.graph.2, 10)$D) #> [1] 1 # Sample random vectors from hypersphere with radius 1. lpvs.sph <- sample_sphere_surface(dim = 10, n = 20, radius = 1) RDP.graph.3 <- sample_dot_product(lpvs.sph) dim_select(embed_adjacency_matrix(RDP.graph.3, 10)$D) #> [1] 1"},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":null,"dir":"Reference","previous_headings":"","what":"Disjoint union of graphs — disjoint_union","title":"Disjoint union of graphs — disjoint_union","text":"union two graphs created. graphs assumed disjoint vertex sets.","code":""},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Disjoint union of graphs — disjoint_union","text":"","code":"disjoint_union(...) x %du% y"},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Disjoint union of graphs — disjoint_union","text":"... Graph objects lists graph objects. x, y Graph objects.","code":""},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Disjoint union of graphs — disjoint_union","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Disjoint union of graphs — disjoint_union","text":"disjoint_union() creates union two disjoint graphs. Thus first vertices second, third, etc. graphs relabeled completely disjoint graphs. simple union created. function can also used via %du% operator. graph.disjont.union handles graph, vertex edge attributes. particular, merges vertex edge attributes using basic c() function. graphs lack vertex/edge attribute, corresponding values new graph set NA. Graph attributes simply copied result. result name clash, renamed adding suffixes: _1, _2, etc. Note graphs vertex names (.e. name vertex attribute), concatenated vertex names might non-unique result. warning given happens. error generated input graphs directed others undirected.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Disjoint union of graphs — disjoint_union","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/disjoint_union.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Disjoint union of graphs — disjoint_union","text":"","code":"## A star and a ring g1 <- make_star(10, mode = \"undirected\") V(g1)$name <- letters[1:10] g2 <- make_ring(10) V(g2)$name <- letters[11:20] print_all(g1 %du% g2) #> IGRAPH 92afef0 UN-- 20 19 -- #> + attr: name_1 (g/c), name_2 (g/c), mode (g/c), center (g/n), mutual #> | (g/l), circular (g/l), name (v/c) #> + edges from 92afef0 (vertex names): #> [1] a--b a--c a--d a--e a--f a--g a--h a--i a--j k--l l--m m--n n--o o--p p--q #> [16] q--r r--s s--t k--t"},{"path":"https://r.igraph.org/reference/distances.html","id":null,"dir":"Reference","previous_headings":"","what":"Shortest (directed or undirected) paths between vertices — distance_table","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"distances() calculates length shortest paths vertices network. shortest_paths() calculates one shortest path (path , just length) given vertex.","code":""},{"path":"https://r.igraph.org/reference/distances.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"","code":"distance_table(graph, directed = TRUE) mean_distance( graph, weights = NULL, directed = TRUE, unconnected = TRUE, details = FALSE ) distances( graph, v = V(graph), to = V(graph), mode = c(\"all\", \"out\", \"in\"), weights = NULL, algorithm = c(\"automatic\", \"unweighted\", \"dijkstra\", \"bellman-ford\", \"johnson\", \"floyd-warshall\") ) shortest_paths( graph, from, to = V(graph), mode = c(\"out\", \"all\", \"in\"), weights = NULL, output = c(\"vpath\", \"epath\", \"both\"), predecessors = FALSE, inbound.edges = FALSE, algorithm = c(\"automatic\", \"unweighted\", \"dijkstra\", \"bellman-ford\") ) all_shortest_paths( graph, from, to = V(graph), mode = c(\"out\", \"all\", \"in\"), weights = NULL )"},{"path":"https://r.igraph.org/reference/distances.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"graph graph work . directed Whether consider directed paths directed graphs, argument ignored undirected graphs. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). unconnected graph unconnected (strongly connected directed paths considered). TRUE, lengths existing paths considered averaged; FALSE, length missing paths considered infinite length, making mean distance infinite well. details Whether provide additional details result. Functions accepting argument (like mean_distance()) return additional information like number disconnected vertex pairs result parameter set TRUE. v Numeric vector, vertices shortest paths calculated. Numeric vector, vertices shortest paths calculated. default includes vertices. Note distances() every vertex must included . (required shortest_paths(). mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, corresponding undirected graph used, .e. directed paths searched. argument ignored undirected graphs. algorithm algorithm use calculation. default igraph tries select fastest suitable algorithm. weights, unweighted breadth-first search used, otherwise weights positive, Dijkstra's algorithm used. negative weights calculation 100 sources, Johnson's algorithm used. Otherwise Bellman-Ford algorithm used. can override igraph's choice explicitly giving parameter. Note igraph C core might still override choice obvious cases, .e. edge weights, unweighted algorithm used, regardless argument. Numeric constant, vertex shortest paths calculated. Note right now vector vertex ids, single vertex. output Character scalar, defines report shortest paths. “vpath” means vertices along paths reported, form used prior igraph version 0.6. “epath” means edges along paths reported. “” means forms returned, named list components “vpath” “epath”. predecessors Logical scalar, whether return predecessor vertex vertex. predecessor vertex tree vertex vertex reached. predecessor start vertex (argument) definition. predecessor zero, means given vertex reached source search. Note search terminates vertices reached. inbound.edges Logical scalar, whether return inbound edge vertex. inbound edge vertex tree edge via vertex reached. start vertex vertices reached search zero corresponding entry vector. Note search terminates vertices reached.","code":""},{"path":"https://r.igraph.org/reference/distances.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"distances() numeric matrix length() columns length(v) rows. shortest path length vertex always zero. unreachable vertices Inf included. shortest_paths() named list four entries returned: vpath list, length length(); list element contains vertex ids path vertex vertex [] (way directed graphs depending mode argument). vector also contains first last elements. included . path two vertices numeric vector length zero returned list element. output requested output argument, NULL. epath list similar vpath, vectors list contain edge ids along shortest paths, instead vertex ids. entry set NULL requested output argument. predecessors Numeric vector, predecessor vertex argument, NULL requested. inbound_edges Numeric vector, inbound edge vertex, NULL, requested. all_shortest_paths() list returned, list element contains shortest path vertex . shortest paths vertex collected consecutive elements list. mean_distance() single number returned details=FALSE, named list two entries: res mean distance numeric scalar unconnected number unconnected vertex pairs, also numeric scalar. distance_table() returns named list two entries: res numeric vector, histogram distances, unconnected numeric scalar, number pairs first vertex reachable second. undirected directed graphs, unorderde ordered pairs considered, respectively. Therefore sum two entries always \\(n(n-1)\\) directed graphs \\(n(n-1)/2\\) undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/distances.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"shortest path, geodesic two pair vertices path minimal number vertices. functions documented manual page calculate shortest paths vertex pairs. distances() calculates lengths pairwise shortest paths set vertices () another set vertices (). uses different algorithms, depending algorithm argument weight edge attribute graph. implemented algorithms breadth-first search (‘unweighted’), works unweighted graphs; Dijkstra algorithm (‘dijkstra’), works graphs non-negative edge weights; Bellman-Ford algorithm (‘bellman-ford’); Johnson's algorithm (‘johnson’); faster version Floyd-Warshall algorithm expected quadratic running time (‘floyd-warshall’). latter three algorithms work arbitrary edge weights, (naturally) graphs negative cycle. Note negative-weight edge undirected graph implies cycle. Johnson's algorithm performs better Bellman-Ford one many source (target) vertices given, -pairs shortest path length calculations typical use case. igraph can choose automatically algorithms, chooses efficient one appropriate supplied weights (). automatic algorithm selection, supply ‘automatic’ algorithm argument. (also default.) shortest_paths() calculates single shortest path (.e. path , just length) source vertex given , target vertices given . shortest_paths() uses breadth-first search unweighted graphs Dijkstra's algorithm weighted graphs. latter works edge weights non-negative. all_shortest_paths() calculates shortest paths pairs vertices, including several shortest paths length. precisely, computerd shortest path starting , ending vertex given . uses breadth-first search unweighted graphs Dijkstra's algorithm weighted ones. latter supports non-negative edge weights. Caution: multigraphs, result size exponentially large number vertex pairs multiple edges . mean_distance() calculates average path length graph, calculating shortest paths pairs vertices (ways directed graphs). uses breadth-first search unweighted graphs Dijkstra's algorithm weighted ones. latter supports non-negative edge weights. distance_table() calculates histogram, calculating shortest path length pair vertices. directed graphs directions considered, every pair vertices appears twice histogram.","code":""},{"path":"https://r.igraph.org/reference/distances.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"West, D.B. (1996). Introduction Graph Theory. Upper Saddle River, N.J.: Prentice Hall.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/distances.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/distances.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shortest (directed or undirected) paths between vertices — distance_table","text":"","code":"g <- make_ring(10) distances(g) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> [1,] 0 1 2 3 4 5 4 3 2 1 #> [2,] 1 0 1 2 3 4 5 4 3 2 #> [3,] 2 1 0 1 2 3 4 5 4 3 #> [4,] 3 2 1 0 1 2 3 4 5 4 #> [5,] 4 3 2 1 0 1 2 3 4 5 #> [6,] 5 4 3 2 1 0 1 2 3 4 #> [7,] 4 5 4 3 2 1 0 1 2 3 #> [8,] 3 4 5 4 3 2 1 0 1 2 #> [9,] 2 3 4 5 4 3 2 1 0 1 #> [10,] 1 2 3 4 5 4 3 2 1 0 shortest_paths(g, 5) #> $vpath #> $vpath[[1]] #> + 5/10 vertices, from d40e144: #> [1] 5 4 3 2 1 #> #> $vpath[[2]] #> + 4/10 vertices, from d40e144: #> [1] 5 4 3 2 #> #> $vpath[[3]] #> + 3/10 vertices, from d40e144: #> [1] 5 4 3 #> #> $vpath[[4]] #> + 2/10 vertices, from d40e144: #> [1] 5 4 #> #> $vpath[[5]] #> + 1/10 vertex, from d40e144: #> [1] 5 #> #> $vpath[[6]] #> + 2/10 vertices, from d40e144: #> [1] 5 6 #> #> $vpath[[7]] #> + 3/10 vertices, from d40e144: #> [1] 5 6 7 #> #> $vpath[[8]] #> + 4/10 vertices, from d40e144: #> [1] 5 6 7 8 #> #> $vpath[[9]] #> + 5/10 vertices, from d40e144: #> [1] 5 6 7 8 9 #> #> $vpath[[10]] #> + 6/10 vertices, from d40e144: #> [1] 5 4 3 2 1 10 #> #> #> $epath #> NULL #> #> $predecessors #> NULL #> #> $inbound_edges #> NULL #> all_shortest_paths(g, 1, 6:8) #> $vpaths #> $vpaths[[1]] #> + 6/10 vertices, from d40e144: #> [1] 1 10 9 8 7 6 #> #> $vpaths[[2]] #> + 6/10 vertices, from d40e144: #> [1] 1 2 3 4 5 6 #> #> $vpaths[[3]] #> + 5/10 vertices, from d40e144: #> [1] 1 10 9 8 7 #> #> $vpaths[[4]] #> + 4/10 vertices, from d40e144: #> [1] 1 10 9 8 #> #> #> $epaths #> $epaths[[1]] #> [1] 10 9 8 7 6 #> #> $epaths[[2]] #> [1] 1 2 3 4 5 #> #> $epaths[[3]] #> [1] 10 9 8 7 #> #> $epaths[[4]] #> [1] 10 9 8 #> #> #> $nrgeo #> [1] 1 1 1 1 1 2 1 1 1 1 #> #> $res #> $res[[1]] #> + 6/10 vertices, from d40e144: #> [1] 1 10 9 8 7 6 #> #> $res[[2]] #> + 6/10 vertices, from d40e144: #> [1] 1 2 3 4 5 6 #> #> $res[[3]] #> + 5/10 vertices, from d40e144: #> [1] 1 10 9 8 7 #> #> $res[[4]] #> + 4/10 vertices, from d40e144: #> [1] 1 10 9 8 #> #> mean_distance(g) #> [1] 2.777778 ## Weighted shortest paths el <- matrix( ncol = 3, byrow = TRUE, c( 1, 2, 0, 1, 3, 2, 1, 4, 1, 2, 3, 0, 2, 5, 5, 2, 6, 2, 3, 2, 1, 3, 4, 1, 3, 7, 1, 4, 3, 0, 4, 7, 2, 5, 6, 2, 5, 8, 8, 6, 3, 2, 6, 7, 1, 6, 9, 1, 6, 10, 3, 8, 6, 1, 8, 9, 1, 9, 10, 4 ) ) g2 <- add_edges(make_empty_graph(10), t(el[, 1:2]), weight = el[, 3]) distances(g2, mode = \"out\") #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> [1,] 0 0 0 1 5 2 1 13 3 5 #> [2,] Inf 0 0 1 5 2 1 13 3 5 #> [3,] Inf 1 0 1 6 3 1 14 4 6 #> [4,] Inf 1 0 0 6 3 1 14 4 6 #> [5,] Inf 5 4 5 0 2 3 8 3 5 #> [6,] Inf 3 2 3 8 0 1 16 1 3 #> [7,] Inf Inf Inf Inf Inf Inf 0 Inf Inf Inf #> [8,] Inf 4 3 4 9 1 2 0 1 4 #> [9,] Inf Inf Inf Inf Inf Inf Inf Inf 0 4 #> [10,] Inf Inf Inf Inf Inf Inf Inf Inf Inf 0"},{"path":"https://r.igraph.org/reference/diverging_pal.html","id":null,"dir":"Reference","previous_headings":"","what":"Diverging palette — diverging_pal","title":"Diverging palette — diverging_pal","text":"‘PuOr’ palette https://colorbrewer2.org/. eleven colors.","code":""},{"path":"https://r.igraph.org/reference/diverging_pal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Diverging palette — diverging_pal","text":"","code":"diverging_pal(n)"},{"path":"https://r.igraph.org/reference/diverging_pal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Diverging palette — diverging_pal","text":"n number colors palette. maximum eleven currently.","code":""},{"path":"https://r.igraph.org/reference/diverging_pal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Diverging palette — diverging_pal","text":"character vector RGB color codes.","code":""},{"path":"https://r.igraph.org/reference/diverging_pal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Diverging palette — diverging_pal","text":"similar sequential_pal(), also puts emphasis mid-range values, plus two extreme ends. Use palette, quantity mark vertex colors.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/diverging_pal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Diverging palette — diverging_pal","text":"","code":"library(igraphdata) data(foodwebs) fw <- foodwebs[[1]] %>% induced_subgraph(V(.)[ECO == 1]) %>% add_layout_(with_fr()) %>% set_vertex_attr(\"label\", value = seq_len(gorder(.))) %>% set_vertex_attr(\"size\", value = 10) %>% set_edge_attr(\"arrow.size\", value = 0.3) #> This graph was created by an old(er) igraph version. #> Call upgrade_graph() on it to use with the current igraph version #> For now we convert it on the fly... V(fw)$color <- scales::dscale(V(fw)$Biomass %>% cut(10), diverging_pal) plot(fw) data(karate) karate <- karate %>% add_layout_(with_kk()) %>% set_vertex_attr(\"size\", value = 10) #> This graph was created by an old(er) igraph version. #> Call upgrade_graph() on it to use with the current igraph version #> For now we convert it on the fly... V(karate)$color <- scales::dscale(degree(karate) %>% cut(5), diverging_pal) plot(karate)"},{"path":"https://r.igraph.org/reference/diversity.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph diversity — diversity","title":"Graph diversity — diversity","text":"Calculates measure diversity vertices.","code":""},{"path":"https://r.igraph.org/reference/diversity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph diversity — diversity","text":"","code":"diversity(graph, weights = NULL, vids = V(graph))"},{"path":"https://r.igraph.org/reference/diversity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph diversity — diversity","text":"graph input graph. Edge directions ignored. weights NULL, vector edge weights use computation. NULL, ‘weight’ attibute used. Note measure defined unweighted graphs. vids vertex ids calculate measure.","code":""},{"path":"https://r.igraph.org/reference/diversity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph diversity — diversity","text":"numeric vector, length number vertices.","code":""},{"path":"https://r.igraph.org/reference/diversity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph diversity — diversity","text":"diversity vertex defined (scaled) Shannon entropy weights incident edges: $$D()=\\frac{H()}{\\log k_i}$$ $$H()=-\\sum_{j=1}^{k_i} p_{ij}\\log p_{ij},$$ $$p_{ij}=\\frac{w_{ij}}{\\sum_{l=1}^{k_i}}V_{il},$$ \\(k_i\\) (total) degree vertex \\(\\), \\(w_{ij}\\) weight edge(s) vertices \\(\\) \\(j\\). vertices degree less two function returns NaN.","code":""},{"path":"https://r.igraph.org/reference/diversity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Graph diversity — diversity","text":"Nathan Eagle, Michael Macy Rob Claxton: Network Diversity Economic Development, Science 328, 1029–1031, 2010.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/diversity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph diversity — diversity","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/diversity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph diversity — diversity","text":"","code":"g1 <- sample_gnp(20, 2 / 20) g2 <- sample_gnp(20, 2 / 20) g3 <- sample_gnp(20, 5 / 20) E(g1)$weight <- 1 E(g2)$weight <- runif(ecount(g2)) E(g3)$weight <- runif(ecount(g3)) diversity(g1) #> [1] 1 0 1 1 0 0 1 1 NaN 0 NaN 1 1 1 1 0 1 1 0 #> [20] 1 diversity(g2) #> [1] 0.0000000 0.0000000 0.9912105 0.1954131 0.2786455 NaN 0.9285801 #> [8] NaN 0.9562562 0.8678366 0.9145202 0.0000000 0.9606785 NaN #> [15] 0.0000000 0.9837941 0.0000000 0.0000000 0.0000000 0.8888561 diversity(g3) #> [1] 0.9153007 0.9963839 0.7610137 0.9986502 0.7908580 0.6775001 0.9359162 #> [8] 0.9681371 0.6402843 0.9446303 0.8001961 0.9568925 0.8956848 0.2837485 #> [15] 0.8343112 0.8661485 0.8991006 0.5628532 0.8944529 0.9736941"},{"path":"https://r.igraph.org/reference/dominator.tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Dominator tree — dominator.tree","title":"Dominator tree — dominator.tree","text":"dominator.tree() renamed dominator_tree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/dominator.tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dominator tree — dominator.tree","text":"","code":"dominator.tree(graph, root, mode = c(\"out\", \"in\", \"all\", \"total\"))"},{"path":"https://r.igraph.org/reference/dominator.tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dominator tree — dominator.tree","text":"graph directed graph. flowgraph, contains vertices reachable root vertex, vertices collected returned part result. root id root (source) vertex, root tree. mode Constant, must ‘’ ‘’. ‘’, directions considered opposite original one input graph.","code":""},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Dominator tree — dominator_tree","title":"Dominator tree — dominator_tree","text":"Dominator tree directed graph.","code":""},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dominator tree — dominator_tree","text":"","code":"dominator_tree(graph, root, mode = c(\"out\", \"in\", \"all\", \"total\"))"},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dominator tree — dominator_tree","text":"graph directed graph. flowgraph, contains vertices reachable root vertex, vertices collected returned part result. root id root (source) vertex, root tree. mode Constant, must ‘’ ‘’. ‘’, directions considered opposite original one input graph.","code":""},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dominator tree — dominator_tree","text":"list components: dom numeric vector giving immediate dominators vertex. vertices unreachable root, contains NaN. root vertex contains minus one. domtree graph object, dominator tree. vertex ids vertex ids input graph. Isolate vertices ones unreachable root. leftout numeric vector containing vertex ids unreachable root.","code":""},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Dominator tree — dominator_tree","text":"flowgraph directed graph distinguished start (root) vertex \\(r\\), vertex \\(v\\), path \\(r\\) \\(v\\). vertex \\(v\\) dominates another vertex \\(w\\) (equal \\(v\\)), every path \\(r\\) \\(w\\) contains \\(v\\). Vertex \\(v\\) immediate dominator \\(w\\), \\(v=\\textrm{idom}(w)\\), \\(v\\) dominates \\(w\\) every dominator \\(w\\) dominates \\(v\\). edges \\({(\\textrm{idom}(w), w)| w \\ne r}\\) form directed tree, rooted \\(r\\), called dominator tree graph. Vertex \\(v\\) dominates vertex \\(w\\) \\(v\\) ancestor \\(w\\) dominator tree. function implements Lengauer-Tarjan algorithm construct dominator tree directed graph. details see reference .","code":""},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Dominator tree — dominator_tree","text":"Thomas Lengauer, Robert Endre Tarjan: fast algorithm finding dominators flowgraph, ACM Transactions Programming Languages Systems (TOPLAS) /1, 121–141, 1979.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Dominator tree — dominator_tree","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/dominator_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dominator tree — dominator_tree","text":"","code":"## The example from the paper g <- graph_from_literal( R -+ A:B:C, A -+ D, B -+ A:D:E, C -+ F:G, D -+ L, E -+ H, F -+ I, G -+ I:J, H -+ E:K, I -+ K, J -+ I, K -+ I:R, L -+ H ) dtree <- dominator_tree(g, root = \"R\") layout <- layout_as_tree(dtree$domtree, root = \"R\") layout[, 2] <- -layout[, 2] plot(dtree$domtree, layout = layout, vertex.label = V(dtree$domtree)$name)"},{"path":"https://r.igraph.org/reference/dot-data.html","id":null,"dir":"Reference","previous_headings":"","what":".data and .env pronouns — dot-data","title":".data and .env pronouns — dot-data","text":".data .env pronouns make explicit look attribute names indexing V(g) E(g), .e. vertex edge sequence graph. pronouns inspired .data .env rlang - thanks Michał Bojanowski bringing attention. rules simple: .data retrieves attributes graph whose vertex edge sequence evaluated. .env retrieves variables calling environment. Note .data .env injected dynamically environment indexing expressions evaluated; get access objects outside context indexing expression. avoid warnings printed R CMD check code containing .data .env checked, can import .data .env igraph needed. Alternatively, can declare explicitly utils::globalVariables() silence warnings.","code":""},{"path":"https://r.igraph.org/reference/dyad.census.html","id":null,"dir":"Reference","previous_headings":"","what":"Dyad census of a graph — dyad.census","title":"Dyad census of a graph — dyad.census","text":"dyad.census() renamed dyad_census() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/dyad.census.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dyad census of a graph — dyad.census","text":"","code":"dyad.census(graph)"},{"path":"https://r.igraph.org/reference/dyad.census.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dyad census of a graph — dyad.census","text":"graph input graph. warning given directed.","code":""},{"path":"https://r.igraph.org/reference/dyad_census.html","id":null,"dir":"Reference","previous_headings":"","what":"Dyad census of a graph — dyad_census","title":"Dyad census of a graph — dyad_census","text":"Classify dyads directed graphs. relationship pair vertices measured. can three states: mutual, asymmetric non-existent.","code":""},{"path":"https://r.igraph.org/reference/dyad_census.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dyad census of a graph — dyad_census","text":"","code":"dyad_census(graph)"},{"path":"https://r.igraph.org/reference/dyad_census.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dyad census of a graph — dyad_census","text":"graph input graph. warning given directed.","code":""},{"path":"https://r.igraph.org/reference/dyad_census.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dyad census of a graph — dyad_census","text":"named numeric vector three elements: mut number pairs mutual connections. asym number pairs non-mutual connections. null number pairs connection .","code":""},{"path":"https://r.igraph.org/reference/dyad_census.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Dyad census of a graph — dyad_census","text":"Holland, P.W. Leinhardt, S. Method Detecting Structure Sociometric Data. American Journal Sociology, 76, 492–513. 1970. Wasserman, S., Faust, K. Social Network Analysis: Methods Applications. Cambridge: Cambridge University Press. 1994.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/dyad_census.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Dyad census of a graph — dyad_census","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/dyad_census.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dyad census of a graph — dyad_census","text":"","code":"g <- sample_pa(100) dyad_census(g) #> $mut #> [1] 0 #> #> $asym #> [1] 99 #> #> $null #> [1] 4851 #>"},{"path":"https://r.igraph.org/reference/each_edge.html","id":null,"dir":"Reference","previous_headings":"","what":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","title":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","text":"function can used together rewire(). method rewires endpoints edges constant probability uniformly randomly new vertex graph.","code":""},{"path":"https://r.igraph.org/reference/each_edge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","text":"","code":"each_edge( prob, loops = FALSE, multiple = FALSE, mode = c(\"all\", \"out\", \"in\", \"total\") )"},{"path":"https://r.igraph.org/reference/each_edge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","text":"prob rewiring probability, real number zero one. loops Logical scalar, whether loop edges allowed rewired graph. multiple Logical scalar, whether multiple edges allowed generated graph. mode Character string, specifies endpoint edges rewire directed graphs. ‘’ rewires endpoints, ‘’ rewires start (tail) directed edge, ‘’ rewires end (head) directed edge. Ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/each_edge.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","text":"Note method might create graphs multiple /loop edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/each_edge.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/each_edge.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rewires the endpoints of the edges of a graph to a random vertex — each_edge","text":"","code":"# Some random shortcuts shorten the distances on a lattice g <- make_lattice(length = 100, dim = 1, nei = 5) mean_distance(g) #> [1] 7.141414 g <- rewire(g, each_edge(prob = 0.05)) mean_distance(g) #> [1] 2.665455 # Rewiring the start of each directed edge preserves the in-degree distribution # but not the out-degree distribution g <- sample_pa(1000) g2 <- g %>% rewire(each_edge(mode = \"in\", multiple = TRUE, prob = 0.2)) degree(g, mode = \"in\") == degree(g2, mode = \"in\") #> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [15] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [29] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [43] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [57] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [71] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [85] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [99] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [113] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [127] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [141] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [155] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [169] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [183] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [197] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [211] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [225] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [239] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [253] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [267] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [281] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [295] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [309] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [323] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [337] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [351] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [365] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [379] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [393] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [407] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [421] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [435] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [449] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [463] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [477] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [491] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [505] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [519] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [533] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [547] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [561] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [575] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [589] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [603] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [617] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [631] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [645] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [659] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [673] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [687] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [701] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [715] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [729] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [743] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [757] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [771] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [785] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [799] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [813] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [827] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [841] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [855] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [869] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [883] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [897] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [911] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [925] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [939] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [953] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [967] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [981] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [995] TRUE TRUE TRUE TRUE TRUE TRUE"},{"path":"https://r.igraph.org/reference/eccentricity.html","id":null,"dir":"Reference","previous_headings":"","what":"Eccentricity of the vertices in a graph — eccentricity","title":"Eccentricity of the vertices in a graph — eccentricity","text":"eccentricity vertex shortest path distance farthest node graph.","code":""},{"path":"https://r.igraph.org/reference/eccentricity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Eccentricity of the vertices in a graph — eccentricity","text":"","code":"eccentricity(graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"))"},{"path":"https://r.igraph.org/reference/eccentricity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Eccentricity of the vertices in a graph — eccentricity","text":"graph input graph, can directed undirected. vids vertices eccentricity calculated. mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, corresponding undirected graph used, edge directions ignored. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/eccentricity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Eccentricity of the vertices in a graph — eccentricity","text":"eccentricity() returns numeric vector, containing eccentricity score given vertex.","code":""},{"path":"https://r.igraph.org/reference/eccentricity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Eccentricity of the vertices in a graph — eccentricity","text":"eccentricity vertex calculated measuring shortest distance () vertex, () vertices graph, taking maximum. implementation ignores vertex pairs different components. Isolate vertices eccentricity zero.","code":""},{"path":"https://r.igraph.org/reference/eccentricity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Eccentricity of the vertices in a graph — eccentricity","text":"Harary, F. Graph Theory. Reading, MA: Addison-Wesley, p. 35, 1994.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/eccentricity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Eccentricity of the vertices in a graph — eccentricity","text":"","code":"g <- make_star(10, mode = \"undirected\") eccentricity(g) #> [1] 1 2 2 2 2 2 2 2 2 2"},{"path":"https://r.igraph.org/reference/edge.betweenness.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure detection based on edge betweenness — edge.betweenness.community","title":"Community structure detection based on edge betweenness — edge.betweenness.community","text":"edge.betweenness.community() renamed cluster_edge_betweenness() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/edge.betweenness.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure detection based on edge betweenness — edge.betweenness.community","text":"","code":"edge.betweenness.community( graph, weights = NULL, directed = TRUE, edge.betweenness = TRUE, merges = TRUE, bridges = TRUE, modularity = TRUE, membership = TRUE )"},{"path":"https://r.igraph.org/reference/edge.betweenness.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure detection based on edge betweenness — edge.betweenness.community","text":"graph graph analyze. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. Edge weights used calculate weighted edge betweenness. means edges interpreted distances, connection strengths. directed Logical constant, whether calculate directed edge betweenness directed graphs. ignored undirected graphs. edge.betweenness Logical constant, whether return edge betweenness edges time removal. merges Logical constant, whether return merge matrix representing hierarchical community structure network. argument called merges, even community structure algorithm divisive agglomerative: builds tree top bottom. one line merge (.e. split) matrix, first line first merge (last split). communities identified integer number starting one. Community ids smaller equal \\(N\\), number vertices graph, belong singleton communities, .e. individual vertices. first merge \\(N\\) communities numbered one \\(N\\). first merge, first line matrix creates community \\(N+1\\), second merge creates community \\(N+2\\), etc. bridges Logical constant, whether return list edge removals actually splitted component graph. modularity Logical constant, whether calculate maximum modularity score, considering possibly community structures along edge-betweenness based edge removals. membership Logical constant, whether calculate membership vector corresponding highest possible modularity score.","code":""},{"path":"https://r.igraph.org/reference/edge.betweenness.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex and edge betweenness centrality — edge.betweenness","title":"Vertex and edge betweenness centrality — edge.betweenness","text":"edge.betweenness() renamed edge_betweenness() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/edge.betweenness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex and edge betweenness centrality — edge.betweenness","text":"","code":"edge.betweenness( graph, e = E(graph), directed = TRUE, weights = NULL, cutoff = -1 )"},{"path":"https://r.igraph.org/reference/edge.betweenness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex and edge betweenness centrality — edge.betweenness","text":"graph graph analyze. e edges edge betweenness calculated. directed Logical, whether directed paths considered determining shortest paths. weights Optional positive weight vector calculating weighted betweenness. graph weight edge attribute, used default. Weights used calculate weighted shortest paths, interpreted distances. cutoff maximum path length consider calculating betweenness. zero negative limit.","code":""},{"path":"https://r.igraph.org/reference/edge.connectivity.html","id":null,"dir":"Reference","previous_headings":"","what":"Edge connectivity — edge.connectivity","title":"Edge connectivity — edge.connectivity","text":"edge.connectivity() renamed edge_connectivity() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/edge.connectivity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Edge connectivity — edge.connectivity","text":"","code":"edge.connectivity(graph, source = NULL, target = NULL, checks = TRUE)"},{"path":"https://r.igraph.org/reference/edge.connectivity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Edge connectivity — edge.connectivity","text":"graph input graph. source id source vertex, edge_connectivity() can NULL, see details . target id target vertex, edge_connectivity() can NULL, see details . checks Logical constant. Whether check graph connected also degree vertices. graph (strongly) connected connectivity obviously zero. Otherwise minimum degree one edge connectivity also one. good idea perform checks, can done quickly compared connectivity calculation . suggested Peter McMahan, thanks Peter.","code":""},{"path":"https://r.igraph.org/reference/edge.disjoint.paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Edge connectivity — edge.disjoint.paths","title":"Edge connectivity — edge.disjoint.paths","text":"edge.disjoint.paths() renamed edge_connectivity() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/edge.disjoint.paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Edge connectivity — edge.disjoint.paths","text":"","code":"edge.disjoint.paths(graph, source = NULL, target = NULL, checks = TRUE)"},{"path":"https://r.igraph.org/reference/edge.disjoint.paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Edge connectivity — edge.disjoint.paths","text":"graph input graph. source id source vertex, edge_connectivity() can NULL, see details . target id target vertex, edge_connectivity() can NULL, see details . checks Logical constant. Whether check graph connected also degree vertices. graph (strongly) connected connectivity obviously zero. Otherwise minimum degree one edge connectivity also one. good idea perform checks, can done quickly compared connectivity calculation . suggested Peter McMahan, thanks Peter.","code":""},{"path":"https://r.igraph.org/reference/edge.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper function for adding and deleting edges — edge","title":"Helper function for adding and deleting edges — edge","text":"helper function simplifies adding deleting edges /graphs.","code":""},{"path":"https://r.igraph.org/reference/edge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper function for adding and deleting edges — edge","text":"","code":"edge(...) edges(...)"},{"path":"https://r.igraph.org/reference/edge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper function for adding and deleting edges — edge","text":"... See details .","code":""},{"path":"https://r.igraph.org/reference/edge.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper function for adding and deleting edges — edge","text":"special object can used together igraph graphs plus minus operators.","code":""},{"path":"https://r.igraph.org/reference/edge.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Helper function for adding and deleting edges — edge","text":"edges() alias edge(). adding edges via +, unnamed arguments edge() (edges()) concatenated, passed add_edges(). interpreted pairs vertex ids, edge added pair. Named arguments used edge attributes new edges. deleting edges via -, arguments edge() (edges()) concatenated via c() passed delete_edges().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/edge.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper function for adding and deleting edges — edge","text":"","code":"g <- make_ring(10) %>% set_edge_attr(\"color\", value = \"red\") g <- g + edge(1, 5, color = \"green\") + edge(2, 6, color = \"blue\") - edge(\"8|9\") E(g)[[]] #> + 11/11 edges from 26c88d7: #> tail head tid hid color #> 1 1 2 1 2 red #> 2 2 3 2 3 red #> 3 3 4 3 4 red #> 4 4 5 4 5 red #> 5 5 6 5 6 red #> 6 6 7 6 7 red #> 7 7 8 7 8 red #> 8 9 10 9 10 red #> 9 1 10 1 10 red #> 10 1 5 1 5 green #> 11 2 6 2 6 blue g %>% add_layout_(in_circle()) %>% plot() g <- make_ring(10) + edges(1:10) plot(g)"},{"path":"https://r.igraph.org/reference/edge_attr-set.html","id":null,"dir":"Reference","previous_headings":"","what":"Set one or more edge attributes — edge_attr<-","title":"Set one or more edge attributes — edge_attr<-","text":"Set one edge attributes","code":""},{"path":"https://r.igraph.org/reference/edge_attr-set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set one or more edge attributes — edge_attr<-","text":"","code":"edge_attr(graph, name, index = E(graph)) <- value"},{"path":"https://r.igraph.org/reference/edge_attr-set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set one or more edge attributes — edge_attr<-","text":"graph graph. name name edge attribute set. missing, value must named list, entries set edge attributes. index optional edge sequence set attributes subset edges. value new value attribute(s) (index) edges.","code":""},{"path":"https://r.igraph.org/reference/edge_attr-set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set one or more edge attributes — edge_attr<-","text":"graph, edge attribute(s) added set.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/edge_attr-set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set one or more edge attributes — edge_attr<-","text":"","code":"g <- make_ring(10) edge_attr(g) <- list( name = LETTERS[1:10], color = rep(\"green\", gsize(g)) ) edge_attr(g, \"label\") <- E(g)$name g #> IGRAPH 4108f4f U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (e/c), color #> | (e/c), label (e/c) #> + edges from 4108f4f: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 plot(g)"},{"path":"https://r.igraph.org/reference/edge_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Query edge attributes of a graph — edge_attr","title":"Query edge attributes of a graph — edge_attr","text":"Query edge attributes graph","code":""},{"path":"https://r.igraph.org/reference/edge_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query edge attributes of a graph — edge_attr","text":"","code":"edge_attr(graph, name, index = E(graph))"},{"path":"https://r.igraph.org/reference/edge_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query edge attributes of a graph — edge_attr","text":"graph graph name name attribute query. missing, edge attributes returned list. index optional edge sequence query edge attributes subset edges.","code":""},{"path":"https://r.igraph.org/reference/edge_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query edge attributes of a graph — edge_attr","text":"value edge attribute, list edge attributes name missing.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/edge_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query edge attributes of a graph — edge_attr","text":"","code":"g <- make_ring(10) %>% set_edge_attr(\"weight\", value = 1:10) %>% set_edge_attr(\"color\", value = \"red\") g #> IGRAPH ccd00d3 U-W- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), weight (e/n), color #> | (e/c) #> + edges from ccd00d3: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 plot(g, edge.width = E(g)$weight)"},{"path":"https://r.igraph.org/reference/edge_attr_names.html","id":null,"dir":"Reference","previous_headings":"","what":"List names of edge attributes — edge_attr_names","title":"List names of edge attributes — edge_attr_names","text":"List names edge attributes","code":""},{"path":"https://r.igraph.org/reference/edge_attr_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List names of edge attributes — edge_attr_names","text":"","code":"edge_attr_names(graph)"},{"path":"https://r.igraph.org/reference/edge_attr_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List names of edge attributes — edge_attr_names","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/edge_attr_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List names of edge attributes — edge_attr_names","text":"Character vector, names edge attributes.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/edge_attr_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List names of edge attributes — edge_attr_names","text":"","code":"g <- make_ring(10) %>% set_edge_attr(\"label\", value = letters[1:10]) edge_attr_names(g) #> [1] \"label\" plot(g)"},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":null,"dir":"Reference","previous_headings":"","what":"Edge connectivity — edge_connectivity","title":"Edge connectivity — edge_connectivity","text":"edge connectivity graph two vertices, recently also called group adhesion.","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Edge connectivity — edge_connectivity","text":"","code":"edge_connectivity(graph, source = NULL, target = NULL, checks = TRUE) edge_disjoint_paths(graph, source, target) adhesion(graph, checks = TRUE)"},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Edge connectivity — edge_connectivity","text":"graph input graph. source id source vertex, edge_connectivity() can NULL, see details . target id target vertex, edge_connectivity() can NULL, see details . checks Logical constant. Whether check graph connected also degree vertices. graph (strongly) connected connectivity obviously zero. Otherwise minimum degree one edge connectivity also one. good idea perform checks, can done quickly compared connectivity calculation . suggested Peter McMahan, thanks Peter.","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Edge connectivity — edge_connectivity","text":"scalar real value.","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"edge-connectivity-edge-connectivity","dir":"Reference","previous_headings":"","what":"edge_connectivity() Edge connectivity","title":"Edge connectivity — edge_connectivity","text":"edge connectivity pair vertices (source target) minimum number edges needed remove eliminate (directed) paths source target. edge_connectivity() calculates quantity source target arguments given (NULL). edge connectivity graph minimum edge connectivity every (ordered) pair vertices graph. edge_connectivity() calculates quantity neither source target arguments given (.e. NULL).","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"edge-disjoint-paths-the-maximum-number-of-edge-disjoint-paths-between-two-vertices","dir":"Reference","previous_headings":"","what":"edge_disjoint_paths() The maximum number of edge-disjoint paths between two vertices","title":"Edge connectivity — edge_connectivity","text":"set paths two vertices called edge-disjoint share edges. maximum number edge-disjoint paths calculated function using maximum flow techniques. Directed paths considered directed graphs. set edge disjoint paths two vertices set paths containing common edges. maximum number edge disjoint paths two vertices edge connectivity. direct edges source target, number vertex-disjoint paths vertex connectivity two vertices. edges present, one contributes one extra path.","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"adhesion-adhesion-of-a-graph","dir":"Reference","previous_headings":"","what":"adhesion() Adhesion of a graph","title":"Edge connectivity — edge_connectivity","text":"adhesion graph minimum number edges needed remove obtain graph strongly connected. edge connectivity graph.","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"all-three-functions","dir":"Reference","previous_headings":"","what":"All three functions","title":"Edge connectivity — edge_connectivity","text":"three functions documented page calculate similar properties, precisely general edge_connectivity(), others included descriptive function names.","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Edge connectivity — edge_connectivity","text":"Douglas R. White Frank Harary: cohesiveness blocks social networks: node connectivity conditional density, TODO: citation","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Edge connectivity — edge_connectivity","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/edge_connectivity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Edge connectivity — edge_connectivity","text":"","code":"g <- sample_pa(100, m = 1) g2 <- sample_pa(100, m = 5) edge_connectivity(g, 100, 1) #> [1] 1 edge_connectivity(g2, 100, 1) #> [1] 5 edge_disjoint_paths(g2, 100, 1) #> [1] 5 g <- sample_gnp(50, 5 / 50) g <- as.directed(g) g <- induced_subgraph(g, subcomponent(g, 1)) adhesion(g) #> [1] 1"},{"path":"https://r.igraph.org/reference/edge_density.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph density — edge_density","title":"Graph density — edge_density","text":"density graph ratio actual number edges largest possible number edges graph, assuming multi-edges present.","code":""},{"path":"https://r.igraph.org/reference/edge_density.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph density — edge_density","text":"","code":"edge_density(graph, loops = FALSE)"},{"path":"https://r.igraph.org/reference/edge_density.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph density — edge_density","text":"graph input graph. loops Logical constant, whether loop edges may exist graph. affects calculation largest possible number edges graph. parameter set FALSE yet graph contains self-loops, result meaningful.","code":""},{"path":"https://r.igraph.org/reference/edge_density.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph density — edge_density","text":"real constant. function returns NaN (=0.0/0.0) empty graph zero vertices.","code":""},{"path":"https://r.igraph.org/reference/edge_density.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph density — edge_density","text":"concept density ill-defined multigraphs. Note function check whether graph multi-edges return meaningless results graphs.","code":""},{"path":"https://r.igraph.org/reference/edge_density.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Graph density — edge_density","text":"Wasserman, S., Faust, K. (1994). Social Network Analysis: Methods Applications. Cambridge: Cambridge University Press.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/edge_density.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph density — edge_density","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/edge_density.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph density — edge_density","text":"","code":"g1 <- make_empty_graph(n = 10) g2 <- make_full_graph(n = 10) g3 <- sample_gnp(n = 10, 0.4) # loop edges g <- make_graph(c(1, 2, 2, 2, 2, 3)) # graph with a self-loop edge_density(g, loops = FALSE) # this is wrong!!! #> [1] 0.5 edge_density(g, loops = TRUE) # this is right!!! #> [1] 0.3333333 edge_density(simplify(g), loops = FALSE) # this is also right, but different #> [1] 0.3333333"},{"path":"https://r.igraph.org/reference/ego.html","id":null,"dir":"Reference","previous_headings":"","what":"Neighborhood of graph vertices — connect","title":"Neighborhood of graph vertices — connect","text":"functions find vertices farther given limit another fixed vertex, called neighborhood vertex. Note ego() neighborhood(), ego_size() neighborhood_size(), make_ego_graph() make_neighborhood()_graph(), synonyms (aliases).","code":""},{"path":"https://r.igraph.org/reference/ego.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neighborhood of graph vertices — connect","text":"","code":"connect(graph, order, mode = c(\"all\", \"out\", \"in\", \"total\")) ego_size( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 ) neighborhood_size( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 ) ego( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 ) neighborhood( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 ) make_ego_graph( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 ) make_neighborhood_graph( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 )"},{"path":"https://r.igraph.org/reference/ego.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neighborhood of graph vertices — connect","text":"graph input graph. order Integer giving order neighborhood. mode Character constant, specifies use direction edges directed graph analyzed. ‘’ outgoing edges followed, vertices reachable source vertex order steps counted. ‘\"\"’ vertices source vertex reachable order steps counted. ‘\"\"’ ignores direction edges. argument ignored undirected graphs. nodes vertices calculation performed. mindist minimum distance include vertex result.","code":""},{"path":"https://r.igraph.org/reference/ego.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Neighborhood of graph vertices — connect","text":"ego_size()/neighborhood_size() returns integer vector. ego()/neighborhood() (synonyms) returns list igraph.vs list numeric vectors depending value igraph_opt(\"return.vs.es\"), see details performance characteristics. make_ego_graph()/make_neighborhood_graph() returns list graphs. connect() returns new graph object.","code":""},{"path":"https://r.igraph.org/reference/ego.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Neighborhood of graph vertices — connect","text":"neighborhood given order r vertex v includes vertices closer v order. .e. order 0 always v , order 1 v plus immediate neighbors, order 2 order 1 plus immediate neighbors vertices order 1, etc. ego_size()/neighborhood_size() (synonyms) returns size neighborhoods given order, given vertex. ego()/neighborhood() (synonyms) returns vertices belonging neighborhoods given order, given vertex. make_ego_graph()/make_neighborhood()_graph() (synonyms) creates (sub)graphs neighborhoods given vertices given order parameter. function preserves vertex, edge graph attributes. connect() creates new graph connecting vertex vertices neighborhood.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/ego.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Neighborhood of graph vertices — connect","text":"Gabor Csardi csardi.gabor@gmail.com, first version done Vincent Matossian","code":""},{"path":"https://r.igraph.org/reference/ego.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neighborhood of graph vertices — connect","text":"","code":"g <- make_ring(10) ego_size(g, order = 0, 1:3) #> [1] 1 1 1 ego_size(g, order = 1, 1:3) #> [1] 3 3 3 ego_size(g, order = 2, 1:3) #> [1] 5 5 5 # neighborhood_size() is an alias of ego_size() neighborhood_size(g, order = 0, 1:3) #> [1] 1 1 1 neighborhood_size(g, order = 1, 1:3) #> [1] 3 3 3 neighborhood_size(g, order = 2, 1:3) #> [1] 5 5 5 ego(g, order = 0, 1:3) #> [[1]] #> + 1/10 vertex, from d0a776e: #> [1] 1 #> #> [[2]] #> + 1/10 vertex, from d0a776e: #> [1] 2 #> #> [[3]] #> + 1/10 vertex, from d0a776e: #> [1] 3 #> ego(g, order = 1, 1:3) #> [[1]] #> + 3/10 vertices, from d0a776e: #> [1] 1 2 10 #> #> [[2]] #> + 3/10 vertices, from d0a776e: #> [1] 2 1 3 #> #> [[3]] #> + 3/10 vertices, from d0a776e: #> [1] 3 2 4 #> ego(g, order = 2, 1:3) #> [[1]] #> + 5/10 vertices, from d0a776e: #> [1] 1 2 10 3 9 #> #> [[2]] #> + 5/10 vertices, from d0a776e: #> [1] 2 1 3 10 4 #> #> [[3]] #> + 5/10 vertices, from d0a776e: #> [1] 3 2 4 1 5 #> # neighborhood() is an alias of ego() neighborhood(g, order = 0, 1:3) #> [[1]] #> + 1/10 vertex, from d0a776e: #> [1] 1 #> #> [[2]] #> + 1/10 vertex, from d0a776e: #> [1] 2 #> #> [[3]] #> + 1/10 vertex, from d0a776e: #> [1] 3 #> neighborhood(g, order = 1, 1:3) #> [[1]] #> + 3/10 vertices, from d0a776e: #> [1] 1 2 10 #> #> [[2]] #> + 3/10 vertices, from d0a776e: #> [1] 2 1 3 #> #> [[3]] #> + 3/10 vertices, from d0a776e: #> [1] 3 2 4 #> neighborhood(g, order = 2, 1:3) #> [[1]] #> + 5/10 vertices, from d0a776e: #> [1] 1 2 10 3 9 #> #> [[2]] #> + 5/10 vertices, from d0a776e: #> [1] 2 1 3 10 4 #> #> [[3]] #> + 5/10 vertices, from d0a776e: #> [1] 3 2 4 1 5 #> # attributes are preserved V(g)$name <- c(\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\") make_ego_graph(g, order = 2, 1:3) #> [[1]] #> IGRAPH 7eed532 UN-- 5 4 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from 7eed532 (vertex names): #> [1] a--b b--c a--j i--j #> #> [[2]] #> IGRAPH 8306f79 UN-- 5 4 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from 8306f79 (vertex names): #> [1] a--b b--c c--d a--j #> #> [[3]] #> IGRAPH fc92a22 UN-- 5 4 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from fc92a22 (vertex names): #> [1] a--b b--c c--d d--e #> # make_neighborhood_graph() is an alias of make_ego_graph() make_neighborhood_graph(g, order = 2, 1:3) #> [[1]] #> IGRAPH cfb3f63 UN-- 5 4 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from cfb3f63 (vertex names): #> [1] a--b b--c a--j i--j #> #> [[2]] #> IGRAPH ad02987 UN-- 5 4 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from ad02987 (vertex names): #> [1] a--b b--c c--d a--j #> #> [[3]] #> IGRAPH ff9bf5d UN-- 5 4 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from ff9bf5d (vertex names): #> [1] a--b b--c c--d d--e #> # connecting to the neighborhood g <- make_ring(10) g <- connect(g, 2)"},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Eigenvector Centrality Scores of Network Positions — eigen_centrality","title":"Find Eigenvector Centrality Scores of Network Positions — eigen_centrality","text":"eigen_centrality() takes graph (graph) returns eigenvector centralities positions v within ","code":""},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Eigenvector Centrality Scores of Network Positions — eigen_centrality","text":"","code":"eigen_centrality( graph, directed = FALSE, scale = TRUE, weights = NULL, options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Eigenvector Centrality Scores of Network Positions — eigen_centrality","text":"graph Graph analyzed. directed Logical scalar, whether consider direction edges directed graphs. ignored undirected graphs. scale Logical scalar, whether scale result maximum score one. scaling used result vector unit length Euclidean norm. weights numerical vector NULL. argument can used give edge weights calculating weighted eigenvector centrality vertices. NULL graph weight edge attribute used. weights numerical vector used, even graph weight edge attribute. NA, edge weights used (even graph weight edge attribute). Note negative edge weights direction edges considered, eigenvector might complex. case real part reported. function interprets weights connection strength. Higher weights spread centrality better. options named list, override ARPACK options. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find Eigenvector Centrality Scores of Network Positions — eigen_centrality","text":"named list components: vector vector containing centrality scores. value eigenvalue corresponding calculated eigenvector, .e. centrality scores. options named list, information underlying ARPACK computation. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find Eigenvector Centrality Scores of Network Positions — eigen_centrality","text":"Eigenvector centrality scores correspond values first eigenvector graph adjacency matrix; scores may, turn, interpreted arising reciprocal process centrality actor proportional sum centralities actors connected. general, vertices high eigenvector centralities connected many vertices , turn, connected many others (). (perceptive may realize implies largest values obtained individuals large cliques (high-density substructures). also intelligible algebraic point view, first eigenvector closely related best rank-1 approximation adjacency matrix (relationship easy see special case diagonalizable symmetric real matrix via \\(SLS^-1\\) decomposition).) adjacency matrix used eigenvector centrality calculation assumes loop edges counted twice; loop edge two endpoints connected vertex, traverse loop edge via either endpoint. directed case, left eigenvector adjacency matrix calculated. words, centrality vertex proportional sum centralities vertices pointing . Eigenvector centrality meaningful connected graphs. Graphs connected decomposed connected components, eigenvector centrality calculated separately. function verify graph connected. , undirected case scores one component zeros. Also note adjacency matrix directed acyclic graph adjacency matrix empty graph possess positive eigenvalues, therefore eigenvector centrality defined graphs. igraph return eigenvalue zero cases. eigenvector centralities equal empty graph zeros directed acyclic graph. pathological cases can detected checking whether eigenvalue close zero. igraph version 0.5 function uses ARPACK underlying computation, see arpack() ARPACK igraph.","code":""},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Find Eigenvector Centrality Scores of Network Positions — eigen_centrality","text":"Bonacich, P. (1987). Power Centrality: Family Measures. American Journal Sociology, 92, 1170-1182.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find Eigenvector Centrality Scores of Network Positions — eigen_centrality","text":"Gabor Csardi csardi.gabor@gmail.com Carter T. Butts (http://www.faculty.uci.edu/profile.cfm?faculty_id=5057) manual page.","code":""},{"path":"https://r.igraph.org/reference/eigen_centrality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find Eigenvector Centrality Scores of Network Positions — eigen_centrality","text":"","code":"# Generate some test data g <- make_ring(10, directed = FALSE) # Compute eigenvector centrality scores eigen_centrality(g) #> $vector #> [1] 1 1 1 1 1 1 1 1 1 1 #> #> $value #> [1] 2 #> #> $options #> $options$bmat #> [1] \"I\" #> #> $options$n #> [1] 10 #> #> $options$which #> [1] \"LA\" #> #> $options$nev #> [1] 1 #> #> $options$tol #> [1] 0 #> #> $options$ncv #> [1] 0 #> #> $options$ldv #> [1] 0 #> #> $options$ishift #> [1] 1 #> #> $options$maxiter #> [1] 3000 #> #> $options$nb #> [1] 1 #> #> $options$mode #> [1] 1 #> #> $options$start #> [1] 1 #> #> $options$sigma #> [1] 0 #> #> $options$sigmai #> [1] 0 #> #> $options$info #> [1] 0 #> #> $options$iter #> [1] 7 #> #> $options$nconv #> [1] 1 #> #> $options$numop #> [1] 23 #> #> $options$numopb #> [1] 0 #> #> $options$numreo #> [1] 19 #> #>"},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"Spectral decomposition adjacency matrices graphs.","code":""},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"","code":"embed_adjacency_matrix( graph, no, weights = NULL, which = c(\"lm\", \"la\", \"sa\"), scaled = TRUE, cvec = strength(graph, weights = weights)/(vcount(graph) - 1), options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"graph input graph, directed undirected. integer scalar. value embedding dimension spectral embedding. smaller number vertices. largest -dimensional non-zero singular values used spectral embedding. weights Optional positive weight vector calculating weighted embedding. graph weight edge attribute, used default. weighted embedding, edge weights used instead binary adjacencny matrix. eigenvalues (singular values, directed graphs) use. ‘lm’ means ones largest magnitude, ‘la’ ones (algebraic) largest, ‘sa’ (algebraic) smallest eigenvalues. default ‘lm’. Note directed graphs ‘la’ ‘lm’ equivalent, singular values used ordering. scaled Logical scalar, FALSE, \\(U\\) \\(V\\) returned instead \\(X\\) \\(Y\\). cvec numeric vector, length number vertices graph. vector added diagonal adjacency matrix. options named list containing parameters SVD computation algorithm ARPACK. default, list values assigned values given arpack_defaults().","code":""},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"list containing entries: X Estimated latent positions, n times matrix, n number vertices. Y NULL undirected graphs, second half latent positions directed graphs, n times matrix, n number vertices. D eigenvalues (undirected graphs) singular values (directed graphs) calculated algorithm. options named list, information underlying ARPACK computation. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"function computes -dimensional Euclidean representation graph based adjacency matrix, \\(\\). representation computed via singular value decomposition adjacency matrix, \\(=UDV^T\\).case, graph random dot product graph generated using latent position vectors \\(R^{}\\) vertex, embedding provide estimate latent vectors. undirected graphs latent positions calculated \\(X=U^{}D^{1/2}\\), \\(U^{}\\) equals first columns \\(U\\), \\(D^{1/2}\\) diagonal matrix containing top singular values diagonal. directed graphs embedding defined pair \\(X=U^{}D^{1/2}\\) \\(Y=V^{}D^{1/2}\\). (undirected graphs \\(U=V\\), enough keep one .)","code":""},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"Sussman, D.L., Tang, M., Fishkind, D.E., Priebe, C.E. Consistent Adjacency Spectral Embedding Stochastic Blockmodel Graphs, Journal American Statistical Association, Vol. 107(499), 2012","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/embed_adjacency_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Spectral Embedding of Adjacency Matrices — embed_adjacency_matrix","text":"","code":"## A small graph lpvs <- matrix(rnorm(200), 20, 10) lpvs <- apply(lpvs, 2, function(x) { return(abs(x) / sqrt(sum(x^2))) }) RDP <- sample_dot_product(lpvs) embed <- embed_adjacency_matrix(RDP, 5)"},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"Spectral decomposition Laplacian matrices graphs.","code":""},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"","code":"embed_laplacian_matrix( graph, no, weights = NULL, which = c(\"lm\", \"la\", \"sa\"), type = c(\"default\", \"D-A\", \"DAD\", \"I-DAD\", \"OAP\"), scaled = TRUE, options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"graph input graph, directed undirected. integer scalar. value embedding dimension spectral embedding. smaller number vertices. largest -dimensional non-zero singular values used spectral embedding. weights Optional positive weight vector calculating weighted embedding. graph weight edge attribute, used default. weighted embedding, edge weights used instead binary adjacency matrix, vertex strength (see strength()) used instead degrees. eigenvalues (singular values, directed graphs) use. ‘lm’ means ones largest magnitude, ‘la’ ones (algebraic) largest, ‘sa’ (algebraic) smallest eigenvalues. default ‘lm’. Note directed graphs ‘la’ ‘lm’ equivalent, singular values used ordering. type type Laplacian use. Various definitions exist Laplacian graph, one can choose argument. Possible values: D-means \\(D-\\) \\(D\\) degree matrix \\(\\) adjacency matrix; DAD means \\(D^{1/2}\\) times \\(\\) times \\(D^{1/2}{D^1/2}\\), \\(D^{1/2}\\) inverse square root degree matrix; -DAD means \\(-D^{1/2}\\), \\(\\) identity matrix. OAP \\(O^{1/2}AP^{1/2}\\), \\(O^{1/2}\\) inverse square root -degree matrix \\(P^{1/2}\\) -degree matrix. OAP defined undirected graphs, defined type directed graphs. default (.e. type default) use D-undirected graphs OAP directed graphs. scaled Logical scalar, FALSE, \\(U\\) \\(V\\) returned instead \\(X\\) \\(Y\\). options named list containing parameters SVD computation algorithm ARPACK. default, list values assigned values given arpack_defaults().","code":""},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"list containing entries: X Estimated latent positions, n times matrix, n number vertices. Y NULL undirected graphs, second half latent positions directed graphs, n times matrix, n number vertices. D eigenvalues (undirected graphs) singular values (directed graphs) calculated algorithm. options named list, information underlying ARPACK computation. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"function computes -dimensional Euclidean representation graph based Laplacian matrix, \\(L\\). representation computed via singular value decomposition Laplacian matrix. essentially embed_adjacency_matrix(), work Laplacian matrix, instead adjacency matrix.","code":""},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"Sussman, D.L., Tang, M., Fishkind, D.E., Priebe, C.E. Consistent Adjacency Spectral Embedding Stochastic Blockmodel Graphs, Journal American Statistical Association, Vol. 107(499), 2012","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/embed_laplacian_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Spectral Embedding of the Laplacian of a Graph — embed_laplacian_matrix","text":"","code":"## A small graph lpvs <- matrix(rnorm(200), 20, 10) lpvs <- apply(lpvs, 2, function(x) { return(abs(x) / sqrt(sum(x^2))) }) RDP <- sample_dot_product(lpvs) embed <- embed_laplacian_matrix(RDP, 5)"},{"path":"https://r.igraph.org/reference/ends.html","id":null,"dir":"Reference","previous_headings":"","what":"Incident vertices of some graph edges — ends","title":"Incident vertices of some graph edges — ends","text":"Incident vertices graph edges","code":""},{"path":"https://r.igraph.org/reference/ends.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Incident vertices of some graph edges — ends","text":"","code":"ends(graph, es, names = TRUE)"},{"path":"https://r.igraph.org/reference/ends.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Incident vertices of some graph edges — ends","text":"graph input graph es sequence edges query names Whether return vertex names numeric vertex ids. default vertex names used.","code":""},{"path":"https://r.igraph.org/reference/ends.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Incident vertices of some graph edges — ends","text":"two column matrix vertex names vertex ids.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/ends.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Incident vertices of some graph edges — ends","text":"","code":"g <- make_ring(5) ends(g, E(g)) #> [,1] [,2] #> [1,] 1 2 #> [2,] 2 3 #> [3,] 3 4 #> [4,] 4 5 #> [5,] 1 5"},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"Simple random graph model, specifying edge count either precisely (\\(G(n,m)\\) model) average connection probability (\\(G(n,p)\\) model).","code":""},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"","code":"erdos.renyi.game( n, p.or.m, type = c(\"gnp\", \"gnm\"), directed = FALSE, loops = FALSE )"},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"n number vertices graph. p..m Either probability drawing edge two arbitrary vertices (\\(G(n,p)\\) graph), number edges graph (\\(G(n,m)\\) graphs). type type random graph create, either gnp() (\\(G(n,p)\\) graph) gnm() (\\(G(n,m)\\) graph). directed Logical, whether graph directed, defaults FALSE. loops Logical, whether add loop edges, defaults FALSE.","code":""},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"\\(G(n,m)\\) graphs, precisely m edges. \\(G(n,p)\\) graphs, vertex pairs connected probability p. random.graph.game() alias function.","code":""},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"deprecated","dir":"Reference","previous_headings":"","what":"Deprecated","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"Since igraph version 0.8.0, erdos.renyi.game() random.graph.game() deprecated, sample_gnp() sample_gnm() used instead. See details.","code":""},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"Erdős, P. Rényi, ., random graphs, Publicationes Mathematicae 6, 290–297 (1959).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/erdos.renyi.game.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate random graphs according to the Erdős-Rényi model — erdos.renyi.game","text":"","code":"g <- erdos.renyi.game(1000, 1 / 1000) degree_distribution(g) #> [1] 0.357 0.355 0.204 0.070 0.013 0.001"},{"path":"https://r.igraph.org/reference/establishment.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph generation based on different vertex types — establishment.game","title":"Graph generation based on different vertex types — establishment.game","text":"establishment.game() renamed sample_traits() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/establishment.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph generation based on different vertex types — establishment.game","text":"","code":"establishment.game( nodes, types, k = 1, type.dist = rep(1, types), pref.matrix = matrix(1, types, types), directed = FALSE )"},{"path":"https://r.igraph.org/reference/establishment.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph generation based on different vertex types — establishment.game","text":"nodes number vertices graph. types number different vertex types. k number trials per time step, see details . type.dist distribution vertex types. assumed stationary time. pref.matrix matrix giving preferences given vertex types. probabilities, .e. numbers zero one. directed Logical constant, whether generate directed graphs.","code":""},{"path":"https://r.igraph.org/reference/estimate_betweenness.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated version of betweenness() — estimate_betweenness","title":"Deprecated version of betweenness() — estimate_betweenness","text":"Use betweenness() cutoff argument instead.","code":""},{"path":"https://r.igraph.org/reference/estimate_betweenness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deprecated version of betweenness() — estimate_betweenness","text":"","code":"estimate_betweenness( graph, vids = V(graph), directed = TRUE, cutoff, weights = NULL )"},{"path":"https://r.igraph.org/reference/estimate_betweenness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deprecated version of betweenness() — estimate_betweenness","text":"graph graph analyze. vids vertices vertex betweenness estimation calculated. directed Logical, whether directed paths considered determining shortest paths. cutoff maximum path length consider calculating betweenness. zero negative limit. weights Optional positive weight vector calculating weighted betweenness. graph weight edge attribute, used default. Weights used calculate weighted shortest paths, interpreted distances.","code":""},{"path":"https://r.igraph.org/reference/estimate_closeness.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated version of closeness() — estimate_closeness","title":"Deprecated version of closeness() — estimate_closeness","text":"Use closeness() cutoff argument instead.","code":""},{"path":"https://r.igraph.org/reference/estimate_closeness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deprecated version of closeness() — estimate_closeness","text":"","code":"estimate_closeness( graph, vids = V(graph), mode = c(\"out\", \"in\", \"all\", \"total\"), cutoff, weights = NULL, normalized = FALSE )"},{"path":"https://r.igraph.org/reference/estimate_closeness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deprecated version of closeness() — estimate_closeness","text":"graph graph analyze. vids vertices closeness calculated. mode Character string, defined types paths used measuring distance directed graphs. “” measures paths vertex, “” measures paths vertex, uses undirected paths. argument ignored undirected graphs. cutoff maximum path length consider calculating closeness. zero negative limit. weights Optional positive weight vector calculating weighted closeness. graph weight edge attribute, used default. Weights used calculating weighted shortest paths, interpreted distances. normalized Logical scalar, whether calculate normalized closeness, .e. inverse average distance reachable vertices. non-normalized closeness inverse sum distances reachable vertices.","code":""},{"path":"https://r.igraph.org/reference/estimate_edge_betweenness.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated version of edge_betweenness() — estimate_edge_betweenness","title":"Deprecated version of edge_betweenness() — estimate_edge_betweenness","text":"Use edge_betweenness() cutoff argument instead.","code":""},{"path":"https://r.igraph.org/reference/estimate_edge_betweenness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deprecated version of edge_betweenness() — estimate_edge_betweenness","text":"","code":"estimate_edge_betweenness( graph, e = E(graph), directed = TRUE, cutoff, weights = NULL )"},{"path":"https://r.igraph.org/reference/estimate_edge_betweenness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deprecated version of edge_betweenness() — estimate_edge_betweenness","text":"graph graph analyze. e edges edge betweenness calculated. directed Logical, whether directed paths considered determining shortest paths. cutoff maximum path length consider calculating betweenness. zero negative limit. weights Optional positive weight vector calculating weighted betweenness. graph weight edge attribute, used default. Weights used calculate weighted shortest paths, interpreted distances.","code":""},{"path":"https://r.igraph.org/reference/evcent.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Eigenvector Centrality Scores of Network Positions — evcent","title":"Find Eigenvector Centrality Scores of Network Positions — evcent","text":"evcent() renamed eigen_centrality() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/evcent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Eigenvector Centrality Scores of Network Positions — evcent","text":"","code":"evcent( graph, directed = FALSE, scale = TRUE, weights = NULL, options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/evcent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Eigenvector Centrality Scores of Network Positions — evcent","text":"graph Graph analyzed. directed Logical scalar, whether consider direction edges directed graphs. ignored undirected graphs. scale Logical scalar, whether scale result maximum score one. scaling used result vector unit length Euclidean norm. weights numerical vector NULL. argument can used give edge weights calculating weighted eigenvector centrality vertices. NULL graph weight edge attribute used. weights numerical vector used, even graph weight edge attribute. NA, edge weights used (even graph weight edge attribute). Note negative edge weights direction edges considered, eigenvector might complex. case real part reported. function interprets weights connection strength. Higher weights spread centrality better. options named list, override ARPACK options. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/exportPajek.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Cohesive Blocks — exportPajek","title":"Calculate Cohesive Blocks — exportPajek","text":"exportPajek() renamed export_pajek() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/exportPajek.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Cohesive Blocks — exportPajek","text":"","code":"exportPajek(blocks, graph, file, project.file = TRUE)"},{"path":"https://r.igraph.org/reference/exportPajek.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Cohesive Blocks — exportPajek","text":"graph cohesive_blocks() graph object class igraph. must undirected simple. (See is_simple().) graphs_from_cohesive_blocks() export_pajek() graph must supplied whose cohesive block structure given blocks() argument. file Defines file (connection) Pajek file written . project.file argument TRUE, can filename (extension), file object, general king connection object. file/connection opened already. project.file argument FALSE, several files created file must character scalar containing base name files, without extension. (can contain path files.) See also details . project.file Logical scalar, whether create single Pajek project file containing data, create separated files item. See details .","code":""},{"path":"https://r.igraph.org/reference/farthest.nodes.html","id":null,"dir":"Reference","previous_headings":"","what":"Diameter of a graph — farthest.nodes","title":"Diameter of a graph — farthest.nodes","text":"farthest.nodes() renamed farthest_vertices() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/farthest.nodes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Diameter of a graph — farthest.nodes","text":"","code":"farthest.nodes(graph, directed = TRUE, unconnected = TRUE, weights = NULL)"},{"path":"https://r.igraph.org/reference/farthest.nodes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Diameter of a graph — farthest.nodes","text":"graph graph analyze. directed Logical, whether directed undirected paths considered. ignored undirected graphs. unconnected Logical, graph unconnected. FALSE, function return number one larger largest possible diameter, always number vertices. TRUE, diameters connected components calculated largest one returned. weights Optional positive weight vector calculating weighted distances. graph weight edge attribute, used default.","code":""},{"path":"https://r.igraph.org/reference/fastgreedy.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure via greedy optimization of modularity — fastgreedy.community","title":"Community structure via greedy optimization of modularity — fastgreedy.community","text":"fastgreedy.community() renamed cluster_fast_greedy() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/fastgreedy.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure via greedy optimization of modularity — fastgreedy.community","text":"","code":"fastgreedy.community( graph, merges = TRUE, modularity = TRUE, membership = TRUE, weights = NULL )"},{"path":"https://r.igraph.org/reference/fastgreedy.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure via greedy optimization of modularity — fastgreedy.community","text":"graph input graph merges Logical scalar, whether return merge matrix. modularity Logical scalar, whether return vector containing modularity merge. membership Logical scalar, whether calculate membership vector corresponding maximum modularity score, considering possible community structures along merges. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function.","code":""},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding a feedback arc set in a graph — feedback_arc_set","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"feedback arc set graph subset edges whose removal breaks cycles graph.","code":""},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"","code":"feedback_arc_set(graph, weights = NULL, algo = c(\"approx_eades\", \"exact_ip\"))"},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"graph input graph weights Potential edge weights. graph edge attribute called ‘weight’, argument NULL, edge attribute used automatically. goal feedback arc set problem find feedback arc set smallest total weight. algo Specifies algorithm use. “exact_ip” solves feedback arc set problem exact integer programming algorithm guarantees total weight removed edges small possible. “approx_eades” uses fast (linear-time) approximation algorithm Eades, Lin Smyth. “exact” alias “exact_ip” “approx” alias “approx_eades”.","code":""},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"edge sequence (default, see return.vs.es option igraph_options()) containing feedback arc set.","code":""},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"Feedback arc sets typically used directed graphs. removal feedback arc set directed graph ensures remaining graph directed acyclic graph (DAG). undirected graphs, removal feedback arc set ensures remaining graph forest (.e. every connected component tree).","code":""},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"Peter Eades, Xuemin Lin W.F.Smyth: fast effective heuristic feedback arc set problem. Information Processing Letters 47:6, pp. 319-323, 1993","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/feedback_arc_set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Finding a feedback arc set in a graph — feedback_arc_set","text":"","code":"g <- sample_gnm(20, 40, directed = TRUE) feedback_arc_set(g) #> + 8/40 edges from 91e59ec: #> [1] 2-> 9 4->10 7-> 5 7-> 8 7->15 11->18 12-> 1 12-> 9 feedback_arc_set(g, algo = \"approx\") #> + 8/40 edges from 91e59ec: #> [1] 2-> 9 4->10 7-> 5 7-> 8 7->15 11->18 12-> 1 12-> 9"},{"path":"https://r.igraph.org/reference/fit_hrg.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit a hierarchical random graph model — fit_hrg","title":"Fit a hierarchical random graph model — fit_hrg","text":"fit_hrg() fits HRG given graph. takes specified steps number MCMC steps perform fitting, convergence criteria specified number steps zero. fit_hrg() can start given HRG, given hrg() argument start argument TRUE. can converted hclust class using .hclust() provided package.","code":""},{"path":"https://r.igraph.org/reference/fit_hrg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit a hierarchical random graph model — fit_hrg","text":"","code":"fit_hrg(graph, hrg = NULL, start = FALSE, steps = 0)"},{"path":"https://r.igraph.org/reference/fit_hrg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit a hierarchical random graph model — fit_hrg","text":"graph graph fit model . Edge directions ignored directed graphs. hrg hierarchical random graph model, form igraphHRG object. fit_hrg() allows NULL, case random starting point used fitting. start Logical, whether start fitting/sampling supplied igraphHRG object, random starting point. steps number MCMC steps make. zero, MCMC procedure performed convergence.","code":""},{"path":"https://r.igraph.org/reference/fit_hrg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit a hierarchical random graph model — fit_hrg","text":"fit_hrg() returns igraphHRG object. list following members: left Vector contains left children internal tree vertices. first vertex always root vertex, first element vector left child root vertex. Internal vertices denoted negative numbers, starting -1 going , .e. root vertex -1. Leaf vertices denoted non-negative number, starting zero . right Vector contains right children vertices, encoding left vector. prob connection probabilities attached internal vertices, first number belongs root vertex (.e. internal vertex -1), second internal vertex -2, etc. edges number edges subtree given internal vertex. vertices number vertices subtree given internal vertex, including .","code":""},{"path":"https://r.igraph.org/reference/fit_hrg.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fit a hierarchical random graph model — fit_hrg","text":". Clauset, C. Moore, M.E.J. Newman. Hierarchical structure prediction missing links networks. Nature 453, 98–101 (2008); . Clauset, C. Moore, M.E.J. Newman. Structural Inference Hierarchies Networks. E. M. Airoldi et al. (Eds.): ICML 2006 Ws, Lecture Notes Computer Science 4503, 1–13. Springer-Verlag, Berlin Heidelberg (2007).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/fit_hrg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit a hierarchical random graph model — fit_hrg","text":"","code":"if (FALSE) { # \\dontrun{ ## We are not running these examples any more, because they ## take a long time (~15 seconds) to run and this is against the CRAN ## repository policy. Copy and paste them by hand to your R prompt if ## you want to run them. ## A graph with two dense groups g <- sample_gnp(10, p = 1 / 2) + sample_gnp(10, p = 1 / 2) hrg <- fit_hrg(g) hrg summary(as.hclust(hrg)) ## The consensus tree for it consensus_tree(g, hrg = hrg, start = TRUE) ## Prediction of missing edges g2 <- make_full_graph(4) + (make_full_graph(4) - path(1, 2)) predict_edges(g2) } # }"},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":null,"dir":"Reference","previous_headings":"","what":"Fitting a power-law distribution function to discrete data — fit_power_law","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"fit_power_law() fits power-law distribution data set.","code":""},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"","code":"fit_power_law( x, xmin = NULL, start = 2, force.continuous = FALSE, implementation = c(\"plfit\", \"R.mle\"), ... )"},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"x data fit, numeric vector. implementation ‘R.mle’ data must integer values. ‘plfit’ implementation non-integer values might present continuous power-law distribution fitted. xmin Numeric scalar, NULL. lower bound fitting power-law. NULL, smallest value x used ‘R.mle’ implementation, value automatically determined ‘plfit’ implementation. argument makes possible fit tail distribution. start Numeric scalar. initial value exponent minimizing function, ‘R.mle’ implementation. Usually safe leave untouched. force.continuous Logical scalar. Whether force continuous distribution ‘plfit’ implementation, even sample vector contains integer values (chance). argument false, igraph assume continuous distribution least one sample non-integer assume discrete distribution otherwise. implementation Character scalar. implementation use. See details . ... Additional arguments, passed maximum likelihood optimizing function, stats4::mle(), ‘R.mle’ implementation chosen. ignored ‘plfit’ implementation.","code":""},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"Depends implementation argument. ‘R.mle’, object class ‘mle’. can used calculate confidence intervals log-likelihood. See stats4::mle-class() details. implementation ‘plfit’, result named list entries: continuous Logical scalar, whether fitted power-law distribution continuous discrete. alpha Numeric scalar, exponent fitted power-law distribution. xmin Numeric scalar, minimum value power-law distribution fitted. words, values larger xmin used input vector. logLik Numeric scalar, log-likelihood fitted parameters. KS.stat Numeric scalar, test statistic Kolmogorov-Smirnov test compares fitted distribution input vector. Smaller scores denote better fit. KS.p Numeric scalar, p-value Kolmogorov-Smirnov test. Small p-values (less 0.05) indicate test rejected hypothesis original data drawn fitted power-law distribution.","code":""},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"function fits power-law distribution vector containing samples distribution (assumed follow power-law course). power-law distribution, generally assumed \\(P(X=x)\\) proportional \\(x^{-\\alpha}\\), \\(x\\) positive number \\(\\alpha\\) greater 1. many real-world cases, power-law behaviour kicks threshold value \\(x_\\text{min}\\). goal function determine \\(\\alpha\\) \\(x_\\text{min}\\) given, determine \\(x_\\text{min}\\) corresponding value \\(\\alpha\\). fit_power_law() provides two maximum likelihood implementations. implementation argument ‘R.mle’, BFGS optimization (see mle) algorithm applied. additional arguments passed mle function, possible change optimization method /parameters. implementation can fit \\(x_\\text{min}\\) argument, use ‘plfit’ implementation want . ‘plfit’ implementation also uses maximum likelihood principle determine \\(\\alpha\\) given \\(x_\\text{min}\\); \\(x_\\text{min}\\) given advance, algorithm attempt find itsoptimal value \\(p\\)-value Kolmogorov-Smirnov test fitted distribution original sample largest. function uses method Clauset, Shalizi Newman calculate parameters fitted distribution. See references details.","code":""},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"Power laws, Pareto distributions Zipf's law, M. E. J. Newman, Contemporary Physics, 46, 323-351, 2005. Aaron Clauset, Cosma R .Shalizi Mark E.J. Newman: Power-law distributions empirical data. SIAM Review 51(4):661-703, 2009.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/fit_power_law.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fitting a power-law distribution function to discrete data — fit_power_law","text":"","code":"# This should approximately yield the correct exponent 3 g <- sample_pa(1000) # increase this number to have a better estimate d <- degree(g, mode = \"in\") fit1 <- fit_power_law(d + 1, 10) fit2 <- fit_power_law(d + 1, 10, implementation = \"R.mle\") fit1$alpha #> [1] 2.667035 stats4::coef(fit2) #> alpha #> 2.666896 fit1$logLik #> [1] -60.18072 stats4::logLik(fit2) #> 'log Lik.' -60.18056 (df=1)"},{"path":"https://r.igraph.org/reference/forest.fire.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Forest Fire Network Model — forest.fire.game","title":"Forest Fire Network Model — forest.fire.game","text":"forest.fire.game() renamed sample_forestfire() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/forest.fire.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Forest Fire Network Model — forest.fire.game","text":"","code":"forest.fire.game(nodes, fw.prob, bw.factor = 1, ambs = 1, directed = TRUE)"},{"path":"https://r.igraph.org/reference/forest.fire.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Forest Fire Network Model — forest.fire.game","text":"nodes number vertices graph. fw.prob forward burning probability, see details . bw.factor backward burning ratio. backward burning probability calculated bw.factor*fw.prob. ambs number ambassador vertices. directed Logical scalar, whether create directed graph.","code":""},{"path":"https://r.igraph.org/reference/from_incidence_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph from incidence matrix — from_incidence_matrix","title":"Graph from incidence matrix — from_incidence_matrix","text":"graph_from_incidence_matrix() renamed graph_from_biadjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/from_incidence_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph from incidence matrix — from_incidence_matrix","text":"","code":"from_incidence_matrix(...)"},{"path":"https://r.igraph.org/reference/from_incidence_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph from incidence matrix — from_incidence_matrix","text":"authors refer bipartite adjacency matrix \"bipartite incidence matrix\". igraph 1.6.0 later use naming avoid confusion edge-vertex incidence matrix.","code":""},{"path":"https://r.igraph.org/reference/get.adjacency.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a graph to an adjacency matrix — get.adjacency","title":"Convert a graph to an adjacency matrix — get.adjacency","text":"get.adjacency() renamed as_adjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.adjacency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a graph to an adjacency matrix — get.adjacency","text":"","code":"get.adjacency( graph, type = c(\"both\", \"upper\", \"lower\"), attr = NULL, edges = FALSE, names = TRUE, sparse = igraph_opt(\"sparsematrices\") )"},{"path":"https://r.igraph.org/reference/get.adjacency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a graph to an adjacency matrix — get.adjacency","text":"graph graph convert. type Gives create adjacency matrix undirected graphs. ignored directed graphs. Possible values: upper: upper right triangle matrix used, lower: lower left triangle matrix used. : whole matrix used, symmetric matrix returned. attr Either NULL character string giving edge attribute name. NULL traditional adjacency matrix returned. NULL values given edge attribute included adjacency matrix. graph multiple edges, edge attribute arbitrarily chosen edge (multiple edges) included. argument ignored edges TRUE. Note works certain attribute types. sparse argumen TRUE, attribute must either logical numeric. sparse argument FALSE, character also allowed. reason difference Matrix package support character sparse matrices yet. edges Logical scalar, whether return edge ids matrix. non-existant edges zero returned. names Logical constant, whether assign row column names matrix. assigned name vertex attribute present graph. sparse Logical scalar, whether create sparse matrix. ‘Matrix’ package must installed creating sparse matrices.","code":""},{"path":"https://r.igraph.org/reference/get.adjedgelist.html","id":null,"dir":"Reference","previous_headings":"","what":"Adjacency lists — get.adjedgelist","title":"Adjacency lists — get.adjedgelist","text":"get.adjedgelist() renamed as_adj_edge_list() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.adjedgelist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adjacency lists — get.adjedgelist","text":"","code":"get.adjedgelist( graph, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = c(\"twice\", \"once\", \"ignore\") )"},{"path":"https://r.igraph.org/reference/get.adjedgelist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adjacency lists — get.adjedgelist","text":"graph input graph. mode Character scalar, gives kind adjacent edges/vertices include lists. ‘’ outgoing edges/vertices, ‘’ incoming edges/vertices, ‘’ . argument ignored undirected graphs. loops Character scalar, one \"ignore\" (omit loops), \"twice\" (include loop edges twice) \"\" (include ). \"twice\" allowed directed graphs replaced \"\".","code":""},{"path":"https://r.igraph.org/reference/get.adjlist.html","id":null,"dir":"Reference","previous_headings":"","what":"Adjacency lists — get.adjlist","title":"Adjacency lists — get.adjlist","text":"get.adjlist() renamed as_adj_list() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.adjlist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adjacency lists — get.adjlist","text":"","code":"get.adjlist( graph, mode = c(\"all\", \"out\", \"in\", \"total\"), loops = c(\"twice\", \"once\", \"ignore\"), multiple = TRUE )"},{"path":"https://r.igraph.org/reference/get.adjlist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adjacency lists — get.adjlist","text":"graph input graph. mode Character scalar, gives kind adjacent edges/vertices include lists. ‘’ outgoing edges/vertices, ‘’ incoming edges/vertices, ‘’ . argument ignored undirected graphs. loops Character scalar, one \"ignore\" (omit loops), \"twice\" (include loop edges twice) \"\" (include ). \"twice\" allowed directed graphs replaced \"\". multiple Logical scalar, set FALSE use one representative set parallel edges.","code":""},{"path":"https://r.igraph.org/reference/get.all.shortest.paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Shortest (directed or undirected) paths between vertices — get.all.shortest.paths","title":"Shortest (directed or undirected) paths between vertices — get.all.shortest.paths","text":"get..shortest.paths() renamed all_shortest_paths() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.all.shortest.paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shortest (directed or undirected) paths between vertices — get.all.shortest.paths","text":"","code":"get.all.shortest.paths( graph, from, to = V(graph), mode = c(\"out\", \"all\", \"in\"), weights = NULL )"},{"path":"https://r.igraph.org/reference/get.all.shortest.paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shortest (directed or undirected) paths between vertices — get.all.shortest.paths","text":"graph graph work . Numeric constant, vertex shortest paths calculated. Note right now vector vertex ids, single vertex. Numeric vector, vertices shortest paths calculated. default includes vertices. Note distances() every vertex must included . (required shortest_paths(). mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, corresponding undirected graph used, .e. directed paths searched. argument ignored undirected graphs. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute).","code":""},{"path":"https://r.igraph.org/reference/get.data.frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating igraph graphs from data frames or vice-versa — get.data.frame","title":"Creating igraph graphs from data frames or vice-versa — get.data.frame","text":"get.data.frame() renamed as_data_frame() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.data.frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating igraph graphs from data frames or vice-versa — get.data.frame","text":"","code":"get.data.frame(x, what = c(\"edges\", \"vertices\", \"both\"))"},{"path":"https://r.igraph.org/reference/get.data.frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating igraph graphs from data frames or vice-versa — get.data.frame","text":"x igraph object. Character constant, whether return info vertices, edges, . default ‘edges’.","code":""},{"path":"https://r.igraph.org/reference/get.diameter.html","id":null,"dir":"Reference","previous_headings":"","what":"Diameter of a graph — get.diameter","title":"Diameter of a graph — get.diameter","text":"get.diameter() renamed get_diameter() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.diameter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Diameter of a graph — get.diameter","text":"","code":"get.diameter(graph, directed = TRUE, unconnected = TRUE, weights = NULL)"},{"path":"https://r.igraph.org/reference/get.diameter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Diameter of a graph — get.diameter","text":"graph graph analyze. directed Logical, whether directed undirected paths considered. ignored undirected graphs. unconnected Logical, graph unconnected. FALSE, function return number one larger largest possible diameter, always number vertices. TRUE, diameters connected components calculated largest one returned. weights Optional positive weight vector calculating weighted distances. graph weight edge attribute, used default.","code":""},{"path":"https://r.igraph.org/reference/get.edge.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Query edge attributes of a graph — get.edge.attribute","title":"Query edge attributes of a graph — get.edge.attribute","text":"get.edge.attribute() renamed edge_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.edge.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query edge attributes of a graph — get.edge.attribute","text":"","code":"get.edge.attribute(graph, name, index = E(graph))"},{"path":"https://r.igraph.org/reference/get.edge.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query edge attributes of a graph — get.edge.attribute","text":"graph graph name name attribute query. missing, edge attributes returned list. index optional edge sequence query edge attributes subset edges.","code":""},{"path":"https://r.igraph.org/reference/get.edge.ids.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the edge ids based on the incident vertices of the edges — get.edge.ids","title":"Find the edge ids based on the incident vertices of the edges — get.edge.ids","text":"Find edges igraph graph specified end points. function handles multi-graph (graphs multiple edges) can consider ignore edge directions directed graphs.","code":""},{"path":"https://r.igraph.org/reference/get.edge.ids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the edge ids based on the incident vertices of the edges — get.edge.ids","text":"","code":"get.edge.ids(graph, vp, directed = TRUE, error = FALSE, multi = NULL)"},{"path":"https://r.igraph.org/reference/get.edge.ids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the edge ids based on the incident vertices of the edges — get.edge.ids","text":"graph input graph. vp incident vertices, given vertex ids symbolic vertex names. interpreted pairwise, .e. first second used first edge, third fourth second, etc. directed Logical scalar, whether consider edge directions directed graphs. argument ignored undirected graphs. error Logical scalar, whether report error edge found graph. FALSE, error reported, zero returned non-existant edge(s). multi","code":""},{"path":"https://r.igraph.org/reference/get.edge.ids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the edge ids based on the incident vertices of the edges — get.edge.ids","text":"numeric vector edge ids, one pair input vertices. edge input graph given pair vertices, zero reported. (error argument FALSE.)","code":""},{"path":"https://r.igraph.org/reference/get.edge.ids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find the edge ids based on the incident vertices of the edges — get.edge.ids","text":"igraph vertex ids natural numbers, starting one, number vertices graph. Similarly, edges also numbered one, number edges. function allows finding edges graph, via incident vertices.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/get.edge.ids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find the edge ids based on the incident vertices of the edges — get.edge.ids","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/get.edge.ids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find the edge ids based on the incident vertices of the edges — get.edge.ids","text":"","code":"g <- make_ring(10) ei <- get.edge.ids(g, c(1, 2, 4, 5)) E(g)[ei] #> + 2/10 edges from 7d17d1a: #> [1] 1--2 4--5 ## non-existant edge get.edge.ids(g, c(2, 1, 1, 4, 5, 4)) #> [1] 1 0 4 ## For multiple edges, a single edge id is returned, ## as many times as corresponding pairs in the vertex series. g <- make_graph(rep(c(1, 2), 5)) eis <- get.edge.ids(g, c(1, 2, 1, 2)) eis #> [1] 5 5 E(g)[eis] #> + 2/5 edges from 8931e44: #> [1] 1->2 1->2"},{"path":"https://r.igraph.org/reference/get.edgelist.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a graph to an edge list — get.edgelist","title":"Convert a graph to an edge list — get.edgelist","text":"get.edgelist() renamed as_edgelist() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.edgelist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a graph to an edge list — get.edgelist","text":"","code":"get.edgelist(graph, names = TRUE)"},{"path":"https://r.igraph.org/reference/get.edgelist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a graph to an edge list — get.edgelist","text":"graph graph convert. names Whether return character matrix containing vertex names (.e. name vertex attribute) exist numeric vertex ids.","code":""},{"path":"https://r.igraph.org/reference/get.graph.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph attributes of a graph — get.graph.attribute","title":"Graph attributes of a graph — get.graph.attribute","text":"get.graph.attribute() renamed graph_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.graph.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph attributes of a graph — get.graph.attribute","text":"","code":"get.graph.attribute(graph, name)"},{"path":"https://r.igraph.org/reference/get.graph.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph attributes of a graph — get.graph.attribute","text":"graph Input graph. name name attribute query. missing, attributes returned list.","code":""},{"path":"https://r.igraph.org/reference/get.incidence.html","id":null,"dir":"Reference","previous_headings":"","what":"Bipartite adjacency matrix of a bipartite graph — get.incidence","title":"Bipartite adjacency matrix of a bipartite graph — get.incidence","text":"get.incidence() renamed as_biadjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.incidence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bipartite adjacency matrix of a bipartite graph — get.incidence","text":"","code":"get.incidence(graph, types = NULL, attr = NULL, names = TRUE, sparse = FALSE)"},{"path":"https://r.igraph.org/reference/get.incidence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bipartite adjacency matrix of a bipartite graph — get.incidence","text":"graph input graph. direction edges ignored directed graphs. types optional vertex type vector use instead type vertex attribute. must supply argument graph type vertex attribute. attr Either NULL character string giving edge attribute name. NULL, traditional bipartite adjacency matrix returned. NULL values given edge attribute included bipartite adjacency matrix. graph multiple edges, edge attribute arbitrarily chosen edge (multiple edges) included. names Logical scalar, TRUE vertices graph named (.e. graph vertex attribute called name), vertex names added result row column names. Otherwise ids vertices used row column names. sparse Logical scalar, TRUE sparse matrix created, need Matrix package .","code":""},{"path":"https://r.igraph.org/reference/get.shortest.paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Shortest (directed or undirected) paths between vertices — get.shortest.paths","title":"Shortest (directed or undirected) paths between vertices — get.shortest.paths","text":"get.shortest.paths() renamed shortest_paths() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.shortest.paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shortest (directed or undirected) paths between vertices — get.shortest.paths","text":"","code":"get.shortest.paths( graph, from, to = V(graph), mode = c(\"out\", \"all\", \"in\"), weights = NULL, output = c(\"vpath\", \"epath\", \"both\"), predecessors = FALSE, inbound.edges = FALSE, algorithm = c(\"automatic\", \"unweighted\", \"dijkstra\", \"bellman-ford\") )"},{"path":"https://r.igraph.org/reference/get.shortest.paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shortest (directed or undirected) paths between vertices — get.shortest.paths","text":"graph graph work . Numeric constant, vertex shortest paths calculated. Note right now vector vertex ids, single vertex. Numeric vector, vertices shortest paths calculated. default includes vertices. Note distances() every vertex must included . (required shortest_paths(). mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, corresponding undirected graph used, .e. directed paths searched. argument ignored undirected graphs. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). output Character scalar, defines report shortest paths. “vpath” means vertices along paths reported, form used prior igraph version 0.6. “epath” means edges along paths reported. “” means forms returned, named list components “vpath” “epath”. predecessors Logical scalar, whether return predecessor vertex vertex. predecessor vertex tree vertex vertex reached. predecessor start vertex (argument) definition. predecessor zero, means given vertex reached source search. Note search terminates vertices reached. inbound.edges Logical scalar, whether return inbound edge vertex. inbound edge vertex tree edge via vertex reached. start vertex vertices reached search zero corresponding entry vector. Note search terminates vertices reached. algorithm algorithm use calculation. default igraph tries select fastest suitable algorithm. weights, unweighted breadth-first search used, otherwise weights positive, Dijkstra's algorithm used. negative weights calculation 100 sources, Johnson's algorithm used. Otherwise Bellman-Ford algorithm used. can override igraph's choice explicitly giving parameter. Note igraph C core might still override choice obvious cases, .e. edge weights, unweighted algorithm used, regardless argument.","code":""},{"path":"https://r.igraph.org/reference/get.stochastic.html","id":null,"dir":"Reference","previous_headings":"","what":"Stochastic matrix of a graph — get.stochastic","title":"Stochastic matrix of a graph — get.stochastic","text":"get.stochastic() renamed stochastic_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.stochastic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stochastic matrix of a graph — get.stochastic","text":"","code":"get.stochastic( graph, column.wise = FALSE, sparse = igraph_opt(\"sparsematrices\") )"},{"path":"https://r.igraph.org/reference/get.stochastic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stochastic matrix of a graph — get.stochastic","text":"graph input graph. Must class igraph. column.wise FALSE, rows stochastic matrix sum one; otherwise columns. sparse Logical scalar, whether return sparse matrix. Matrix package needed sparse matrices.","code":""},{"path":"https://r.igraph.org/reference/get.vertex.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Query vertex attributes of a graph — get.vertex.attribute","title":"Query vertex attributes of a graph — get.vertex.attribute","text":"get.vertex.attribute() renamed vertex_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/get.vertex.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query vertex attributes of a graph — get.vertex.attribute","text":"","code":"get.vertex.attribute(graph, name, index = V(graph))"},{"path":"https://r.igraph.org/reference/get.vertex.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query vertex attributes of a graph — get.vertex.attribute","text":"graph graph. name Name attribute query. missing, vertex attributes returned list. index optional vertex sequence query attribute vertices.","code":""},{"path":"https://r.igraph.org/reference/getIgraphOpt.html","id":null,"dir":"Reference","previous_headings":"","what":"Parameters for the igraph package — getIgraphOpt","title":"Parameters for the igraph package — getIgraphOpt","text":"getIgraphOpt() renamed igraph_opt() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/getIgraphOpt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parameters for the igraph package — getIgraphOpt","text":"","code":"getIgraphOpt(x, default = NULL)"},{"path":"https://r.igraph.org/reference/getIgraphOpt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parameters for the igraph package — getIgraphOpt","text":"x character string holding option name. default specified option set options list, value returned. facilitates retrieving option checking whether set setting separately .","code":""},{"path":"https://r.igraph.org/reference/girth.html","id":null,"dir":"Reference","previous_headings":"","what":"Girth of a graph — girth","title":"Girth of a graph — girth","text":"girth graph length shortest circle .","code":""},{"path":"https://r.igraph.org/reference/girth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Girth of a graph — girth","text":"","code":"girth(graph, circle = TRUE)"},{"path":"https://r.igraph.org/reference/girth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Girth of a graph — girth","text":"graph input graph. may directed, algorithm searches undirected circles anyway. circle Logical scalar, whether return shortest circle .","code":""},{"path":"https://r.igraph.org/reference/girth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Girth of a graph — girth","text":"named list two components: girth Integer constant, girth graph, 0 graph acyclic. circle Numeric vector vertex ids shortest circle.","code":""},{"path":"https://r.igraph.org/reference/girth.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Girth of a graph — girth","text":"current implementation works undirected graphs , directed graphs treated undirected graphs. Loop edges multiple edges ignored. graph forest (.e. acyclic), Inf returned. implementation based Alon Itai Michael Rodeh: Finding minimum circuit graph Proceedings ninth annual ACM symposium Theory computing, 1-10, 1977. first implementation function done Keith Briggs, thanks Keith.","code":""},{"path":"https://r.igraph.org/reference/girth.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Girth of a graph — girth","text":"Alon Itai Michael Rodeh: Finding minimum circuit graph Proceedings ninth annual ACM symposium Theory computing, 1-10, 1977","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/girth.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Girth of a graph — girth","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/girth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Girth of a graph — girth","text":"","code":"# No circle in a tree g <- make_tree(1000, 3) girth(g) #> $girth #> [1] Inf #> #> $circle #> + 0/1000 vertices, from da89051: #> # The worst case running time is for a ring g <- make_ring(100) girth(g) #> $girth #> [1] 100 #> #> $circle #> + 100/100 vertices, from aa32b6b: #> [1] 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 #> [19] 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 #> [37] 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1 2 3 4 #> [55] 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 #> [73] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 #> [91] 41 42 43 44 45 46 47 48 49 50 #> # What about a random graph? g <- sample_gnp(1000, 1 / 1000) girth(g) #> $girth #> [1] 16 #> #> $circle #> + 16/1000 vertices, from 10cf6ba: #> [1] 621 656 162 333 482 437 472 845 142 114 338 717 698 147 401 270 #>"},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":null,"dir":"Reference","previous_headings":"","what":"Efficiency of a graph — global_efficiency","title":"Efficiency of a graph — global_efficiency","text":"functions calculate global average local efficiency network, local efficiency every vertex network. See definitions.","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Efficiency of a graph — global_efficiency","text":"","code":"global_efficiency(graph, weights = NULL, directed = TRUE) local_efficiency( graph, vids = V(graph), weights = NULL, directed = TRUE, mode = c(\"all\", \"out\", \"in\", \"total\") ) average_local_efficiency( graph, weights = NULL, directed = TRUE, mode = c(\"all\", \"out\", \"in\", \"total\") )"},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Efficiency of a graph — global_efficiency","text":"graph graph analyze. weights edge weights. edge weights must non-negative; additionally, edge weight may NaN. NULL (default) graph weight edge attribute, used automatically. directed Logical scalar, whether consider directed paths. Ignored undirected graphs. vids vertex ids vertices calculation done. Applies local efficiency calculation . mode Specifies define local neighborhood vertex directed graphs. “” considers -neighbors , “” considers -neighbors , “” considers .","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Efficiency of a graph — global_efficiency","text":"global_efficiency(), global efficiency graph single number. average_local_efficiency(), average local efficiency graph single number. local_efficiency(), local efficiency vertex vector.","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"global-efficiency","dir":"Reference","previous_headings":"","what":"Global efficiency","title":"Efficiency of a graph — global_efficiency","text":"global efficiency network defined average inverse distances pairs vertices. precisely: $$E_g = \\frac{1}{n (n-1)} \\sum_{\\ne j} \\frac{1}{d_{ij}}$$ \\(n\\) number vertices. inverse distance pairs reachable considered zero. graphs fewer 2 vertices, NaN returned.","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"local-efficiency","dir":"Reference","previous_headings":"","what":"Local efficiency","title":"Efficiency of a graph — global_efficiency","text":"local efficiency network around vertex defined follows: remove vertex compute distances (shortest path lengths) neighbours rest network. local efficiency around removed vertex average inverse distances. inverse distance two vertices reachable considered zero. local efficiency around vertex fewer two neighbours taken zero convention.","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"average-local-efficiency","dir":"Reference","previous_headings":"","what":"Average local efficiency","title":"Efficiency of a graph — global_efficiency","text":"average local efficiency network simply arithmetic mean local efficiencies vertices; see definition local efficiency .","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Efficiency of a graph — global_efficiency","text":"V. Latora M. Marchiori: Efficient Behavior Small-World Networks, Phys. Rev. Lett. 87, 198701 (2001). . Vragović, E. Louis, . Díaz-Guilera, Efficiency informational transfer regular complex networks, Phys. Rev. E 71, 1 (2005).","code":""},{"path":"https://r.igraph.org/reference/global_efficiency.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Efficiency of a graph — global_efficiency","text":"","code":"g <- make_graph(\"zachary\") global_efficiency(g) #> [1] 0.4920083 average_local_efficiency(g) #> [1] 0.752932"},{"path":"https://r.igraph.org/reference/gorder.html","id":null,"dir":"Reference","previous_headings":"","what":"Order (number of vertices) of a graph — gorder","title":"Order (number of vertices) of a graph — gorder","text":"vcount() gorder() aliases.","code":""},{"path":"https://r.igraph.org/reference/gorder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Order (number of vertices) of a graph — gorder","text":"","code":"vcount(graph) gorder(graph)"},{"path":"https://r.igraph.org/reference/gorder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Order (number of vertices) of a graph — gorder","text":"graph graph","code":""},{"path":"https://r.igraph.org/reference/gorder.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Order (number of vertices) of a graph — gorder","text":"Number vertices, numeric scalar.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/gorder.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Order (number of vertices) of a graph — gorder","text":"","code":"g <- make_ring(10) gorder(g) #> [1] 10 vcount(g) #> [1] 10"},{"path":"https://r.igraph.org/reference/graph.adhesion.html","id":null,"dir":"Reference","previous_headings":"","what":"Edge connectivity — graph.adhesion","title":"Edge connectivity — graph.adhesion","text":"graph.adhesion() renamed adhesion() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.adhesion.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Edge connectivity — graph.adhesion","text":"","code":"graph.adhesion(graph, checks = TRUE)"},{"path":"https://r.igraph.org/reference/graph.adhesion.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Edge connectivity — graph.adhesion","text":"graph input graph. checks Logical constant. Whether check graph connected also degree vertices. graph (strongly) connected connectivity obviously zero. Otherwise minimum degree one edge connectivity also one. good idea perform checks, can done quickly compared connectivity calculation . suggested Peter McMahan, thanks Peter.","code":""},{"path":"https://r.igraph.org/reference/graph.adjacency.html","id":null,"dir":"Reference","previous_headings":"","what":"Create graphs from adjacency matrices — graph.adjacency","title":"Create graphs from adjacency matrices — graph.adjacency","text":"graph.adjacency() renamed graph_from_adjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.adjacency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create graphs from adjacency matrices — graph.adjacency","text":"","code":"graph.adjacency( adjmatrix, mode = c(\"directed\", \"undirected\", \"max\", \"min\", \"upper\", \"lower\", \"plus\"), weighted = NULL, diag = TRUE, add.colnames = NULL, add.rownames = NA )"},{"path":"https://r.igraph.org/reference/graph.adjacency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create graphs from adjacency matrices — graph.adjacency","text":"adjmatrix square adjacency matrix. igraph version 0.5.1 can sparse matrix created Matrix package. mode Character scalar, specifies igraph interpret supplied matrix. See also weighted argument, interpretation depends . Possible values : directed, undirected, upper, lower, max, min, plus. See details . weighted argument specifies whether create weighted graph adjacency matrix. NULL unweighted graph created elements adjacency matrix gives number edges vertices. character constant every non-zero matrix entry edge created value entry added edge attribute named weighted argument. TRUE weighted graph created name edge attribute weight. See also details . diag Logical scalar, whether include diagonal matrix calculation. FALSE diagonal zerod first. add.colnames Character scalar, whether add column names vertex attributes. ‘NULL’ (default) , present, column names added vertex attribute ‘name’. ‘NA’ added. character constant, gives name vertex attribute add. add.rownames Character scalar, whether add row names vertex attributes. Possible values previous argument. default row names added. ‘add.rownames’ ‘add.colnames’ specify vertex attribute, former ignored.","code":""},{"path":"https://r.igraph.org/reference/graph.adjlist.html","id":null,"dir":"Reference","previous_headings":"","what":"Create graphs from adjacency lists — graph.adjlist","title":"Create graphs from adjacency lists — graph.adjlist","text":"graph.adjlist() renamed graph_from_adj_list() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.adjlist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create graphs from adjacency lists — graph.adjlist","text":"","code":"graph.adjlist(adjlist, mode = c(\"out\", \"in\", \"all\", \"total\"), duplicate = TRUE)"},{"path":"https://r.igraph.org/reference/graph.adjlist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create graphs from adjacency lists — graph.adjlist","text":"adjlist adjacency list. consistent, .e. maximum throughout vectors list must less number vectors (=number vertices graph). mode Character scalar, specifies whether graph create undirected (‘’ ‘total’) directed; latter case, whether contains outgoing (‘’) incoming (‘’) neighbors vertices. duplicate Logical scalar. undirected graphs gives whether edges included list twice. E.g. TRUE undirected {,B} edge graph_from_adj_list() expects included neighbors B B included neighbors . argument ignored mode .","code":""},{"path":"https://r.igraph.org/reference/graph.automorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of automorphisms — graph.automorphisms","title":"Number of automorphisms — graph.automorphisms","text":"graph.automorphisms() renamed count_automorphisms() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.automorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of automorphisms — graph.automorphisms","text":"","code":"graph.automorphisms( graph, colors = NULL, sh = c(\"fm\", \"f\", \"fs\", \"fl\", \"flm\", \"fsm\") )"},{"path":"https://r.igraph.org/reference/graph.automorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of automorphisms — graph.automorphisms","text":"graph input graph, treated undirected. colors colors individual vertices graph; vertices color allowed match automorphism. omitted, igraph uses color attribute vertices, , vertex attribute, simply assumes vertices color. Pass NULL explicitly graph color vertex attribute want use . sh splitting heuristics BLISS algorithm. Possible values : ‘f’: first non-singleton cell, ‘fl’: first largest non-singleton cell, ‘fs’: first smallest non-singleton cell, ‘fm’: first maximally non-trivially connected non-singleton cell, ‘flm’: first largest maximally non-trivially connected non-singleton cell, ‘fsm’: first smallest maximally non-trivially connected non-singleton cell.","code":""},{"path":"https://r.igraph.org/reference/graph.bfs.html","id":null,"dir":"Reference","previous_headings":"","what":"Breadth-first search — graph.bfs","title":"Breadth-first search — graph.bfs","text":"graph.bfs() renamed bfs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.bfs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Breadth-first search — graph.bfs","text":"","code":"graph.bfs( graph, root, mode = c(\"out\", \"in\", \"all\", \"total\"), unreachable = TRUE, restricted = NULL, order = TRUE, rank = FALSE, father = FALSE, pred = FALSE, succ = FALSE, dist = FALSE, callback = NULL, extra = NULL, rho = parent.frame(), neimode )"},{"path":"https://r.igraph.org/reference/graph.bfs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Breadth-first search — graph.bfs","text":"graph input graph. root Numeric vector, usually length one. root vertex, root vertices start search . mode directed graphs specifies type edges follow. ‘’ follows outgoing, ‘’ incoming edges. ‘’ ignores edge directions completely. ‘total’ synonym ‘’. argument ignored undirected graphs. unreachable Logical scalar, whether search visit vertices unreachable given root vertex (vertices). TRUE, additional searches performed vertices visited. restricted NULL (=restriction), vector vertices (ids symbolic names). latter case, search restricted given vertices. order Logical scalar, whether return ordering vertices. rank Logical scalar, whether return rank vertices. father Logical scalar, whether return father vertices. pred Logical scalar, whether return predecessors vertices. succ Logical scalar, whether return successors vertices. dist Logical scalar, whether return distance root search tree. callback NULL, must callback function. called whenever vertex visited. See details . extra Additional argument supply callback function. rho environment callback function evaluated. neimode argument deprecated igraph 1.3.0; use mode instead.","code":""},{"path":"https://r.igraph.org/reference/graph.cohesion.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex connectivity — graph.cohesion","title":"Vertex connectivity — graph.cohesion","text":"graph.cohesion() renamed cohesion() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.cohesion.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex connectivity — graph.cohesion","text":"","code":"graph.cohesion(x, ...)"},{"path":"https://r.igraph.org/reference/graph.cohesion.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex connectivity — graph.cohesion","text":"x x ... passed cohesion()","code":""},{"path":"https://r.igraph.org/reference/graph.complementer.html","id":null,"dir":"Reference","previous_headings":"","what":"Complementer of a graph — graph.complementer","title":"Complementer of a graph — graph.complementer","text":"graph.complementer() renamed complementer() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.complementer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Complementer of a graph — graph.complementer","text":"","code":"graph.complementer(graph, loops = FALSE)"},{"path":"https://r.igraph.org/reference/graph.complementer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Complementer of a graph — graph.complementer","text":"graph input graph, can directed undirected. loops Logical constant, whether generate loop edges.","code":""},{"path":"https://r.igraph.org/reference/graph.compose.html","id":null,"dir":"Reference","previous_headings":"","what":"Compose two graphs as binary relations — graph.compose","title":"Compose two graphs as binary relations — graph.compose","text":"graph.compose() renamed compose() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.compose.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compose two graphs as binary relations — graph.compose","text":"","code":"graph.compose(g1, g2, byname = \"auto\")"},{"path":"https://r.igraph.org/reference/graph.compose.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compose two graphs as binary relations — graph.compose","text":"g1 first input graph. g2 second input graph. byname logical scalar, character scalar auto. Whether perform operation based symbolic vertex names. auto, means TRUE graphs named FALSE otherwise. warning generated auto one graph, graphs named.","code":""},{"path":"https://r.igraph.org/reference/graph.coreness.html","id":null,"dir":"Reference","previous_headings":"","what":"K-core decomposition of graphs — graph.coreness","title":"K-core decomposition of graphs — graph.coreness","text":"graph.coreness() renamed coreness() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.coreness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"K-core decomposition of graphs — graph.coreness","text":"","code":"graph.coreness(graph, mode = c(\"all\", \"out\", \"in\"))"},{"path":"https://r.igraph.org/reference/graph.coreness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"K-core decomposition of graphs — graph.coreness","text":"graph input graph, can directed undirected mode type core directed graphs. Character constant, possible values: : -cores computed, : -cores computed, : corresponding undirected graph considered. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/graph.data.frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating igraph graphs from data frames or vice-versa — graph.data.frame","title":"Creating igraph graphs from data frames or vice-versa — graph.data.frame","text":"graph.data.frame() renamed graph_from_data_frame() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.data.frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating igraph graphs from data frames or vice-versa — graph.data.frame","text":"","code":"graph.data.frame(d, directed = TRUE, vertices = NULL)"},{"path":"https://r.igraph.org/reference/graph.data.frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating igraph graphs from data frames or vice-versa — graph.data.frame","text":"d data frame containing symbolic edge list first two columns. Additional columns considered edge attributes. Since version 0.7 argument coerced data frame .data.frame. directed Logical scalar, whether create directed graph. vertices data frame vertex metadata, NULL. See details . Since version 0.7 argument coerced data frame .data.frame, NULL.","code":""},{"path":"https://r.igraph.org/reference/graph.density.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph density — graph.density","title":"Graph density — graph.density","text":"graph.density() renamed edge_density() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.density.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph density — graph.density","text":"","code":"graph.density(graph, loops = FALSE)"},{"path":"https://r.igraph.org/reference/graph.density.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph density — graph.density","text":"graph input graph. loops Logical constant, whether loop edges may exist graph. affects calculation largest possible number edges graph. parameter set FALSE yet graph contains self-loops, result meaningful.","code":""},{"path":"https://r.igraph.org/reference/graph.dfs.html","id":null,"dir":"Reference","previous_headings":"","what":"Depth-first search — graph.dfs","title":"Depth-first search — graph.dfs","text":"graph.dfs() renamed dfs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.dfs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Depth-first search — graph.dfs","text":"","code":"graph.dfs( graph, root, mode = c(\"out\", \"in\", \"all\", \"total\"), unreachable = TRUE, order = TRUE, order.out = FALSE, father = FALSE, dist = FALSE, in.callback = NULL, out.callback = NULL, extra = NULL, rho = parent.frame(), neimode )"},{"path":"https://r.igraph.org/reference/graph.dfs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Depth-first search — graph.dfs","text":"graph input graph. root single root vertex start search . mode directed graphs specifies type edges follow. ‘’ follows outgoing, ‘’ incoming edges. ‘’ ignores edge directions completely. ‘total’ synonym ‘’. argument ignored undirected graphs. unreachable Logical scalar, whether search visit vertices unreachable given root vertex (vertices). TRUE, additional searches performed vertices visited. order Logical scalar, whether return DFS ordering vertices. order.Logical scalar, whether return ordering based leaving subtree vertex. father Logical scalar, whether return father vertices. dist Logical scalar, whether return distance root search tree. .callback NULL, must callback function. called whenever vertex visited. See details . .callback NULL, must callback function. called whenever subtree vertex completed algorithm. See details . extra Additional argument supply callback function. rho environment callback function evaluated. neimode argument deprecated igraph 1.3.0; use mode instead.","code":""},{"path":"https://r.igraph.org/reference/graph.difference.html","id":null,"dir":"Reference","previous_headings":"","what":"Difference of two sets — graph.difference","title":"Difference of two sets — graph.difference","text":"graph.difference() renamed difference() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.difference.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Difference of two sets — graph.difference","text":"","code":"graph.difference(...)"},{"path":"https://r.igraph.org/reference/graph.difference.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Difference of two sets — graph.difference","text":"... Arguments, number interpretation depends function implements difference().","code":""},{"path":"https://r.igraph.org/reference/graph.disjoint.union.html","id":null,"dir":"Reference","previous_headings":"","what":"Disjoint union of graphs — graph.disjoint.union","title":"Disjoint union of graphs — graph.disjoint.union","text":"graph.disjoint.union() renamed disjoint_union() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.disjoint.union.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Disjoint union of graphs — graph.disjoint.union","text":"","code":"graph.disjoint.union(...)"},{"path":"https://r.igraph.org/reference/graph.disjoint.union.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Disjoint union of graphs — graph.disjoint.union","text":"... Graph objects lists graph objects.","code":""},{"path":"https://r.igraph.org/reference/graph.diversity.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph diversity — graph.diversity","title":"Graph diversity — graph.diversity","text":"graph.diversity() renamed diversity() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.diversity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph diversity — graph.diversity","text":"","code":"graph.diversity(graph, weights = NULL, vids = V(graph))"},{"path":"https://r.igraph.org/reference/graph.diversity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph diversity — graph.diversity","text":"graph input graph. Edge directions ignored. weights NULL, vector edge weights use computation. NULL, ‘weight’ attibute used. Note measure defined unweighted graphs. vids vertex ids calculate measure.","code":""},{"path":"https://r.igraph.org/reference/graph.edgelist.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a graph from an edge list matrix — graph.edgelist","title":"Create a graph from an edge list matrix — graph.edgelist","text":"graph.edgelist() renamed graph_from_edgelist() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.edgelist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a graph from an edge list matrix — graph.edgelist","text":"","code":"graph.edgelist(el, directed = TRUE)"},{"path":"https://r.igraph.org/reference/graph.edgelist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a graph from an edge list matrix — graph.edgelist","text":"el edge list, two column matrix, character numeric. directed Whether create directed graph.","code":""},{"path":"https://r.igraph.org/reference/graph.eigen.html","id":null,"dir":"Reference","previous_headings":"","what":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — graph.eigen","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — graph.eigen","text":"graph.eigen() renamed spectrum() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.eigen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — graph.eigen","text":"","code":"graph.eigen( graph, algorithm = c(\"arpack\", \"auto\", \"lapack\", \"comp_auto\", \"comp_lapack\", \"comp_arpack\"), which = list(), options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/graph.eigen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — graph.eigen","text":"graph input graph, can directed undirected. algorithm algorithm use. Currently arpack implemented, uses ARPACK solver. See also arpack(). list specify eigenvalues eigenvectors calculate. default leading (.e. largest magnitude) eigenvalue corresponding eigenvector calculated. options Options ARPACK solver. See arpack_defaults().","code":""},{"path":"https://r.igraph.org/reference/graph.graphdb.html","id":null,"dir":"Reference","previous_headings":"","what":"Load a graph from the graph database for testing graph isomorphism. — graph.graphdb","title":"Load a graph from the graph database for testing graph isomorphism. — graph.graphdb","text":"graph.graphdb() renamed graph_from_graphdb() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.graphdb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load a graph from the graph database for testing graph isomorphism. — graph.graphdb","text":"","code":"graph.graphdb( url = NULL, prefix = \"iso\", type = \"r001\", nodes = NULL, pair = \"A\", which = 0, base = \"http://cneurocvs.rmki.kfki.hu/graphdb/gzip\", compressed = TRUE, directed = TRUE )"},{"path":"https://r.igraph.org/reference/graph.graphdb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load a graph from the graph database for testing graph isomorphism. — graph.graphdb","text":"url NULL complete URL file import. prefix Gives prefix. See details . Possible values: iso, i2, si4, si6, mcs10, mcs30, mcs50, mcs70, mcs90. type Gives graph type identifier. See details . Possible values: r001, r005, r01, r02, m2D, m2Dr2, m2Dr4, m2Dr6 m3D, m3Dr2, m3Dr4, m3Dr6, m4D, m4Dr2, m4Dr4, m4Dr6, b03, b03m, b06, b06m, b09, b09m. nodes number vertices graph. pair Specifies graph pair read. Possible values: B. Gives number graph read. every graph type number actual graphs database. argument specifies one read. base base address database. See details . compressed Logical constant, TRUE file expected compressed gzip. url NULL ‘.gz’ suffix added filename. directed Logical constant, whether create directed graph.","code":""},{"path":"https://r.igraph.org/reference/graph.incidence.html","id":null,"dir":"Reference","previous_headings":"","what":"Create graphs from a bipartite adjacency matrix — graph.incidence","title":"Create graphs from a bipartite adjacency matrix — graph.incidence","text":"graph.incidence() renamed graph_from_biadjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.incidence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create graphs from a bipartite adjacency matrix — graph.incidence","text":"","code":"graph.incidence( incidence, directed = FALSE, mode = c(\"all\", \"out\", \"in\", \"total\"), multiple = FALSE, weighted = NULL, add.names = NULL )"},{"path":"https://r.igraph.org/reference/graph.incidence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create graphs from a bipartite adjacency matrix — graph.incidence","text":"incidence input bipartite adjacency matrix. can also sparse matrix Matrix package. directed Logical scalar, whether create directed graph. mode character constant, defines direction edges directed graphs, ignored undirected graphs. ‘’, edges go vertices first kind (corresponding rows bipartite adjacency matrix) vertices second kind (columns incidence matrix). ‘’, opposite direction used. ‘’ ‘total’, mutual edges created. multiple Logical scalar, specifies interpret matrix elements. See details . weighted argument specifies whether create weighted graph bipartite adjacency matrix. NULL unweighted graph created multiple argument used determine edges graph. character constant every non-zero matrix entry edge created value entry added edge attribute named weighted argument. TRUE weighted graph created name edge attribute ‘weight’. add.names character constant, NA NULL. graph_from_biadjacency_matrix() can add row column names incidence matrix vertex attributes. argument NULL (default) bipartite adjacency matrix row column names, added ‘name’ vertex attribute. want different vertex attribute , give name attributes character string. argument NA, vertex attributes (type) added.","code":""},{"path":"https://r.igraph.org/reference/graph.intersection.html","id":null,"dir":"Reference","previous_headings":"","what":"Intersection of two or more sets — graph.intersection","title":"Intersection of two or more sets — graph.intersection","text":"graph.intersection() renamed intersection() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.intersection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Intersection of two or more sets — graph.intersection","text":"","code":"graph.intersection(...)"},{"path":"https://r.igraph.org/reference/graph.intersection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Intersection of two or more sets — graph.intersection","text":"... Arguments, number interpretation depends function implements intersection().","code":""},{"path":"https://r.igraph.org/reference/graph.isocreate.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a graph from an isomorphism class — graph.isocreate","title":"Create a graph from an isomorphism class — graph.isocreate","text":"graph.isocreate() renamed graph_from_isomorphism_class() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.isocreate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a graph from an isomorphism class — graph.isocreate","text":"","code":"graph.isocreate(size, number, directed = TRUE)"},{"path":"https://r.igraph.org/reference/graph.isocreate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a graph from an isomorphism class — graph.isocreate","text":"size number vertices graph. number isomorphism class. directed Whether create directed graph (default).","code":""},{"path":"https://r.igraph.org/reference/graph.knn.html","id":null,"dir":"Reference","previous_headings":"","what":"Average nearest neighbor degree — graph.knn","title":"Average nearest neighbor degree — graph.knn","text":"graph.knn() renamed knn() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.knn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average nearest neighbor degree — graph.knn","text":"","code":"graph.knn( graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), neighbor.degree.mode = c(\"all\", \"out\", \"in\", \"total\"), weights = NULL )"},{"path":"https://r.igraph.org/reference/graph.knn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average nearest neighbor degree — graph.knn","text":"graph input graph. may directed. vids vertices calculation performed. Normally includes vertices. Note, vertices given , ‘knn’ ‘knnk’ calculated based given vertices . mode Character constant indicate type neighbors consider directed graphs. considers -neighbors, considers -neighbors ignores edge directions. neighbor.degree.mode type degree average directed graphs. averages -degrees, averages -degrees ignores edge directions degree calculation. weights Weight vector. graph weight edge attribute, used default. argument given, vertex strength (see strength()) used instead vertex degree. note knnk still given function normal vertex degree. Weights used calculate weighted degree (also called strength()) instead degree.","code":""},{"path":"https://r.igraph.org/reference/graph.laplacian.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph Laplacian — graph.laplacian","title":"Graph Laplacian — graph.laplacian","text":"graph.laplacian() renamed laplacian_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.laplacian.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph Laplacian — graph.laplacian","text":"","code":"graph.laplacian( graph, normalized = FALSE, weights = NULL, sparse = igraph_opt(\"sparsematrices\") )"},{"path":"https://r.igraph.org/reference/graph.laplacian.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph Laplacian — graph.laplacian","text":"graph input graph. normalized Whether calculate normalized Laplacian. See definitions . weights optional vector giving edge weights weighted Laplacian matrix. NULL graph edge attribute called weight, used automatically. Set NA want unweighted Laplacian graph weight edge attribute. sparse Logical scalar, whether return result sparse matrix. Matrix package required sparse matrices.","code":""},{"path":"https://r.igraph.org/reference/graph.maxflow.html","id":null,"dir":"Reference","previous_headings":"","what":"Maximum flow in a graph — graph.maxflow","title":"Maximum flow in a graph — graph.maxflow","text":"graph.maxflow() renamed max_flow() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.maxflow.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Maximum flow in a graph — graph.maxflow","text":"","code":"graph.maxflow(graph, source, target, capacity = NULL)"},{"path":"https://r.igraph.org/reference/graph.maxflow.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Maximum flow in a graph — graph.maxflow","text":"graph input graph. source id source vertex. target id target vertex (sometimes also called sink). capacity Vector giving capacity edges. NULL (default) capacity edge attribute used. Note weight edge attribute used function.","code":""},{"path":"https://r.igraph.org/reference/graph.mincut.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum cut in a graph — graph.mincut","title":"Minimum cut in a graph — graph.mincut","text":"graph.mincut() renamed min_cut() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.mincut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum cut in a graph — graph.mincut","text":"","code":"graph.mincut( graph, source = NULL, target = NULL, capacity = NULL, value.only = TRUE )"},{"path":"https://r.igraph.org/reference/graph.mincut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum cut in a graph — graph.mincut","text":"graph input graph. source id source vertex. target id target vertex (sometimes also called sink). capacity Vector giving capacity edges. NULL (default) capacity edge attribute used. value.Logical scalar, TRUE minimum cut value returned, FALSE edges cut two () partitions also returned.","code":""},{"path":"https://r.igraph.org/reference/graph.motifs.est.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph motifs — graph.motifs.est","title":"Graph motifs — graph.motifs.est","text":"graph.motifs.est() renamed sample_motifs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.motifs.est.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph motifs — graph.motifs.est","text":"","code":"graph.motifs.est( graph, size = 3, cut.prob = rep(0, size), sample.size = vcount(graph)/10, sample = NULL )"},{"path":"https://r.igraph.org/reference/graph.motifs.est.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph motifs — graph.motifs.est","text":"graph Graph object, input graph. size size motif, currently size 3 4 supported directed graphs sizes 3-6 undirected graphs. cut.prob Numeric vector giving probabilities search graph cut certain level. length size motif (size argument). default cuts made. sample.size number vertices use starting point finding motifs. used sample argument NULL. sample NULL specifies vertices use starting point finding motifs.","code":""},{"path":"https://r.igraph.org/reference/graph.motifs.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph motifs — graph.motifs","title":"Graph motifs — graph.motifs","text":"graph.motifs() renamed motifs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.motifs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph motifs — graph.motifs","text":"","code":"graph.motifs(graph, size = 3, cut.prob = rep(0, size))"},{"path":"https://r.igraph.org/reference/graph.motifs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph motifs — graph.motifs","text":"graph Graph object, input graph. size size motif, currently sizes 3 4 supported directed graphs sizes 3-6 undirected graphs. cut.prob Numeric vector giving probabilities search graph cut certain level. length size motif (size argument). default cuts made.","code":""},{"path":"https://r.igraph.org/reference/graph.motifs.no.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph motifs — graph.motifs.no","title":"Graph motifs — graph.motifs.no","text":"graph.motifs.() renamed count_motifs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.motifs.no.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph motifs — graph.motifs.no","text":"","code":"graph.motifs.no(graph, size = 3, cut.prob = rep(0, size))"},{"path":"https://r.igraph.org/reference/graph.motifs.no.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph motifs — graph.motifs.no","text":"graph Graph object, input graph. size size motif. cut.prob Numeric vector giving probabilities search graph cut certain level. length size motif (size argument). default cuts made.","code":""},{"path":"https://r.igraph.org/reference/graph.neighborhood.html","id":null,"dir":"Reference","previous_headings":"","what":"Neighborhood of graph vertices — graph.neighborhood","title":"Neighborhood of graph vertices — graph.neighborhood","text":"graph.neighborhood() renamed make_ego_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.neighborhood.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neighborhood of graph vertices — graph.neighborhood","text":"","code":"graph.neighborhood( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 )"},{"path":"https://r.igraph.org/reference/graph.neighborhood.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neighborhood of graph vertices — graph.neighborhood","text":"graph input graph. order Integer giving order neighborhood. nodes vertices calculation performed. mode Character constant, specifies use direction edges directed graph analyzed. ‘’ outgoing edges followed, vertices reachable source vertex order steps counted. ‘\"\"’ vertices source vertex reachable order steps counted. ‘\"\"’ ignores direction edges. argument ignored undirected graphs. mindist minimum distance include vertex result.","code":""},{"path":"https://r.igraph.org/reference/graph.strength.html","id":null,"dir":"Reference","previous_headings":"","what":"Strength or weighted vertex degree — graph.strength","title":"Strength or weighted vertex degree — graph.strength","text":"graph.strength() renamed strength() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.strength.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Strength or weighted vertex degree — graph.strength","text":"","code":"graph.strength( graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), loops = TRUE, weights = NULL )"},{"path":"https://r.igraph.org/reference/graph.strength.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Strength or weighted vertex degree — graph.strength","text":"graph input graph. vids vertices strength calculated. mode Character string, “” -degree, “” -degree “” sum two. undirected graphs argument ignored. loops Logical; whether loop edges also counted. weights Weight vector. graph weight edge attribute, used default. graph weight edge attribute argument NULL, degree() called. NA, edge weights used (even graph weight edge attribute).","code":""},{"path":"https://r.igraph.org/reference/graph.union.html","id":null,"dir":"Reference","previous_headings":"","what":"Union of graphs — graph.union","title":"Union of graphs — graph.union","text":"graph.union() renamed union.igraph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph.union.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Union of graphs — graph.union","text":"","code":"graph.union(..., byname = \"auto\")"},{"path":"https://r.igraph.org/reference/graph.union.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Union of graphs — graph.union","text":"... Graph objects lists graph objects. byname logical scalar, character scalar auto. Whether perform operation based symbolic vertex names. auto, means TRUE graphs named FALSE otherwise. warning generated auto () graphs named.","code":""},{"path":"https://r.igraph.org/reference/graph_.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert object to a graph — graph_","title":"Convert object to a graph — graph_","text":"generic function convert R objects igraph graphs.","code":""},{"path":"https://r.igraph.org/reference/graph_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert object to a graph — graph_","text":"","code":"graph_(...)"},{"path":"https://r.igraph.org/reference/graph_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert object to a graph — graph_","text":"... Parameters, see details .","code":""},{"path":"https://r.igraph.org/reference/graph_.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert object to a graph — graph_","text":"TODO","code":""},{"path":"https://r.igraph.org/reference/graph_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert object to a graph — graph_","text":"","code":"## These are equivalent graph_(cbind(1:5, 2:6), from_edgelist(directed = FALSE)) #> IGRAPH cd1fe1e U--- 6 5 -- #> + edges from cd1fe1e: #> [1] 1--2 2--3 3--4 4--5 5--6 graph_(cbind(1:5, 2:6), from_edgelist(), directed = FALSE) #> IGRAPH 3707e00 U--- 6 5 -- #> + edges from 3707e00: #> [1] 1--2 2--3 3--4 4--5 5--6"},{"path":"https://r.igraph.org/reference/graph_attr-set.html","id":null,"dir":"Reference","previous_headings":"","what":"Set all or some graph attributes — graph_attr<-","title":"Set all or some graph attributes — graph_attr<-","text":"Set graph attributes","code":""},{"path":"https://r.igraph.org/reference/graph_attr-set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set all or some graph attributes — graph_attr<-","text":"","code":"graph_attr(graph, name) <- value"},{"path":"https://r.igraph.org/reference/graph_attr-set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set all or some graph attributes — graph_attr<-","text":"graph graph. name name attribute set. missing, value named list, list members set attributes. value value attribute set","code":""},{"path":"https://r.igraph.org/reference/graph_attr-set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set all or some graph attributes — graph_attr<-","text":"graph, attribute(s) added.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_attr-set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set all or some graph attributes — graph_attr<-","text":"","code":"g <- make_graph(~ A - B:C:D) graph_attr(g, \"name\") <- \"4-star\" g #> IGRAPH 760ebaf UN-- 4 3 -- 4-star #> + attr: name (g/c), name (v/c) #> + edges from 760ebaf (vertex names): #> [1] A--B A--C A--D graph_attr(g) <- list( layout = layout_with_fr(g), name = \"4-star layed out\" ) plot(g)"},{"path":"https://r.igraph.org/reference/graph_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph attributes of a graph — graph_attr","title":"Graph attributes of a graph — graph_attr","text":"Graph attributes graph","code":""},{"path":"https://r.igraph.org/reference/graph_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph attributes of a graph — graph_attr","text":"","code":"graph_attr(graph, name)"},{"path":"https://r.igraph.org/reference/graph_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph attributes of a graph — graph_attr","text":"graph Input graph. name name attribute query. missing, attributes returned list.","code":""},{"path":"https://r.igraph.org/reference/graph_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph attributes of a graph — graph_attr","text":"list graph attributes, single graph attribute.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph attributes of a graph — graph_attr","text":"","code":"g <- make_ring(10) graph_attr(g) #> $name #> [1] \"Ring graph\" #> #> $mutual #> [1] FALSE #> #> $circular #> [1] TRUE #> graph_attr(g, \"name\") #> [1] \"Ring graph\""},{"path":"https://r.igraph.org/reference/graph_attr_names.html","id":null,"dir":"Reference","previous_headings":"","what":"List names of graph attributes — graph_attr_names","title":"List names of graph attributes — graph_attr_names","text":"List names graph attributes","code":""},{"path":"https://r.igraph.org/reference/graph_attr_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List names of graph attributes — graph_attr_names","text":"","code":"graph_attr_names(graph)"},{"path":"https://r.igraph.org/reference/graph_attr_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List names of graph attributes — graph_attr_names","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/graph_attr_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List names of graph attributes — graph_attr_names","text":"Character vector, names graph attributes.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_attr_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List names of graph attributes — graph_attr_names","text":"","code":"g <- make_ring(10) graph_attr_names(g) #> [1] \"name\" \"mutual\" \"circular\""},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Create graphs from adjacency lists — graph_from_adj_list","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"adjacency list list numeric vectors, containing neighbor vertices vertex. function creates igraph graph object list.","code":""},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"","code":"graph_from_adj_list( adjlist, mode = c(\"out\", \"in\", \"all\", \"total\"), duplicate = TRUE )"},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"adjlist adjacency list. consistent, .e. maximum throughout vectors list must less number vectors (=number vertices graph). mode Character scalar, specifies whether graph create undirected (‘’ ‘total’) directed; latter case, whether contains outgoing (‘’) incoming (‘’) neighbors vertices. duplicate Logical scalar. undirected graphs gives whether edges included list twice. E.g. TRUE undirected {,B} edge graph_from_adj_list() expects included neighbors B B included neighbors . argument ignored mode .","code":""},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"igraph graph object.","code":""},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"Adjacency lists handy intend many (small) modifications graph. case adjacency lists efficient igraph graphs. idea convert graph adjacency list as_adj_list(), modifications graphs finally create igraph graph calling graph_from_adj_list().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/graph_from_adj_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create graphs from adjacency lists — graph_from_adj_list","text":"","code":"## Directed g <- make_ring(10, directed = TRUE) al <- as_adj_list(g, mode = \"out\") g2 <- graph_from_adj_list(al) graph.isomorphic(g, g2) #> [1] TRUE ## Undirected g <- make_ring(10) al <- as_adj_list(g) g2 <- graph_from_adj_list(al, mode = \"all\") graph.isomorphic(g, g2) #> [1] TRUE ecount(g2) #> [1] 10 g3 <- graph_from_adj_list(al, mode = \"all\", duplicate = FALSE) ecount(g3) #> [1] 20 which_multiple(g3) #> [1] FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE #> [13] TRUE FALSE TRUE FALSE TRUE FALSE TRUE TRUE"},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"graph_from_adjacency_matrix() flexible function creating igraph graphs adjacency matrices.","code":""},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"","code":"graph_from_adjacency_matrix( adjmatrix, mode = c(\"directed\", \"undirected\", \"max\", \"min\", \"upper\", \"lower\", \"plus\"), weighted = NULL, diag = TRUE, add.colnames = NULL, add.rownames = NA ) from_adjacency(...)"},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"adjmatrix square adjacency matrix. igraph version 0.5.1 can sparse matrix created Matrix package. mode Character scalar, specifies igraph interpret supplied matrix. See also weighted argument, interpretation depends . Possible values : directed, undirected, upper, lower, max, min, plus. See details . weighted argument specifies whether create weighted graph adjacency matrix. NULL unweighted graph created elements adjacency matrix gives number edges vertices. character constant every non-zero matrix entry edge created value entry added edge attribute named weighted argument. TRUE weighted graph created name edge attribute weight. See also details . diag Logical scalar, whether include diagonal matrix calculation. FALSE diagonal zerod first. add.colnames Character scalar, whether add column names vertex attributes. ‘NULL’ (default) , present, column names added vertex attribute ‘name’. ‘NA’ added. character constant, gives name vertex attribute add. add.rownames Character scalar, whether add row names vertex attributes. Possible values previous argument. default row names added. ‘add.rownames’ ‘add.colnames’ specify vertex attribute, former ignored. ... Passed graph_from_adjacency_matrix().","code":""},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"igraph graph object.","code":""},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"order vertices preserved, .e. vertex corresponding first row vertex 0 graph, etc. graph_from_adjacency_matrix() operates two main modes, depending weighted argument. argument NULL unweighted graph created element adjacency matrix gives number edges create two corresponding vertices. details depend value mode argument: \"directed\" graph directed matrix element gives number edges two vertices. \"undirected\" exactly max, convenience. Note checked whether matrix symmetric. \"max\" undirected graph created max((,j), (j,)) gives number edges. \"upper\" undirected graph created, upper right triangle (including diagonal) used number edges. \"lower\" undirected graph created, lower left triangle (including diagonal) used creating edges. \"min\" undirected graph created min((,j), (j,)) edges vertex j. \"plus\" undirected graph created (,j)+(j,) edges vertex j. weighted argument NULL elements matrix give weights edges (zero). details depend value mode argument: \"directed\" graph directed matrix element gives edge weights. \"undirected\" First check matrix symmetric. error . upper triangle used create weighted undirected graph. \"max\" undirected graph created max((,j), (j,)) gives edge weights. \"upper\" undirected graph created, upper right triangle (including diagonal) used (edge weights). \"lower\" undirected graph created, lower left triangle (including diagonal) used creating edges. \"min\" undirected graph created, min((,j), (j,)) gives edge weights. \"plus\" undirected graph created, (,j)+(j,) gives edge weights.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/graph_from_adjacency_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create graphs from adjacency matrices — graph_from_adjacency_matrix","text":"","code":"adjm <- matrix(sample(0:1, 100, replace = TRUE, prob = c(0.9, 0.1)), ncol = 10) g1 <- graph_from_adjacency_matrix(adjm) adjm <- matrix(sample(0:5, 100, replace = TRUE, prob = c(0.9, 0.02, 0.02, 0.02, 0.02, 0.02) ), ncol = 10) g2 <- graph_from_adjacency_matrix(adjm, weighted = TRUE) E(g2)$weight #> [1] 5 3 4 4 1 1 3 ## various modes for weighted graphs, with some tests nzs <- function(x) sort(x[x != 0]) adjm <- matrix(runif(100), 10) adjm[adjm < 0.5] <- 0 g3 <- graph_from_adjacency_matrix((adjm + t(adjm)) / 2, weighted = TRUE, mode = \"undirected\" ) g4 <- graph_from_adjacency_matrix(adjm, weighted = TRUE, mode = \"max\") all(nzs(pmax(adjm, t(adjm))[upper.tri(adjm)]) == sort(E(g4)$weight)) #> Warning: longer object length is not a multiple of shorter object length #> [1] FALSE g5 <- graph_from_adjacency_matrix(adjm, weighted = TRUE, mode = \"min\") all(nzs(pmin(adjm, t(adjm))[upper.tri(adjm)]) == sort(E(g5)$weight)) #> [1] FALSE g6 <- graph_from_adjacency_matrix(adjm, weighted = TRUE, mode = \"upper\") all(nzs(adjm[upper.tri(adjm)]) == sort(E(g6)$weight)) #> Warning: longer object length is not a multiple of shorter object length #> [1] FALSE g7 <- graph_from_adjacency_matrix(adjm, weighted = TRUE, mode = \"lower\") all(nzs(adjm[lower.tri(adjm)]) == sort(E(g7)$weight)) #> Warning: longer object length is not a multiple of shorter object length #> [1] FALSE g8 <- graph_from_adjacency_matrix(adjm, weighted = TRUE, mode = \"plus\") d2 <- function(x) { diag(x) <- diag(x) / 2 x } all(nzs((d2(adjm + t(adjm)))[lower.tri(adjm)]) == sort(E(g8)$weight)) #> Warning: longer object length is not a multiple of shorter object length #> [1] FALSE g9 <- graph_from_adjacency_matrix(adjm, weighted = TRUE, mode = \"plus\", diag = FALSE) d0 <- function(x) { diag(x) <- 0 } all(nzs((d0(adjm + t(adjm)))[lower.tri(adjm)]) == sort(E(g9)$weight)) #> [1] TRUE ## row/column names rownames(adjm) <- sample(letters, nrow(adjm)) colnames(adjm) <- seq(ncol(adjm)) g10 <- graph_from_adjacency_matrix(adjm, weighted = TRUE, add.rownames = \"code\") summary(g10) #> IGRAPH e9ae555 DNW- 10 47 -- #> + attr: name (v/c), code (v/c), weight (e/n)"},{"path":"https://r.igraph.org/reference/graph_from_atlas.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a graph from the Graph Atlas — graph_from_atlas","title":"Create a graph from the Graph Atlas — graph_from_atlas","text":"graph_from_atlas() creates graphs book ‘Atlas Graphs’ Roland C. Read Robin J. Wilson. atlas contains undirected graphs seven vertices, numbered 0 1252. graphs listed: increasing order number nodes; fixed number nodes, increasing order number edges; fixed numbers nodes edges, increasing order degree sequence, example 111223 < 112222; fixed degree sequence, increasing number automorphisms.","code":""},{"path":"https://r.igraph.org/reference/graph_from_atlas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a graph from the Graph Atlas — graph_from_atlas","text":"","code":"graph_from_atlas(n) atlas(...)"},{"path":"https://r.igraph.org/reference/graph_from_atlas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a graph from the Graph Atlas — graph_from_atlas","text":"n id graph create. ... Passed graph_from_atlas().","code":""},{"path":"https://r.igraph.org/reference/graph_from_atlas.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a graph from the Graph Atlas — graph_from_atlas","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_atlas.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a graph from the Graph Atlas — graph_from_atlas","text":"","code":"## Some randomly picked graphs from the atlas graph_from_atlas(sample(0:1252, 1)) #> IGRAPH f9f9549 U--- 7 15 -- Graph from the Atlas #1197 #> + attr: name (g/c), n (g/n) #> + edges from f9f9549: #> [1] 1--2 1--3 1--4 1--5 1--6 1--7 2--6 2--7 3--5 3--6 3--7 4--5 4--6 4--7 5--7 graph_from_atlas(sample(0:1252, 1)) #> IGRAPH b788575 U--- 6 7 -- Graph from the Atlas #112 #> + attr: name (g/c), n (g/n) #> + edges from b788575: #> [1] 1--2 2--5 3--5 3--4 2--6 3--6 2--3"},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"graph_from_biadjacency_matrix() creates bipartite igraph graph incidence matrix.","code":""},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"","code":"graph_from_biadjacency_matrix( incidence, directed = FALSE, mode = c(\"all\", \"out\", \"in\", \"total\"), multiple = FALSE, weighted = NULL, add.names = NULL )"},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"incidence input bipartite adjacency matrix. can also sparse matrix Matrix package. directed Logical scalar, whether create directed graph. mode character constant, defines direction edges directed graphs, ignored undirected graphs. ‘’, edges go vertices first kind (corresponding rows bipartite adjacency matrix) vertices second kind (columns incidence matrix). ‘’, opposite direction used. ‘’ ‘total’, mutual edges created. multiple Logical scalar, specifies interpret matrix elements. See details . weighted argument specifies whether create weighted graph bipartite adjacency matrix. NULL unweighted graph created multiple argument used determine edges graph. character constant every non-zero matrix entry edge created value entry added edge attribute named weighted argument. TRUE weighted graph created name edge attribute ‘weight’. add.names character constant, NA NULL. graph_from_biadjacency_matrix() can add row column names incidence matrix vertex attributes. argument NULL (default) bipartite adjacency matrix row column names, added ‘name’ vertex attribute. want different vertex attribute , give name attributes character string. argument NA, vertex attributes (type) added.","code":""},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"bipartite igraph graph. words, igraph graph vertex attribute type.","code":""},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"Bipartite graphs ‘type’ vertex attribute igraph, boolean FALSE vertices first kind TRUE vertices second kind. graph_from_biadjacency_matrix() can operate two modes, depending multiple argument. FALSE single edge created every non-zero element bipartite adjacency matrix. multiple TRUE, matrix elements rounded closest non-negative integer get number edges create pair vertices. authors refer bipartite adjacency matrix \"bipartite incidence matrix\". igraph 1.6.0 later use naming avoid confusion edge-vertex incidence matrix.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/graph_from_biadjacency_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create graphs from a bipartite adjacency matrix — graph_from_biadjacency_matrix","text":"","code":"inc <- matrix(sample(0:1, 15, repl = TRUE), 3, 5) colnames(inc) <- letters[1:5] rownames(inc) <- LETTERS[1:3] graph_from_biadjacency_matrix(inc) #> IGRAPH 286a259 UN-B 8 4 -- #> + attr: type (v/l), name (v/c) #> + edges from 286a259 (vertex names): #> [1] A--c B--a C--c C--d"},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating igraph graphs from data frames or vice-versa — as_data_frame","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"function creates igraph graph one two data frames containing (symbolic) edge list edge/vertex attributes.","code":""},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"","code":"as_data_frame(x, what = c(\"edges\", \"vertices\", \"both\")) graph_from_data_frame(d, directed = TRUE, vertices = NULL) from_data_frame(...)"},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"x igraph object. Character constant, whether return info vertices, edges, . default ‘edges’. d data frame containing symbolic edge list first two columns. Additional columns considered edge attributes. Since version 0.7 argument coerced data frame .data.frame. directed Logical scalar, whether create directed graph. vertices data frame vertex metadata, NULL. See details . Since version 0.7 argument coerced data frame .data.frame, NULL. ... Passed graph_from_data_frame().","code":""},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"igraph graph object graph_from_data_frame(), either data frame list two data frames named edges vertices .data.frame.","code":""},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"graph_from_data_frame() creates igraph graphs one two data frames. two modes operation, depending whether vertices argument NULL . vertices NULL, first two columns d used symbolic edge list additional columns edge attributes. names attributes taken names columns. vertices NULL, must data frame giving vertex metadata. first column vertices assumed contain symbolic vertex names, added graphs ‘name’ vertex attribute. columns added additional vertex attributes. vertices NULL symbolic edge list given d checked contain vertex names listed vertices. Typically, data frames exported spreadsheet software like Excel imported R via read.table(), read.delim() read.csv(). edges data frame included graph, may include multiple parallel edges loops. as_data_frame() converts igraph graph one data frames, depending argument. argument edges (default), edges graph also edge attributes returned. edges first two columns, named . (also denotes edge direction directed graphs.) named graphs, vertex names included columns, graphs, numeric vertex ids. edge attributes columns. good idea edge attribute named , column named data frame unique. edges listed order numeric ids. argument vertices, vertex attributes returned. Vertices listed order numeric vertex ids. argument , vertex edge data returned, list named entries vertices edges.","code":""},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"graph_from_data_frame() NA elements first two columns ‘d’ replaced string “NA” creating graph. means NAs correspond single vertex. NA elements first column ‘vertices’ also replaced string “NA”, rest ‘vertices’ touched. words, vertex names (=first column) NA, vertex attributes can.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/graph_from_data_frame.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creating igraph graphs from data frames or vice-versa — as_data_frame","text":"","code":"## A simple example with a couple of actors ## The typical case is that these tables are read in from files.... actors <- data.frame( name = c( \"Alice\", \"Bob\", \"Cecil\", \"David\", \"Esmeralda\" ), age = c(48, 33, 45, 34, 21), gender = c(\"F\", \"M\", \"F\", \"M\", \"F\") ) relations <- data.frame( from = c( \"Bob\", \"Cecil\", \"Cecil\", \"David\", \"David\", \"Esmeralda\" ), to = c(\"Alice\", \"Bob\", \"Alice\", \"Alice\", \"Bob\", \"Alice\"), same.dept = c(FALSE, FALSE, TRUE, FALSE, FALSE, TRUE), friendship = c(4, 5, 5, 2, 1, 1), advice = c(4, 5, 5, 4, 2, 3) ) g <- graph_from_data_frame(relations, directed = TRUE, vertices = actors) print(g, e = TRUE, v = TRUE) #> IGRAPH cd3c177 DN-- 5 6 -- #> + attr: name (v/c), age (v/n), gender (v/c), same.dept (e/l), #> | friendship (e/n), advice (e/n) #> + edges from cd3c177 (vertex names): #> [1] Bob ->Alice Cecil ->Bob Cecil ->Alice David ->Alice #> [5] David ->Bob Esmeralda->Alice ## The opposite operation as_data_frame(g, what = \"vertices\") #> name age gender #> Alice Alice 48 F #> Bob Bob 33 M #> Cecil Cecil 45 F #> David David 34 M #> Esmeralda Esmeralda 21 F as_data_frame(g, what = \"edges\") #> from to same.dept friendship advice #> 1 Bob Alice FALSE 4 4 #> 2 Cecil Bob FALSE 5 5 #> 3 Cecil Alice TRUE 5 5 #> 4 David Alice FALSE 2 4 #> 5 David Bob FALSE 1 2 #> 6 Esmeralda Alice TRUE 1 3"},{"path":"https://r.igraph.org/reference/graph_from_edgelist.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a graph from an edge list matrix — graph_from_edgelist","title":"Create a graph from an edge list matrix — graph_from_edgelist","text":"graph_from_edgelist() creates graph edge list. argument two-column matrix, row defines one edge. numeric matrix elements interpreted vertex ids. character matrix interpreted symbolic vertex names vertex id assigned name, also name vertex attribute added.","code":""},{"path":"https://r.igraph.org/reference/graph_from_edgelist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a graph from an edge list matrix — graph_from_edgelist","text":"","code":"graph_from_edgelist(el, directed = TRUE) from_edgelist(...)"},{"path":"https://r.igraph.org/reference/graph_from_edgelist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a graph from an edge list matrix — graph_from_edgelist","text":"el edge list, two column matrix, character numeric. directed Whether create directed graph. ... Passed graph_from_edgelist().","code":""},{"path":"https://r.igraph.org/reference/graph_from_edgelist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a graph from an edge list matrix — graph_from_edgelist","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_edgelist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a graph from an edge list matrix — graph_from_edgelist","text":"","code":"el <- matrix(c(\"foo\", \"bar\", \"bar\", \"foobar\"), nc = 2, byrow = TRUE) graph_from_edgelist(el) #> IGRAPH 70e00c2 DN-- 3 2 -- #> + attr: name (v/c) #> + edges from 70e00c2 (vertex names): #> [1] foo->bar bar->foobar # Create a ring by hand graph_from_edgelist(cbind(1:10, c(2:10, 1))) #> IGRAPH 3f8ead2 D--- 10 10 -- #> + edges from 3f8ead2: #> [1] 1-> 2 2-> 3 3-> 4 4-> 5 5-> 6 6-> 7 7-> 8 8-> 9 9->10 10-> 1"},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":null,"dir":"Reference","previous_headings":"","what":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"function downloads graph database created evaluation graph isomorphism testing algothitms.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"","code":"graph_from_graphdb( url = NULL, prefix = \"iso\", type = \"r001\", nodes = NULL, pair = \"A\", which = 0, base = \"http://cneurocvs.rmki.kfki.hu/graphdb/gzip\", compressed = TRUE, directed = TRUE )"},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"url NULL complete URL file import. prefix Gives prefix. See details . Possible values: iso, i2, si4, si6, mcs10, mcs30, mcs50, mcs70, mcs90. type Gives graph type identifier. See details . Possible values: r001, r005, r01, r02, m2D, m2Dr2, m2Dr4, m2Dr6 m3D, m3Dr2, m3Dr4, m3Dr6, m4D, m4Dr2, m4Dr4, m4Dr6, b03, b03m, b06, b06m, b09, b09m. nodes number vertices graph. pair Specifies graph pair read. Possible values: B. Gives number graph read. every graph type number actual graphs database. argument specifies one read. base base address database. See details . compressed Logical constant, TRUE file expected compressed gzip. url NULL ‘.gz’ suffix added filename. directed Logical constant, whether create directed graph.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"graph_from_graphdb() reads graph graph database FTP HTTP server local copy. two modes operation: url argument specified complete path local remote graph database file. case simply call read_graph() proper arguments read file. url NULL, default, filename assembled base, prefix, type, nodes, pair arguments. Unfortunately original graph database homepage now defunct, see old version http://web.archive.org/web/20090215182331/http://amalfi.dis.unina./graph/db/doc/graphdbat.html actual format graph database file information.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"","code":"g <- graph_from_graphdb(prefix=\"iso\", type=\"r001\", nodes=20, pair=\"A\", which=10, compressed=TRUE) g2 <- graph_from_graphdb(prefix=\"iso\", type=\"r001\", nodes=20, pair=\"B\", which=10, compressed=TRUE) graph.isomorphic.vf2(g, g2)\t% should be TRUE g3 <- graph_from_graphdb(url=paste(sep=\"/\", \"http://cneurocvs.rmki.kfki.hu\", \"graphdb/gzip/iso/bvg/b06m\", \"iso_b06m_m200.A09.gz\"))"},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"M. De Santo, P. Foggia, C. Sansone, M. Vento: large database graphs use benchmarking graph isomorphism algorithms, Pattern Recognition Letters, Volume 24, Issue 8 (May 2003)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_graphdb.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Load a graph from the graph database for testing graph isomorphism. — graph_from_graphdb","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphnel.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","title":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","text":"graphNEL class defined graph package, another way represent graphs. graph_from_graphnel() takes graphNEL graph converts igraph graph. handles graph/vertex/edge attributes. graphNEL graph vertex attribute called ‘name’ used igraph vertex attribute ‘name’ graphNEL vertex names ignored.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphnel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","text":"","code":"graph_from_graphnel(graphNEL, name = TRUE, weight = TRUE, unlist.attrs = TRUE)"},{"path":"https://r.igraph.org/reference/graph_from_graphnel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","text":"graphNEL graphNEL graph. name Logical scalar, whether add graphNEL vertex names igraph vertex attribute called ‘name’. weight Logical scalar, whether add graphNEL edge weights igraph edge attribute called ‘weight’. (graphNEL graphs always weighted.) unlist.attrs Logical scalar. graphNEL attribute query functions return values attributes R lists, argument TRUE (default) converted atomic vectors, whenever possible, adding igraph graph.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphnel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","text":"graph_from_graphnel() returns igraph graph object.","code":""},{"path":"https://r.igraph.org/reference/graph_from_graphnel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","text":"graphNEL graphs poorly support multiple edges, edge attributes multiple edges lost: replaced attributes first multiple edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_graphnel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert graphNEL objects from the graph package to igraph — graph_from_graphnel","text":"","code":"if (FALSE) { # \\dontrun{ ## Undirected g <- make_ring(10) V(g)$name <- letters[1:10] GNEL <- as_graphnel(g) g2 <- graph_from_graphnel(GNEL) g2 ## Directed g3 <- make_star(10, mode = \"in\") V(g3)$name <- letters[1:10] GNEL2 <- as_graphnel(g3) g4 <- graph_from_graphnel(GNEL2) g4 } # }"},{"path":"https://r.igraph.org/reference/graph_from_incidence_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"From incidence matrix — graph_from_incidence_matrix","title":"From incidence matrix — graph_from_incidence_matrix","text":"graph_from_incidence_matrix() renamed graph_from_biadjacency_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graph_from_incidence_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"From incidence matrix — graph_from_incidence_matrix","text":"","code":"graph_from_incidence_matrix(...)"},{"path":"https://r.igraph.org/reference/graph_from_incidence_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"From incidence matrix — graph_from_incidence_matrix","text":"authors refer bipartite adjacency matrix \"bipartite incidence matrix\". igraph 1.6.0 later use naming avoid confusion edge-vertex incidence matrix.","code":""},{"path":"https://r.igraph.org/reference/graph_from_isomorphism_class.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a graph from an isomorphism class — graph_from_isomorphism_class","title":"Create a graph from an isomorphism class — graph_from_isomorphism_class","text":"isomorphism class non-negative integer number. Graphs (number vertices) isomorphism class isomorphic isomorphic graphs always isomorphism class. Currently can handle directed graphs 3 4 vertices undirected graphd 3 6 vertices.","code":""},{"path":"https://r.igraph.org/reference/graph_from_isomorphism_class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a graph from an isomorphism class — graph_from_isomorphism_class","text":"","code":"graph_from_isomorphism_class(size, number, directed = TRUE)"},{"path":"https://r.igraph.org/reference/graph_from_isomorphism_class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a graph from an isomorphism class — graph_from_isomorphism_class","text":"size number vertices graph. number isomorphism class. directed Whether create directed graph (default).","code":""},{"path":"https://r.igraph.org/reference/graph_from_isomorphism_class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a graph from an isomorphism class — graph_from_isomorphism_class","text":"igraph object, graph given size, directedness isomorphism class.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_lcf.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating a graph from LCF notation — graph_from_lcf","title":"Creating a graph from LCF notation — graph_from_lcf","text":"LCF short Lederberg-Coxeter-Frucht, concise notation 3-regular Hamiltonian graphs. constists three parameters, number vertices graph, list shifts giving additional edges cycle backbone another integer giving many times shifts performed. See http://mathworld.wolfram.com/LCFNotation.html details.","code":""},{"path":"https://r.igraph.org/reference/graph_from_lcf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating a graph from LCF notation — graph_from_lcf","text":"","code":"graph_from_lcf(n, shifts, repeats = 1)"},{"path":"https://r.igraph.org/reference/graph_from_lcf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating a graph from LCF notation — graph_from_lcf","text":"n Integer, number vertices graph. shifts Integer vector, shifts. repeats Integer constant, many times repeat shifts.","code":""},{"path":"https://r.igraph.org/reference/graph_from_lcf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creating a graph from LCF notation — graph_from_lcf","text":"graph object.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_lcf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Creating a graph from LCF notation — graph_from_lcf","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/graph_from_lcf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creating a graph from LCF notation — graph_from_lcf","text":"","code":"# This is the Franklin graph: g1 <- graph_from_lcf(12, c(5, -5), 6) g2 <- make_graph(\"Franklin\") isomorphic(g1, g2) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/graph_from_literal.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating (small) graphs via a simple interface — graph_from_literal","title":"Creating (small) graphs via a simple interface — graph_from_literal","text":"function useful want create small (named) graph quickly, works directed undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/graph_from_literal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating (small) graphs via a simple interface — graph_from_literal","text":"","code":"graph_from_literal(..., simplify = TRUE) from_literal(...)"},{"path":"https://r.igraph.org/reference/graph_from_literal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating (small) graphs via a simple interface — graph_from_literal","text":"... graph_from_literal() formulae giving structure graph, see details . from_literal() arguments passed graph_from_literal(). simplify Logical scalar, whether call simplify() created graph. default graph simplified, loop multiple edges removed.","code":""},{"path":"https://r.igraph.org/reference/graph_from_literal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creating (small) graphs via a simple interface — graph_from_literal","text":"igraph graph","code":""},{"path":"https://r.igraph.org/reference/graph_from_literal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creating (small) graphs via a simple interface — graph_from_literal","text":"graph_from_literal() handy creating small graphs quickly. need supply one R expressions giving structure graph. expressions consist vertex names edge operators. edge operator sequence ‘-’ ‘+’ characters, former edges latter used arrow heads. edges can arbitrarily long, .e. may use many ‘-’ characters “draw” like. edge operators consist ‘-’ characters graph undirected, whereas single ‘+’ character implies directed graph. Let us see simple examples. Without arguments function creates empty graph: simple undirected graph two vertices called ‘’ ‘B’ one edge : Remember length edges matter, written following, creates graph: many disconnected components graph, separate commas. can also give isolate vertices. ‘:’ operator can used define vertex sets. edge operator connects two vertex sets every vertex first set connected every vertex second set. following form creates full graph, including loop edges: directed graphs, edges created edge operator includes arrow head (‘+’) end edge: Thus third example edge created vertices B C. Mutual edges can also created simple edge operator: Note length edge operators arbitrary, ‘+’, ‘++’ ‘+-----+’ exactly meaning. vertex names include spaces special characters need quote : can include character vertex names way, even ‘+’ ‘-’ characters. See examples .","code":"graph_from_literal() graph_from_literal(A-B) graph_from_literal( A-----B ) graph_from_literal( A--B, C--D, E--F, G--H, I, J, K ) graph_from_literal( A:B:C:D -- A:B:C:D ) graph_from_literal( A -+ B -+ C ) graph_from_literal( A +- B -+ C ) graph_from_literal( A +- B -- C ) graph_from_literal( A +-+ B +---+ C ++ D + E) graph_from_literal( \"this is\" +- \"a silly\" -+ \"graph here\" )"},{"path":[]},{"path":"https://r.igraph.org/reference/graph_from_literal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creating (small) graphs via a simple interface — graph_from_literal","text":"","code":"# A simple undirected graph g <- graph_from_literal( Alice - Bob - Cecil - Alice, Daniel - Cecil - Eugene, Cecil - Gordon ) g #> IGRAPH 3daa4c5 UN-- 6 6 -- #> + attr: name (v/c) #> + edges from 3daa4c5 (vertex names): #> [1] Alice--Bob Alice--Cecil Bob --Cecil Cecil--Daniel Cecil--Eugene #> [6] Cecil--Gordon # Another undirected graph, \":\" notation g2 <- graph_from_literal(Alice - Bob:Cecil:Daniel, Cecil:Daniel - Eugene:Gordon) g2 #> IGRAPH c1042ec UN-- 6 7 -- #> + attr: name (v/c) #> + edges from c1042ec (vertex names): #> [1] Alice --Bob Alice --Cecil Alice --Daniel Cecil --Eugene Cecil --Gordon #> [6] Daniel--Eugene Daniel--Gordon # A directed graph g3 <- graph_from_literal( Alice +-+ Bob --+ Cecil +-- Daniel, Eugene --+ Gordon:Helen ) g3 #> IGRAPH 63c8fac DN-- 7 6 -- #> + attr: name (v/c) #> + edges from 63c8fac (vertex names): #> [1] Alice ->Bob Bob ->Alice Bob ->Cecil Daniel->Cecil Eugene->Gordon #> [6] Eugene->Helen # A graph with isolate vertices g4 <- graph_from_literal(Alice -- Bob -- Daniel, Cecil:Gordon, Helen) g4 #> IGRAPH 81edc4e UN-- 6 2 -- #> + attr: name (v/c) #> + edges from 81edc4e (vertex names): #> [1] Alice--Bob Bob --Daniel V(g4)$name #> [1] \"Alice\" \"Bob\" \"Daniel\" \"Cecil\" \"Gordon\" \"Helen\" # \"Arrows\" can be arbitrarily long g5 <- graph_from_literal(Alice +---------+ Bob) g5 #> IGRAPH 05b7021 DN-- 2 2 -- #> + attr: name (v/c) #> + edges from 05b7021 (vertex names): #> [1] Alice->Bob Bob ->Alice # Special vertex names g6 <- graph_from_literal(\"+\" -- \"-\", \"*\" -- \"/\", \"%%\" -- \"%/%\") g6 #> IGRAPH bf3c0f3 UN-- 6 3 -- #> + attr: name (v/c) #> + edges from bf3c0f3 (vertex names): #> [1] + --- * --/ %%--%/%"},{"path":"https://r.igraph.org/reference/graph_id.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the id of a graph — graph_id","title":"Get the id of a graph — graph_id","text":"Graph ids used check vertex edge sequence belongs graph. create new graph changing structure graph, new graph new id. Changing attributes change id.","code":""},{"path":"https://r.igraph.org/reference/graph_id.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the id of a graph — graph_id","text":"","code":"graph_id(x, ...)"},{"path":"https://r.igraph.org/reference/graph_id.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the id of a graph — graph_id","text":"x graph vertex sequence edge sequence. ... used currently.","code":""},{"path":"https://r.igraph.org/reference/graph_id.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the id of a graph — graph_id","text":"id graph, character scalar. vertex edge sequences id graph created .","code":""},{"path":"https://r.igraph.org/reference/graph_id.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the id of a graph — graph_id","text":"","code":"g <- make_ring(10) graph_id(g) #> [1] \"7917c02e-fa8b-4d6c-bcce-cf06f43169e1\" graph_id(V(g)) #> [1] \"7917c02e-fa8b-4d6c-bcce-cf06f43169e1\" graph_id(E(g)) #> [1] \"7917c02e-fa8b-4d6c-bcce-cf06f43169e1\" g2 <- g + 1 graph_id(g2) #> [1] \"14085e45-6537-4412-94f7-9bc3e3ba7bef\""},{"path":"https://r.igraph.org/reference/graph_version.html","id":null,"dir":"Reference","previous_headings":"","what":"igraph data structure versions — graph_version","title":"igraph data structure versions — graph_version","text":"igraph's internal data representation changes sometimes versions. means always possible use igraph objects created (possibly saved file) older igraph version.","code":""},{"path":"https://r.igraph.org/reference/graph_version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"igraph data structure versions — graph_version","text":"","code":"graph_version(graph)"},{"path":"https://r.igraph.org/reference/graph_version.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"igraph data structure versions — graph_version","text":"graph input graph. missing, version number current data format returned.","code":""},{"path":"https://r.igraph.org/reference/graph_version.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"igraph data structure versions — graph_version","text":"integer scalar.","code":""},{"path":"https://r.igraph.org/reference/graph_version.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"igraph data structure versions — graph_version","text":"graph_version() queries current data format, data format possibly older igraph graph. upgrade_graph() can convert older data format current one.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/graphlet_basis.html","id":null,"dir":"Reference","previous_headings":"","what":"Graphlet decomposition of a graph — graphlet_basis","title":"Graphlet decomposition of a graph — graphlet_basis","text":"Graphlet decomposition models weighted undirected graph via union potentially overlapping dense social groups. done two-step algorithm. first step candidate set groups (candidate basis) created finding cliques thresholded input graph. second step graph projected candidate basis, resulting weight coefficient clique candidate basis.","code":""},{"path":"https://r.igraph.org/reference/graphlet_basis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graphlet decomposition of a graph — graphlet_basis","text":"","code":"graphlet_basis(graph, weights = NULL) graphlet_proj( graph, weights = NULL, cliques, niter = 1000, Mu = rep(1, length(cliques)) ) graphlets(graph, weights = NULL, niter = 1000)"},{"path":"https://r.igraph.org/reference/graphlet_basis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graphlet decomposition of a graph — graphlet_basis","text":"graph input graph, edge directions ignored. simple graph (.e. graphs without self-loops multiple edges) supported. weights Edge weights. graph weight edge attribute argument NULL (default), weight edge attribute used. cliques list vertex ids, graphlet basis use projection. niter Integer scalar, number iterations perform. Mu Starting weights projection.","code":""},{"path":"https://r.igraph.org/reference/graphlet_basis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graphlet decomposition of a graph — graphlet_basis","text":"graphlets() returns list two members: cliques list subgraphs, candidate graphlet basis. subgraph give vector vertex ids. Mu weights subgraphs graphlet basis. graphlet_basis() returns list two elements: cliques list subgraphs, candidate graphlet basis. subgraph give vector vertex ids. thresholds weight thresholds used finding subgraphs. graphlet_proj() return numeric vector, weights graphlet basis subgraphs.","code":""},{"path":"https://r.igraph.org/reference/graphlet_basis.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graphlet decomposition of a graph — graphlet_basis","text":"igraph contains three functions performing graph decomponsition graph. first graphlets(), performed steps method returns list subgraphs, corresponding weights. second third functions correspond first second steps algorithm, useful user wishes perform individually: graphlet_basis() graphlet_proj().","code":""},{"path":"https://r.igraph.org/reference/graphlet_basis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graphlet decomposition of a graph — graphlet_basis","text":"","code":"## Create an example graph first D1 <- matrix(0, 5, 5) D2 <- matrix(0, 5, 5) D3 <- matrix(0, 5, 5) D1[1:3, 1:3] <- 2 D2[3:5, 3:5] <- 3 D3[2:5, 2:5] <- 1 g <- simplify(graph_from_adjacency_matrix(D1 + D2 + D3, mode = \"undirected\", weighted = TRUE )) V(g)$color <- \"white\" E(g)$label <- E(g)$weight E(g)$label.cex <- 2 E(g)$color <- \"black\" layout(matrix(1:6, nrow = 2, byrow = TRUE)) co <- layout_with_kk(g) par(mar = c(1, 1, 1, 1)) plot(g, layout = co) ## Calculate graphlets gl <- graphlets(g, niter = 1000) ## Plot graphlets for (i in 1:length(gl$cliques)) { sel <- gl$cliques[[i]] V(g)$color <- \"white\" V(g)[sel]$color <- \"#E495A5\" E(g)$width <- 1 E(g)[V(g)[sel] %--% V(g)[sel]]$width <- 2 E(g)$label <- \"\" E(g)[width == 2]$label <- round(gl$Mu[i], 2) E(g)$color <- \"black\" E(g)[width == 2]$color <- \"#E495A5\" plot(g, layout = co) }"},{"path":"https://r.igraph.org/reference/graphlets.candidate.basis.html","id":null,"dir":"Reference","previous_headings":"","what":"Graphlet decomposition of a graph — graphlets.candidate.basis","title":"Graphlet decomposition of a graph — graphlets.candidate.basis","text":"graphlets.candidate.basis() renamed graphlet_basis() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graphlets.candidate.basis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graphlet decomposition of a graph — graphlets.candidate.basis","text":"","code":"graphlets.candidate.basis(graph, weights = NULL)"},{"path":"https://r.igraph.org/reference/graphlets.candidate.basis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graphlet decomposition of a graph — graphlets.candidate.basis","text":"graph input graph, edge directions ignored. simple graph (.e. graphs without self-loops multiple edges) supported. weights Edge weights. graph weight edge attribute argument NULL (default), weight edge attribute used.","code":""},{"path":"https://r.igraph.org/reference/graphlets.project.html","id":null,"dir":"Reference","previous_headings":"","what":"Graphlet decomposition of a graph — graphlets.project","title":"Graphlet decomposition of a graph — graphlets.project","text":"graphlets.project() renamed graphlet_proj() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/graphlets.project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graphlet decomposition of a graph — graphlets.project","text":"","code":"graphlets.project( graph, weights = NULL, cliques, niter = 1000, Mu = rep(1, length(cliques)) )"},{"path":"https://r.igraph.org/reference/graphlets.project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graphlet decomposition of a graph — graphlets.project","text":"graph input graph, edge directions ignored. simple graph (.e. graphs without self-loops multiple edges) supported. weights Edge weights. graph weight edge attribute argument NULL (default), weight edge attribute used. cliques list vertex ids, graphlet basis use projection. niter Integer scalar, number iterations perform. Mu Starting weights projection.","code":""},{"path":"https://r.igraph.org/reference/greedy_vertex_coloring.html","id":null,"dir":"Reference","previous_headings":"","what":"Greedy vertex coloring — greedy_vertex_coloring","title":"Greedy vertex coloring — greedy_vertex_coloring","text":"greedy_vertex_coloring() finds coloring vertices graph based simple greedy algorithm.","code":""},{"path":"https://r.igraph.org/reference/greedy_vertex_coloring.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Greedy vertex coloring — greedy_vertex_coloring","text":"","code":"greedy_vertex_coloring(graph, heuristic = c(\"colored_neighbors\", \"dsatur\"))"},{"path":"https://r.igraph.org/reference/greedy_vertex_coloring.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Greedy vertex coloring — greedy_vertex_coloring","text":"graph graph object color. heuristic selection heuristic next vertex consider. Possible values : “colored_neighbors” selects vertex largest number already colored neighbors. “dsatur” selects vertex largest number unique colors neighborhood, .e. \"saturation degree\"; several maximum saturation degree vertices, one uncolored neighbors selected.","code":""},{"path":"https://r.igraph.org/reference/greedy_vertex_coloring.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Greedy vertex coloring — greedy_vertex_coloring","text":"numeric vector item contains color index associated vertex .","code":""},{"path":"https://r.igraph.org/reference/greedy_vertex_coloring.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Greedy vertex coloring — greedy_vertex_coloring","text":"goal vertex coloring assign \"color\" (represented positive integer) vertex graph neighboring vertices never color. function solves problem considering vertices one one according heuristic, always choosing smallest color differs already colored neighbors. coloring obtained way necessarily minimum can calculated linear time.","code":""},{"path":"https://r.igraph.org/reference/greedy_vertex_coloring.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Greedy vertex coloring — greedy_vertex_coloring","text":"","code":"g <- make_graph(\"petersen\") col <- greedy_vertex_coloring(g) plot(g, vertex.color = col)"},{"path":"https://r.igraph.org/reference/grg.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Geometric random graphs — grg.game","title":"Geometric random graphs — grg.game","text":"grg.game() renamed sample_grg() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/grg.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Geometric random graphs — grg.game","text":"","code":"grg.game(nodes, radius, torus = FALSE, coords = FALSE)"},{"path":"https://r.igraph.org/reference/grg.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Geometric random graphs — grg.game","text":"nodes number vertices graph. radius radius within vertices connected edge. torus Logical constant, whether use torus instead square. coords Logical scalar, whether add positions vertices vertex attributes called ‘x’ ‘y’.","code":""},{"path":"https://r.igraph.org/reference/groups.html","id":null,"dir":"Reference","previous_headings":"","what":"Groups of a vertex partitioning — groups","title":"Groups of a vertex partitioning — groups","text":"Create list vertex groups graph clustering community structure.","code":""},{"path":"https://r.igraph.org/reference/groups.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Groups of a vertex partitioning — groups","text":"","code":"groups(x)"},{"path":"https://r.igraph.org/reference/groups.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Groups of a vertex partitioning — groups","text":"x object represents grouping vertices. See details .","code":""},{"path":"https://r.igraph.org/reference/groups.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Groups of a vertex partitioning — groups","text":"named list numeric character vectors. names just numbers refer groups. vectors numeric symbolic vertex ids.","code":""},{"path":"https://r.igraph.org/reference/groups.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Groups of a vertex partitioning — groups","text":"Currently two methods defined function. default method works output components(). (fact works object list entry called membership.) second method works communities() objects.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/groups.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Groups of a vertex partitioning — groups","text":"","code":"g <- make_graph(\"Zachary\") fgc <- cluster_fast_greedy(g) groups(fgc) #> $`1` #> [1] 1 5 6 7 11 12 17 20 #> #> $`2` #> [1] 9 15 16 19 21 23 24 25 26 27 28 29 30 31 32 33 34 #> #> $`3` #> [1] 2 3 4 8 10 13 14 18 22 #> g2 <- make_ring(10) + make_full_graph(5) groups(components(g2)) #> $`1` #> [1] 1 2 3 4 5 6 7 8 9 10 #> #> $`2` #> [1] 11 12 13 14 15 #>"},{"path":"https://r.igraph.org/reference/growing.random.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Growing random graph generation — growing.random.game","title":"Growing random graph generation — growing.random.game","text":"growing.random.game() renamed sample_growing() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/growing.random.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Growing random graph generation — growing.random.game","text":"","code":"growing.random.game(n, m = 1, directed = TRUE, citation = FALSE)"},{"path":"https://r.igraph.org/reference/growing.random.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Growing random graph generation — growing.random.game","text":"n Numeric constant, number vertices graph. m Numeric constant, number edges added time step. directed Logical, whether create directed graph. citation Logical. TRUE citation graph created, .e. time step added edges originating new vertex.","code":""},{"path":"https://r.igraph.org/reference/gsize.html","id":null,"dir":"Reference","previous_headings":"","what":"The size of the graph (number of edges) — gsize","title":"The size of the graph (number of edges) — gsize","text":"ecount() gsize() aliases.","code":""},{"path":"https://r.igraph.org/reference/gsize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The size of the graph (number of edges) — gsize","text":"","code":"gsize(graph) ecount(graph)"},{"path":"https://r.igraph.org/reference/gsize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The size of the graph (number of edges) — gsize","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/gsize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The size of the graph (number of edges) — gsize","text":"Numeric scalar, number edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/gsize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The size of the graph (number of edges) — gsize","text":"","code":"g <- sample_gnp(100, 2 / 100) gsize(g) #> [1] 101 ecount(g) #> [1] 101 # Number of edges in a G(n,p) graph replicate(100, sample_gnp(10, 1 / 2), simplify = FALSE) %>% vapply(gsize, 0) %>% hist()"},{"path":"https://r.igraph.org/reference/handle_vertex_type_arg.html","id":null,"dir":"Reference","previous_headings":"","what":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","title":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","text":"function takes types graph arguments public igraph function call validates vertex type vector.","code":""},{"path":"https://r.igraph.org/reference/handle_vertex_type_arg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","text":"","code":"handle_vertex_type_arg(types, graph, required = T)"},{"path":"https://r.igraph.org/reference/handle_vertex_type_arg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","text":"types vertex types graph graph required whether graph bipartite","code":""},{"path":"https://r.igraph.org/reference/handle_vertex_type_arg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","text":"logical vector representing resolved vertex type vertex graph","code":""},{"path":"https://r.igraph.org/reference/handle_vertex_type_arg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","text":"provided vertex types NULL graph types vertex attribute, value vertex attribute used vertex types. Non-logical vertex type vectors coerced logical vectors printing warning.","code":""},{"path":"https://r.igraph.org/reference/handle_vertex_type_arg.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Common handler for vertex type arguments in igraph functions — handle_vertex_type_arg","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Harmonic centrality of vertices — harmonic_centrality","title":"Harmonic centrality of vertices — harmonic_centrality","text":"harmonic centrality vertex mean inverse distance vertices. inverse distance unreachable vertex considered zero.","code":""},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Harmonic centrality of vertices — harmonic_centrality","text":"","code":"harmonic_centrality( graph, vids = V(graph), mode = c(\"out\", \"in\", \"all\", \"total\"), weights = NULL, normalized = FALSE, cutoff = -1 )"},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Harmonic centrality of vertices — harmonic_centrality","text":"graph graph analyze. vids vertices harmonic centrality calculated. mode Character string, defining types paths used measuring distance directed graphs. “” follows paths along edge directions , “” traverses edges reverse, “” ignores edge directions. argument ignored undirected graphs. weights Optional positive weight vector calculating weighted harmonic centrality. graph weight edge attribute, used default. Weights used calculating weighted shortest paths, interpreted distances. normalized Logical scalar, whether calculate normalized harmonic centrality. true, result mean inverse path length vertices, .e. normalized number vertices minus one. false, result sum inverse path lengths vertices. cutoff maximum path length consider calculating harmonic centrality. limit cutoff negative. Note zero cutoff means paths length 0 considered.","code":""},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Harmonic centrality of vertices — harmonic_centrality","text":"Numeric vector harmonic centrality scores vertices v.","code":""},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Harmonic centrality of vertices — harmonic_centrality","text":"cutoff argument can used restrict calculation paths length cutoff smaller ; can used larger graphs speed calculation. cutoff negative (default), function calculates exact harmonic centrality scores.","code":""},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Harmonic centrality of vertices — harmonic_centrality","text":"M. Marchiori V. Latora, Harmony small-world, Physica 285, pp. 539-546 (2000).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/harmonic_centrality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Harmonic centrality of vertices — harmonic_centrality","text":"","code":"g <- make_ring(10) g2 <- make_star(10) harmonic_centrality(g) #> [1] 4.366667 4.366667 4.366667 4.366667 4.366667 4.366667 4.366667 4.366667 #> [9] 4.366667 4.366667 harmonic_centrality(g2, mode = \"in\") #> [1] 9 0 0 0 0 0 0 0 0 0 harmonic_centrality(g2, mode = \"out\") #> [1] 0 1 1 1 1 1 1 1 1 1 harmonic_centrality(g %du% make_full_graph(5), mode = \"all\") #> [1] 4.366667 4.366667 4.366667 4.366667 4.366667 4.366667 4.366667 4.366667 #> [9] 4.366667 4.366667 4.000000 4.000000 4.000000 4.000000 4.000000"},{"path":"https://r.igraph.org/reference/has.multiple.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the multiple or loop edges in a graph — has.multiple","title":"Find the multiple or loop edges in a graph — has.multiple","text":".multiple() renamed any_multiple() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/has.multiple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the multiple or loop edges in a graph — has.multiple","text":"","code":"has.multiple(graph)"},{"path":"https://r.igraph.org/reference/has.multiple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the multiple or loop edges in a graph — has.multiple","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/has_eulerian_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Eulerian paths or cycles in a graph — has_eulerian_path","title":"Find Eulerian paths or cycles in a graph — has_eulerian_path","text":"has_eulerian_path() has_eulerian_cycle() checks whether Eulerian path cycle input graph. eulerian_path() eulerian_cycle() return path cycle exists, throws error otherwise.","code":""},{"path":"https://r.igraph.org/reference/has_eulerian_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Eulerian paths or cycles in a graph — has_eulerian_path","text":"","code":"has_eulerian_path(graph) has_eulerian_cycle(graph) eulerian_path(graph) eulerian_cycle(graph)"},{"path":"https://r.igraph.org/reference/has_eulerian_path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Eulerian paths or cycles in a graph — has_eulerian_path","text":"graph igraph graph object","code":""},{"path":"https://r.igraph.org/reference/has_eulerian_path.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find Eulerian paths or cycles in a graph — has_eulerian_path","text":"has_eulerian_path() has_eulerian_cycle(), logical value indicates whether graph contains Eulerian path cycle. eulerian_path() eulerian_cycle(), named list two entries: epath vector containing edge ids along Eulerian path cycle. vpath vector containing vertex ids along Eulerian path cycle.","code":""},{"path":"https://r.igraph.org/reference/has_eulerian_path.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find Eulerian paths or cycles in a graph — has_eulerian_path","text":"has_eulerian_path() decides whether input graph Eulerian path, .e. path passes every edge graph exactly , returns logical value result. eulerian_path() returns possible Eulerian path, described edge vertex sequence, throws error path exists. has_eulerian_cycle() decides whether input graph Eulerian cycle, .e. path passes every edge graph exactly returns starting point, returns logical value result. eulerian_cycle() returns possible Eulerian cycle, described edge vertex sequence, throws error cycle exists.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/has_eulerian_path.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find Eulerian paths or cycles in a graph — has_eulerian_path","text":"","code":"g <- make_graph(~ A - B - C - D - E - A - F - D - B - F - E) has_eulerian_path(g) #> [1] TRUE eulerian_path(g) #> $epath #> + 10/10 edges from 71db398 (vertex names): #> [1] A--B B--C C--D B--D B--F A--F A--E D--E D--F E--F #> #> $vpath #> + 11/6 vertices, named, from 71db398: #> [1] A B C D B F A E D F E #> has_eulerian_cycle(g) #> [1] FALSE try(eulerian_cycle(g)) #> Error in eulerian_cycle(g) : #> At vendor/cigraph/src/paths/eulerian.c:613 : The graph does not have an Eulerian cycle. Input problem has no solution"},{"path":"https://r.igraph.org/reference/head_of.html","id":null,"dir":"Reference","previous_headings":"","what":"Head of the edge(s) in a graph — head_of","title":"Head of the edge(s) in a graph — head_of","text":"undirected graphs, head tail defined. case head_of() returns vertices incident supplied edges, tail_of() returns end(s) edge(s).","code":""},{"path":"https://r.igraph.org/reference/head_of.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Head of the edge(s) in a graph — head_of","text":"","code":"head_of(graph, es)"},{"path":"https://r.igraph.org/reference/head_of.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Head of the edge(s) in a graph — head_of","text":"graph input graph. es edges query.","code":""},{"path":"https://r.igraph.org/reference/head_of.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Head of the edge(s) in a graph — head_of","text":"vertex sequence head(s) edge(s).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/head_print.html","id":null,"dir":"Reference","previous_headings":"","what":"Print the only the head of an R object — head_print","title":"Print the only the head of an R object — head_print","text":"Print head R object","code":""},{"path":"https://r.igraph.org/reference/head_print.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print the only the head of an R object — head_print","text":"","code":"head_print( x, max_lines = 20, header = \"\", footer = \"\", omitted_footer = \"\", ... )"},{"path":"https://r.igraph.org/reference/head_print.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print the only the head of an R object — head_print","text":"x object print, callback function. See printer_callback() details. max_lines Maximum number lines print, including header footer. header header, function, called, otherwise printed using cat. footer footer, function, called, otherwise printed using cat. omitted_footer Footer printed anything omitted printout. function, called, otherwise printed using cat. ... Extra arguments pass print().","code":""},{"path":"https://r.igraph.org/reference/head_print.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print the only the head of an R object — head_print","text":"x, invisibly.","code":""},{"path":"https://r.igraph.org/reference/hrg-methods.html","id":null,"dir":"Reference","previous_headings":"","what":"Hierarchical random graphs — hrg-methods","title":"Hierarchical random graphs — hrg-methods","text":"Fitting sampling hierarchical random graph models.","code":""},{"path":"https://r.igraph.org/reference/hrg-methods.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Hierarchical random graphs — hrg-methods","text":"hierarchical random graph ensemble undirected graphs \\(n\\) vertices. defined via binary tree \\(n\\) leaf \\(n-1\\) internal vertices, internal vertices labeled probabilities. probability two vertices connected random graph given probability label closest common ancestor. Please see references hierarchical random graphs. igraph contains functions fitting HRG models given network (fit_hrg(), generating networks given HRG ensemble (sample_hrg()), converting igraph graph HRG back (hrg(), hrg_tree()), calculating consensus tree set sampled HRGs (consensus_tree()) predicting missing edges network based HRG models (predict_edges()). igraph HRG implementation heavily based code published Aaron Clauset, website (functional ).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/hrg.consensus.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a consensus tree from several hierarchical random graph models — hrg.consensus","title":"Create a consensus tree from several hierarchical random graph models — hrg.consensus","text":"hrg.consensus() renamed consensus_tree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hrg.consensus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a consensus tree from several hierarchical random graph models — hrg.consensus","text":"","code":"hrg.consensus(graph, hrg = NULL, start = FALSE, num.samples = 10000)"},{"path":"https://r.igraph.org/reference/hrg.consensus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a consensus tree from several hierarchical random graph models — hrg.consensus","text":"graph graph models fitted . hrg hierarchical random graph model, form igraphHRG object. consensus_tree() allows NULL well, HRG fitted graph first, random starting point. start Logical, whether start fitting/sampling supplied igraphHRG object, random starting point. num.samples Number samples use consensus generation missing edge prediction.","code":""},{"path":"https://r.igraph.org/reference/hrg.create.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a hierarchical random graph from an igraph graph — hrg.create","title":"Create a hierarchical random graph from an igraph graph — hrg.create","text":"hrg.create() renamed hrg() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hrg.create.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a hierarchical random graph from an igraph graph — hrg.create","text":"","code":"hrg.create(graph, prob)"},{"path":"https://r.igraph.org/reference/hrg.create.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a hierarchical random graph from an igraph graph — hrg.create","text":"graph igraph graph create HRG . prob vector probabilities, one vertex, order vertex ids.","code":""},{"path":"https://r.igraph.org/reference/hrg.dendrogram.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an igraph graph from a hierarchical random graph model — hrg.dendrogram","title":"Create an igraph graph from a hierarchical random graph model — hrg.dendrogram","text":"hrg.dendrogram() renamed hrg_tree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hrg.dendrogram.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an igraph graph from a hierarchical random graph model — hrg.dendrogram","text":"","code":"hrg.dendrogram(hrg)"},{"path":"https://r.igraph.org/reference/hrg.dendrogram.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an igraph graph from a hierarchical random graph model — hrg.dendrogram","text":"hrg hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/hrg.fit.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit a hierarchical random graph model — hrg.fit","title":"Fit a hierarchical random graph model — hrg.fit","text":"hrg.fit() renamed fit_hrg() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hrg.fit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit a hierarchical random graph model — hrg.fit","text":"","code":"hrg.fit(graph, hrg = NULL, start = FALSE, steps = 0)"},{"path":"https://r.igraph.org/reference/hrg.fit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit a hierarchical random graph model — hrg.fit","text":"graph graph fit model . Edge directions ignored directed graphs. hrg hierarchical random graph model, form igraphHRG object. fit_hrg() allows NULL, case random starting point used fitting. start Logical, whether start fitting/sampling supplied igraphHRG object, random starting point. steps number MCMC steps make. zero, MCMC procedure performed convergence.","code":""},{"path":"https://r.igraph.org/reference/hrg.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample from a hierarchical random graph model — hrg.game","title":"Sample from a hierarchical random graph model — hrg.game","text":"hrg.game() renamed sample_hrg() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hrg.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample from a hierarchical random graph model — hrg.game","text":"","code":"hrg.game(hrg)"},{"path":"https://r.igraph.org/reference/hrg.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample from a hierarchical random graph model — hrg.game","text":"hrg hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/hrg.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a hierarchical random graph from an igraph graph — hrg","title":"Create a hierarchical random graph from an igraph graph — hrg","text":"hrg() creates HRG igraph graph. igraph graph must directed binary tree, \\(n-1\\) internal \\(n\\) leaf vertices. prob argument contains HRG probability labels vertex; ignored leaf vertices.","code":""},{"path":"https://r.igraph.org/reference/hrg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a hierarchical random graph from an igraph graph — hrg","text":"","code":"hrg(graph, prob)"},{"path":"https://r.igraph.org/reference/hrg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a hierarchical random graph from an igraph graph — hrg","text":"graph igraph graph create HRG . prob vector probabilities, one vertex, order vertex ids.","code":""},{"path":"https://r.igraph.org/reference/hrg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a hierarchical random graph from an igraph graph — hrg","text":"hrg() returns igraphHRG object.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/hrg.predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Predict edges based on a hierarchical random graph model — hrg.predict","title":"Predict edges based on a hierarchical random graph model — hrg.predict","text":"hrg.predict() renamed predict_edges() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hrg.predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Predict edges based on a hierarchical random graph model — hrg.predict","text":"","code":"hrg.predict( graph, hrg = NULL, start = FALSE, num.samples = 10000, num.bins = 25 )"},{"path":"https://r.igraph.org/reference/hrg.predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Predict edges based on a hierarchical random graph model — hrg.predict","text":"graph graph fit model . Edge directions ignored directed graphs. hrg hierarchical random graph model, form igraphHRG object. predict_edges() allow NULL well, HRG fitted graph first, random starting point. start Logical, whether start fitting/sampling supplied igraphHRG object, random starting point. num.samples Number samples use consensus generation missing edge prediction. num.bins Number bins edge probabilities. Give higher number accurate prediction.","code":""},{"path":"https://r.igraph.org/reference/hrg_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an igraph graph from a hierarchical random graph model — hrg_tree","title":"Create an igraph graph from a hierarchical random graph model — hrg_tree","text":"hrg_tree() creates corresponsing igraph tree hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/hrg_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an igraph graph from a hierarchical random graph model — hrg_tree","text":"","code":"hrg_tree(hrg)"},{"path":"https://r.igraph.org/reference/hrg_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an igraph graph from a hierarchical random graph model — hrg_tree","text":"hrg hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/hrg_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an igraph graph from a hierarchical random graph model — hrg_tree","text":"igraph graph vertex attribute called \"probability\".","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/hub.score.html","id":null,"dir":"Reference","previous_headings":"","what":"Kleinberg's hub and authority centrality scores. — hub.score","title":"Kleinberg's hub and authority centrality scores. — hub.score","text":"hub.score() renamed hub_score() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/hub.score.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kleinberg's hub and authority centrality scores. — hub.score","text":"","code":"hub.score(graph, scale = TRUE, weights = NULL, options = arpack_defaults())"},{"path":"https://r.igraph.org/reference/hub.score.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kleinberg's hub and authority centrality scores. — hub.score","text":"graph input graph. scale Logical scalar, whether scale result maximum score one. scaling used result vector unit length Euclidean norm. weights Optional positive weight vector calculating weighted scores. graph weight edge attribute, used default. function interprets edge weights connection strengths. random surfer model, edge larger weight likely selected surfer. options named list, override ARPACK options. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/hub_score.html","id":null,"dir":"Reference","previous_headings":"","what":"Kleinberg's hub and authority centrality scores. — hub_score","title":"Kleinberg's hub and authority centrality scores. — hub_score","text":"hub scores vertices defined principal eigenvector \\(^T\\), \\(\\) adjacency matrix graph.","code":""},{"path":"https://r.igraph.org/reference/hub_score.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kleinberg's hub and authority centrality scores. — hub_score","text":"","code":"hub_score(graph, scale = TRUE, weights = NULL, options = arpack_defaults()) authority_score( graph, scale = TRUE, weights = NULL, options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/hub_score.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kleinberg's hub and authority centrality scores. — hub_score","text":"graph input graph. scale Logical scalar, whether scale result maximum score one. scaling used result vector unit length Euclidean norm. weights Optional positive weight vector calculating weighted scores. graph weight edge attribute, used default. function interprets edge weights connection strengths. random surfer model, edge larger weight likely selected surfer. options named list, override ARPACK options. See arpack() details.","code":""},{"path":"https://r.igraph.org/reference/hub_score.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Kleinberg's hub and authority centrality scores. — hub_score","text":"named list members: vector hub authority scores vertices. value corresponding eigenvalue calculated principal eigenvector. options information ARPACK computation, members options member returned arpack(), see documentation.","code":""},{"path":"https://r.igraph.org/reference/hub_score.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Kleinberg's hub and authority centrality scores. — hub_score","text":"Similarly, authority scores vertices defined principal eigenvector \\(^T \\), \\(\\) adjacency matrix graph. undirected matrices adjacency matrix symmetric hub scores authority scores.","code":""},{"path":"https://r.igraph.org/reference/hub_score.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kleinberg's hub and authority centrality scores. — hub_score","text":"J. Kleinberg. Authoritative sources hyperlinked environment. Proc. 9th ACM-SIAM Symposium Discrete Algorithms, 1998. Extended version Journal ACM 46(1999). Also appears IBM Research Report RJ 10076, May 1997.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/hub_score.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kleinberg's hub and authority centrality scores. — hub_score","text":"","code":"## An in-star g <- make_star(10) hub_score(g)$vector #> [1] 3.330669e-16 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 #> [6] 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 authority_score(g)$vector #> [1] 1 0 0 0 0 0 0 0 0 0 ## A ring g2 <- make_ring(10) hub_score(g2)$vector #> [1] 1 1 1 1 1 1 1 1 1 1 authority_score(g2)$vector #> [1] 1 1 1 1 1 1 1 1 1 1"},{"path":"https://r.igraph.org/reference/identical_graphs.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide if two graphs are identical — identical_graphs","title":"Decide if two graphs are identical — identical_graphs","text":"Two graphs considered identical function represented exactly way internal R representation. means two graphs must list vertices edges, exactly order, directedness, two graphs must also identical graph, vertex edge attributes.","code":""},{"path":"https://r.igraph.org/reference/identical_graphs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide if two graphs are identical — identical_graphs","text":"","code":"identical_graphs(g1, g2, attrs = TRUE)"},{"path":"https://r.igraph.org/reference/identical_graphs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide if two graphs are identical — identical_graphs","text":"g1, g2 two graphs attrs Whether compare attributes graphs","code":""},{"path":"https://r.igraph.org/reference/identical_graphs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decide if two graphs are identical — identical_graphs","text":"Logical scalar","code":""},{"path":"https://r.igraph.org/reference/identical_graphs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Decide if two graphs are identical — identical_graphs","text":"similar identical base package, ignores mutable piece igraph objects; might different even two graphs identical. Attribute comparison can turned attrs parameter attributes two graphs allowed different.","code":""},{"path":"https://r.igraph.org/reference/igraph-attribute-combination.html","id":null,"dir":"Reference","previous_headings":"","what":"How igraph functions handle attributes when the graph changes — igraph-attribute-combination","title":"How igraph functions handle attributes when the graph changes — igraph-attribute-combination","text":"Many times, structure graph modified, vertices/edges map original graph map vertices/edges newly created (modified) graph. example simplify() maps multiple edges single edges. igraph provides flexible mechanism specify vertex/edge attributes cases.","code":""},{"path":"https://r.igraph.org/reference/igraph-attribute-combination.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"How igraph functions handle attributes when the graph changes — igraph-attribute-combination","text":"functions support combination attributes one two extra arguments called vertex.attr.comb /edge.attr.comb specify perform mapping attributes. E.g. contract() contracts many vertices single one, attributes vertices can combined stores vertex attributes new graph. specification combination (vertex edge) attributes can given character scalar, function object list character scalars /function objects. character scalar, refers one predefined combinations, see list . function, given function expected perform combination. called new vertex/edge graph, single argument: attribute values vertices map single vertex. third option, list can used specify different combination methods different attributes. named entry list corresponds attribute name. unnamed entry (.e. name empty string) list specifies default combination method. .e. specifies weight new edge sum weights corresponding edges old graph; rest attributes ignored (=dropped).","code":"list(weight=\"sum\", \"ignore\")"},{"path":"https://r.igraph.org/reference/igraph-attribute-combination.html","id":"predefined-combination-functions","dir":"Reference","previous_headings":"","what":"Predefined combination functions","title":"How igraph functions handle attributes when the graph changes — igraph-attribute-combination","text":"following combination behaviors predefined: \"ignore\" attribute ignored dropped. \"sum\" sum attributes calculated. work character attributes works complex attributes sum generic defined. (E.g. works sparse matrices Matrix package, sum method.) \"prod\" product attributes calculated. work character attributes works complex attributes prod function defined. \"min\" minimum attributes calculated returned. character complex attributes standard R min function used. \"max\" maximum attributes calculated returned. character complex attributes standard R max function used. \"random\" Chooses one supplied attribute values, uniformly randomly. character complex attributes implemented calling sample. \"first\" Always chooses first attribute value. implemented calling head function. \"last\" Always chooses last attribute value. implemented calling tail function. \"mean\" mean attributes calculated returned. character complex attributes simply calls mean function. \"median\" median attributes selected. Calls R median function attribute types. \"concat\" Concatenate attributes, using c function. results almost always complex attribute.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-attribute-combination.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"How igraph functions handle attributes when the graph changes — igraph-attribute-combination","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/igraph-attribute-combination.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"How igraph functions handle attributes when the graph changes — igraph-attribute-combination","text":"","code":"g <- make_graph(c(1, 2, 1, 2, 1, 2, 2, 3, 3, 4)) E(g)$weight <- 1:5 ## print attribute values with the graph igraph_options(print.graph.attributes = TRUE) igraph_options(print.vertex.attributes = TRUE) igraph_options(print.edge.attributes = TRUE) ## new attribute is the sum of the old ones simplify(g, edge.attr.comb = \"sum\") #> IGRAPH 7f72813 D-W- 4 3 -- #> + attr: weight (e/n) #> + edges from 7f72813: #> [1] 1->2 2->3 3->4 ## collect attributes into a string simplify(g, edge.attr.comb = toString) #> IGRAPH 24e0dc9 D-W- 4 3 -- #> + attr: weight (e/c) #> + edges from 24e0dc9: #> [1] 1->2 2->3 3->4 ## concatenate them into a vector, this creates a complex ## attribute simplify(g, edge.attr.comb = \"concat\") #> IGRAPH f6784a8 D-W- 4 3 -- #> + attr: weight (e/x) #> + edges from f6784a8: #> [1] 1->2 2->3 3->4 E(g)$name <- letters[seq_len(ecount(g))] ## both attributes are collected into strings simplify(g, edge.attr.comb = toString) #> IGRAPH f9ec4b6 D-W- 4 3 -- #> + attr: weight (e/c), name (e/c) #> + edges from f9ec4b6: #> [1] 1->2 2->3 3->4 ## harmonic average of weights, names are dropped simplify(g, edge.attr.comb = list( weight = function(x) length(x) / sum(1 / x), name = \"ignore\" )) #> IGRAPH e52d60c D-W- 4 3 -- #> + attr: weight (e/n) #> + edges from e52d60c: #> [1] 1->2 2->3 3->4"},{"path":"https://r.igraph.org/reference/igraph-dollar.html","id":null,"dir":"Reference","previous_headings":"","what":"Getting and setting graph attributes, shortcut — igraph-dollar","title":"Getting and setting graph attributes, shortcut — igraph-dollar","text":"$ operator shortcut get set graph attributes. shorter just readable graph_attr() set_graph_attr().","code":""},{"path":"https://r.igraph.org/reference/igraph-dollar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Getting and setting graph attributes, shortcut — igraph-dollar","text":"","code":"# S3 method for class 'igraph' x$name # S3 method for class 'igraph' x$name <- value"},{"path":"https://r.igraph.org/reference/igraph-dollar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Getting and setting graph attributes, shortcut — igraph-dollar","text":"x igraph graph name Name attribute get/set. value New value graph attribute.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-dollar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Getting and setting graph attributes, shortcut — igraph-dollar","text":"","code":"g <- make_ring(10) g$name #> [1] \"Ring graph\" g$name <- \"10-ring\" g$name #> [1] \"10-ring\""},{"path":"https://r.igraph.org/reference/igraph-es-attributes.html","id":null,"dir":"Reference","previous_headings":"","what":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","title":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","text":"$ operator syntactic sugar query set edge attributes, edges edge sequence.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-attributes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","text":"","code":"# S3 method for class 'igraph.es' x[[i]] <- value # S3 method for class 'igraph.es' x[i] <- value # S3 method for class 'igraph.es' x$name # S3 method for class 'igraph.es' x$name <- value E(x, path = NULL, P = NULL, directed = NULL) <- value"},{"path":"https://r.igraph.org/reference/igraph-es-attributes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","text":"x edge sequence. E<- graph. Index. value New value attribute, edges edge sequence. name Name edge attribute query set. path Select edges along path, given vertex sequence See E(). P Select edges via pairs vertices. See E(). directed Whether use edge directions path P arguments.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-attributes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","text":"vector list, containing values attribute name edges sequence. numeric, character logical attributes, vector appropriate type, otherwise list.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-attributes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","text":"query form $ shortcut edge_attr(), e.g. E(g)[idx]$attr equivalent edge_attr(g, attr, E(g)[idx]). assignment form $ shortcut set_edge_attr(), e.g. E(g)[idx]$attr <- value equivalent g <- set_edge_attr(g, attr, E(g)[idx], value).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-es-attributes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query or set attributes of the edges in an edge sequence — igraph-es-attributes","text":"","code":"# color edges of the largest component largest_comp <- function(graph) { cl <- components(graph) V(graph)[which.max(cl$csize) == cl$membership] } g <- sample_( gnp(100, 1 / 100), with_vertex_(size = 3, label = \"\"), with_graph_(layout = layout_with_fr) ) giant_v <- largest_comp(g) E(g)$color <- \"orange\" E(g)[giant_v %--% giant_v]$color <- \"blue\" plot(g)"},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":null,"dir":"Reference","previous_headings":"","what":"Indexing edge sequences — igraph-es-indexing","title":"Indexing edge sequences — igraph-es-indexing","text":"Edge sequences can indexed much like plain numeric R vector, extras.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indexing edge sequences — igraph-es-indexing","text":"","code":"# S3 method for class 'igraph.es' x[...]"},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indexing edge sequences — igraph-es-indexing","text":"x edge sequence ... Indices, see details .","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indexing edge sequences — igraph-es-indexing","text":"Another edge sequence, referring graph.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"multiple-indices","dir":"Reference","previous_headings":"","what":"Multiple indices","title":"Indexing edge sequences — igraph-es-indexing","text":"using multiple indices within bracket, evaluated independently, results concatenated using c() function. E.g. E(g)[1, 2, .inc(1)] equivalent c(E(g)[1], E(g)[2], E(g)[.inc(1)]).","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"index-types","dir":"Reference","previous_headings":"","what":"Index types","title":"Indexing edge sequences — igraph-es-indexing","text":"Edge sequences can indexed positive numeric vectors, negative numeric vectors, logical vectors, character vectors: indexed positive numeric vectors, edges given positions sequence selected. indexing regular R atomic vector positive numeric vectors. indexed negative numeric vectors, edges given positions sequence omitted. , indexing regular R atomic vector. indexed logical vector, lengths edge sequence index must match, edges index TRUE selected. Named graphs can indexed character vectors, select edges given names. Note graph may edge names vertex names, can used select edges. Edge names simply used names numeric edge id vector. Vertex names effectively work graphs without multiple edges, must separated | bar character select edges incident two given vertices. See examples .","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"edge-attributes","dir":"Reference","previous_headings":"","what":"Edge attributes","title":"Indexing edge sequences — igraph-es-indexing","text":"indexing edge sequences, edge attributes can referred simply using names. E.g. graph weight edge attribute, E(G)[weight > 1] selects edges weight larger one. See examples . Note attribute names mask names variables present calling environment; need look variable want similarly named edge attribute mask , use .env pronoun perform name lookup calling environment. words, use E(g)[.env$weight > 1] make sure weight looked calling environment even edge attribute name. Similarly, can use .data match attribute names .","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"special-functions","dir":"Reference","previous_headings":"","what":"Special functions","title":"Indexing edge sequences — igraph-es-indexing","text":"special igraph functions can used expressions indexing edge sequences: .inc takes vertex sequence, selects edges least one incident vertex vertex sequence. .similar .inc(), tails edges considered. .similar .inc(), heads edges considered. \\%--\\% special operator can used select edges two sets vertices. ignores edge directions directed graphs. \\%->\\% similar \\%--\\%, edges left hand side argument, pointing right hand side argument, selected, directed graphs. \\%<-\\% similar \\%--\\%, edges left hand side argument, pointing right hand side argument, selected, directed graphs. Note multiple special functions can used together, regular indices, results concatenated. See examples .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-es-indexing.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Indexing edge sequences — igraph-es-indexing","text":"","code":"# ----------------------------------------------------------------- # Special operators for indexing based on graph structure g <- sample_pa(100, power = 0.3) E(g)[1:3 %--% 2:6] #> + 5/99 edges from 6396fd3: #> [1] 2->1 3->1 4->1 5->3 6->2 E(g)[1:5 %->% 1:6] #> + 4/99 edges from 6396fd3: #> [1] 2->1 3->1 4->1 5->3 E(g)[1:3 %<-% 2:6] #> + 5/99 edges from 6396fd3: #> [1] 2->1 3->1 4->1 5->3 6->2 # ----------------------------------------------------------------- # The edges along the diameter g <- sample_pa(100, directed = FALSE) d <- get_diameter(g) E(g, path = d) #> + 14/99 edges from a4d6977: #> [1] 57--81 56--57 24--56 18--24 17--18 3--17 2-- 3 2-- 5 5-- 7 7--39 #> [11] 39--40 40--48 48--83 83--95 # ----------------------------------------------------------------- # Select edges based on attributes g <- sample_gnp(20, 3 / 20) %>% set_edge_attr(\"weight\", value = rnorm(gsize(.))) E(g)[[weight < 0]] #> + 9/23 edges from dae998a: #> tail head tid hid weight #> 1 4 5 4 5 -0.69555968 #> 2 1 6 1 6 -0.05221438 #> 4 5 8 5 8 -0.66444655 #> 5 6 9 6 9 -1.62738997 #> 6 1 11 1 11 -0.30731860 #> 11 10 14 10 14 -1.34388226 #> 15 12 17 12 17 -1.05330430 #> 16 15 18 15 18 -0.58750280 #> 20 18 19 18 19 -0.28938345 # Indexing with a variable whose name matches the name of an attribute # may fail; use .env to force the name lookup in the parent environment E(g)$x <- E(g)$weight x <- 2 E(g)[.env$x] #> + 1/23 edge from dae998a: #> [1] 1--6"},{"path":"https://r.igraph.org/reference/igraph-es-indexing2.html","id":null,"dir":"Reference","previous_headings":"","what":"Select edges and show their metadata — igraph-es-indexing2","title":"Select edges and show their metadata — igraph-es-indexing2","text":"double bracket operator can used edge sequences, print meta-data (edge attributes) edges sequence.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select edges and show their metadata — igraph-es-indexing2","text":"","code":"# S3 method for class 'igraph.es' x[[...]]"},{"path":"https://r.igraph.org/reference/igraph-es-indexing2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select edges and show their metadata — igraph-es-indexing2","text":"x edge sequence. ... Additional arguments, passed [.","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select edges and show their metadata — igraph-es-indexing2","text":"Another edge sequence, metadata printing turned . See details .","code":""},{"path":"https://r.igraph.org/reference/igraph-es-indexing2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Select edges and show their metadata — igraph-es-indexing2","text":"Technically, used edge sequences, double bracket operator exactly single bracket operator, resulting edge sequence printed differently: attributes edges sequence printed well. See [.igraph.es indexing edge sequences.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-es-indexing2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Select edges and show their metadata — igraph-es-indexing2","text":"","code":"g <- make_( ring(10), with_vertex_(name = LETTERS[1:10]), with_edge_(weight = 1:10, color = \"green\") ) E(g) #> + 10/10 edges from 3305524 (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J E(g)[[]] #> + 10/10 edges from 3305524 (vertex names): #> tail head tid hid weight color #> 1 A B 1 2 1 green #> 2 B C 2 3 2 green #> 3 C D 3 4 3 green #> 4 D E 4 5 4 green #> 5 E F 5 6 5 green #> 6 F G 6 7 6 green #> 7 G H 7 8 7 green #> 8 H I 8 9 8 green #> 9 I J 9 10 9 green #> 10 A J 1 10 10 green E(g)[[.inc(\"A\")]] #> + 2/10 edges from 3305524 (vertex names): #> tail head tid hid weight color #> 1 A B 1 2 1 green #> 10 A J 1 10 10 green"},{"path":"https://r.igraph.org/reference/igraph-minus.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete vertices or edges from a graph — igraph-minus","title":"Delete vertices or edges from a graph — igraph-minus","text":"Delete vertices edges graph","code":""},{"path":"https://r.igraph.org/reference/igraph-minus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete vertices or edges from a graph — igraph-minus","text":"","code":"# S3 method for class 'igraph' e1 - e2"},{"path":"https://r.igraph.org/reference/igraph-minus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete vertices or edges from a graph — igraph-minus","text":"e1 Left argument, see details . e2 Right argument, see details .","code":""},{"path":"https://r.igraph.org/reference/igraph-minus.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete vertices or edges from a graph — igraph-minus","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/igraph-minus.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Delete vertices or edges from a graph — igraph-minus","text":"minus operator (‘-’) can used remove vertices edges graph. operation performed selected based type right hand side argument: igraph graph object, difference two graphs calculated, see difference(). numeric character vector, interpreted vector vertex ids specified vertices deleted graph. Example: e2 vertex sequence (e.g. created V() function), vertices deleted graph. edge sequence (e.g. created E() function), edges deleted graph. object created vertex() (vertices()) function, arguments vertices() concatenated result interpreted vector vertex ids. vertices removed graph. object created edge() (edges()) function, arguments edges() concatenated interpreted edges removed graph. Example: object created path() function, path() arguments concatenated interpreted path along edges removed graph. Example:","code":"g <- make_ring(10) V(g)$name <- letters[1:10] g <- g - c(\"a\", \"b\") g <- make_ring(10) V(g)$name <- letters[1:10] E(g)$name <- LETTERS[1:10] g <- g - edge(\"e|f\") g <- g - edge(\"H\") g <- make_ring(10) V(g)$name <- letters[1:10] g <- g - path(\"a\", \"b\", \"c\", \"d\")"},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-vs-attributes.html","id":null,"dir":"Reference","previous_headings":"","what":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","title":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","text":"$ operator syntactic sugar query set attributes vertices vertex sequence.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-attributes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","text":"","code":"# S3 method for class 'igraph.vs' x[[i]] <- value # S3 method for class 'igraph.vs' x[i] <- value # S3 method for class 'igraph.vs' x$name # S3 method for class 'igraph.vs' x$name <- value V(x) <- value"},{"path":"https://r.igraph.org/reference/igraph-vs-attributes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","text":"x vertex sequence. V<- graph. Index. value New value attribute, vertices vertex sequence. name Name vertex attribute query set.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-attributes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","text":"vector list, containing values attribute name vertices vertex sequence. numeric, character logical attributes, vector appropriate type, otherwise list.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-attributes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","text":"query form $ shortcut vertex_attr(), e.g. V(g)[idx]$attr equivalent vertex_attr(g, attr, V(g)[idx]). assignment form $ shortcut set_vertex_attr(), e.g. V(g)[idx]$attr <- value equivalent g <- set_vertex_attr(g, attr, V(g)[idx], value).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-vs-attributes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query or set attributes of the vertices in a vertex sequence — igraph-vs-attributes","text":"","code":"g <- make_( ring(10), with_vertex_( name = LETTERS[1:10], color = sample(1:2, 10, replace = TRUE) ) ) V(g)$name #> [1] \"A\" \"B\" \"C\" \"D\" \"E\" \"F\" \"G\" \"H\" \"I\" \"J\" V(g)$color #> [1] 1 1 1 1 2 1 2 2 2 2 V(g)$frame.color <- V(g)$color # color vertices of the largest component largest_comp <- function(graph) { cl <- components(graph) V(graph)[which.max(cl$csize) == cl$membership] } g <- sample_( gnp(100, 2 / 100), with_vertex_(size = 3, label = \"\"), with_graph_(layout = layout_with_fr) ) giant_v <- largest_comp(g) V(g)$color <- \"blue\" V(g)[giant_v]$color <- \"orange\" plot(g)"},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":null,"dir":"Reference","previous_headings":"","what":"Indexing vertex sequences — igraph-vs-indexing","title":"Indexing vertex sequences — igraph-vs-indexing","text":"Vertex sequences can indexed much like plain numeric R vector, extras.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indexing vertex sequences — igraph-vs-indexing","text":"","code":"# S3 method for class 'igraph.vs' x[..., na_ok = FALSE]"},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indexing vertex sequences — igraph-vs-indexing","text":"x vertex sequence. ... Indices, see details . na_ok Whether OK NAs vertex sequence.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indexing vertex sequences — igraph-vs-indexing","text":"Another vertex sequence, referring graph.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Indexing vertex sequences — igraph-vs-indexing","text":"Vertex sequences can indexed using single bracket double bracket operators, work way. difference double bracket operator marks result printing vertex attributes.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"multiple-indices","dir":"Reference","previous_headings":"","what":"Multiple indices","title":"Indexing vertex sequences — igraph-vs-indexing","text":"using multiple indices within bracket, evaluated independently, results concatenated using c() function (except na_ok argument, special must named. E.g. V(g)[1, 2, .nei(1)] equivalent c(V(g)[1], V(g)[2], V(g)[.nei(1)]).","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"index-types","dir":"Reference","previous_headings":"","what":"Index types","title":"Indexing vertex sequences — igraph-vs-indexing","text":"Vertex sequences can indexed positive numeric vectors, negative numeric vectors, logical vectors, character vectors: indexed positive numeric vectors, vertices given positions sequence selected. indexing regular R atomic vector positive numeric vectors. indexed negative numeric vectors, vertices given positions sequence omitted. , indexing regular R atomic vector. indexed logical vector, lengths vertex sequence index must match, vertices index TRUE selected. Named graphs can indexed character vectors, select vertices given names.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"vertex-attributes","dir":"Reference","previous_headings":"","what":"Vertex attributes","title":"Indexing vertex sequences — igraph-vs-indexing","text":"indexing vertex sequences, vertex attributes can referred simply using names. E.g. graph name vertex attribute, V(g)[name == \"foo\"] equivalent V(g)[V(g)$name == \"foo\"]. See examples . Note attribute names mask names variables present calling environment; need look variable want similarly named vertex attribute mask , use .env pronoun perform name lookup calling environment. words, use V(g)[.env$name == \"foo\"] make sure name looked calling environment even vertex attribute name. Similarly, can use .data match attribute names .","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"special-functions","dir":"Reference","previous_headings":"","what":"Special functions","title":"Indexing vertex sequences — igraph-vs-indexing","text":"special igraph functions can used expressions indexing vertex sequences: .nei takes vertex sequence argument selects neighbors vertices. optional mode argument can used select successors (mode=\"\"), predecessors (mode=\"\") directed graphs. .inc Takes edge sequence argument, selects vertices least one incident edge edge sequence. .Similar .inc, considers tails edges. .Similar .inc, considers heads edges. .innei, .outnei .innei(v) shorthand .nei(v, mode = \"\"), .outnei(v) shorthand .nei(v, mode = \"\"). Note multiple special functions can used together, regular indices, results concatenated. See examples .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-vs-indexing.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Indexing vertex sequences — igraph-vs-indexing","text":"","code":"# ----------------------------------------------------------------- # Setting attributes for subsets of vertices largest_comp <- function(graph) { cl <- components(graph) V(graph)[which.max(cl$csize) == cl$membership] } g <- sample_( gnp(100, 2 / 100), with_vertex_(size = 3, label = \"\"), with_graph_(layout = layout_with_fr) ) giant_v <- largest_comp(g) V(g)$color <- \"green\" V(g)[giant_v]$color <- \"red\" plot(g) # ----------------------------------------------------------------- # nei() special function g <- make_graph(c(1, 2, 2, 3, 2, 4, 4, 2)) V(g)[.nei(c(2, 4))] #> + 4/4 vertices, from c4b294f: #> [1] 1 2 3 4 V(g)[.nei(c(2, 4), \"in\")] #> + 3/4 vertices, from c4b294f: #> [1] 1 2 4 V(g)[.nei(c(2, 4), \"out\")] #> + 3/4 vertices, from c4b294f: #> [1] 2 3 4 # ----------------------------------------------------------------- # The same with vertex names g <- make_graph(~ A -+ B, B -+ C:D, D -+ B) V(g)[.nei(c(\"B\", \"D\"))] #> + 4/4 vertices, named, from a7bfbbe: #> [1] A B C D V(g)[.nei(c(\"B\", \"D\"), \"in\")] #> + 3/4 vertices, named, from a7bfbbe: #> [1] A B D V(g)[.nei(c(\"B\", \"D\"), \"out\")] #> + 3/4 vertices, named, from a7bfbbe: #> [1] B C D # ----------------------------------------------------------------- # Resolving attributes g <- make_graph(~ A -+ B, B -+ C:D, D -+ B) V(g)$color <- c(\"red\", \"red\", \"green\", \"green\") V(g)[color == \"red\"] #> + 2/4 vertices, named, from 5c9a938: #> [1] A B # Indexing with a variable whose name matches the name of an attribute # may fail; use .env to force the name lookup in the parent environment V(g)$x <- 10:13 x <- 2 V(g)[.env$x] #> + 1/4 vertex, named, from 5c9a938: #> [1] B"},{"path":"https://r.igraph.org/reference/igraph-vs-indexing2.html","id":null,"dir":"Reference","previous_headings":"","what":"Select vertices and show their metadata — igraph-vs-indexing2","title":"Select vertices and show their metadata — igraph-vs-indexing2","text":"double bracket operator can used vertex sequences, print meta-data (vertex attributes) vertices sequence.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select vertices and show their metadata — igraph-vs-indexing2","text":"","code":"# S3 method for class 'igraph.vs' x[[...]]"},{"path":"https://r.igraph.org/reference/igraph-vs-indexing2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select vertices and show their metadata — igraph-vs-indexing2","text":"x vertex sequence. ... Additional arguments, passed [.","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select vertices and show their metadata — igraph-vs-indexing2","text":"double bracket operator returns another vertex sequence, meta-data (attribute) printing turned . See details .","code":""},{"path":"https://r.igraph.org/reference/igraph-vs-indexing2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Select vertices and show their metadata — igraph-vs-indexing2","text":"Technically, used vertex sequences, double bracket operator exactly single bracket operator, resulting vertex sequence printed differently: attributes vertices sequence printed well. See [.igraph.vs indexing vertex sequences.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph-vs-indexing2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Select vertices and show their metadata — igraph-vs-indexing2","text":"","code":"g <- make_ring(10) %>% set_vertex_attr(\"color\", value = \"red\") %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) V(g) #> + 10/10 vertices, named, from 689d68a: #> [1] A B C D E F G H I J V(g)[[]] #> + 10/10 vertices, named, from 689d68a: #> color name #> 1 red A #> 2 red B #> 3 red C #> 4 red D #> 5 red E #> 6 red F #> 7 red G #> 8 red H #> 9 red I #> 10 red J V(g)[1:5] #> + 5/10 vertices, named, from 689d68a: #> [1] A B C D E V(g)[[1:5]] #> + 5/10 vertices, named, from 689d68a: #> color name #> 1 red A #> 2 red B #> 3 red C #> 4 red D #> 5 red E"},{"path":"https://r.igraph.org/reference/igraph.console.html","id":null,"dir":"Reference","previous_headings":"","what":"The igraph console — igraph.console","title":"The igraph console — igraph.console","text":"igraph.console() renamed console() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.console.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The igraph console — igraph.console","text":"","code":"igraph.console()"},{"path":"https://r.igraph.org/reference/igraph.from.graphNEL.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert graphNEL objects from the graph package to igraph — igraph.from.graphNEL","title":"Convert graphNEL objects from the graph package to igraph — igraph.from.graphNEL","text":"igraph..graphNEL() renamed graph_from_graphnel() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.from.graphNEL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert graphNEL objects from the graph package to igraph — igraph.from.graphNEL","text":"","code":"igraph.from.graphNEL(graphNEL, name = TRUE, weight = TRUE, unlist.attrs = TRUE)"},{"path":"https://r.igraph.org/reference/igraph.from.graphNEL.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert graphNEL objects from the graph package to igraph — igraph.from.graphNEL","text":"graphNEL graphNEL graph. name Logical scalar, whether add graphNEL vertex names igraph vertex attribute called ‘name’. weight Logical scalar, whether add graphNEL edge weights igraph edge attribute called ‘weight’. (graphNEL graphs always weighted.) unlist.attrs Logical scalar. graphNEL attribute query functions return values attributes R lists, argument TRUE (default) converted atomic vectors, whenever possible, adding igraph graph.","code":""},{"path":"https://r.igraph.org/reference/igraph.options.html","id":null,"dir":"Reference","previous_headings":"","what":"Parameters for the igraph package — igraph.options","title":"Parameters for the igraph package — igraph.options","text":"igraph.options() renamed igraph_options() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parameters for the igraph package — igraph.options","text":"","code":"igraph.options(...)"},{"path":"https://r.igraph.org/reference/igraph.options.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parameters for the igraph package — igraph.options","text":"... list may given argument, number arguments may name=value form, argument may given. See Value Details sections explanation.","code":""},{"path":"https://r.igraph.org/reference/igraph.sample.html","id":null,"dir":"Reference","previous_headings":"","what":"Sampling a random integer sequence — igraph.sample","title":"Sampling a random integer sequence — igraph.sample","text":"igraph.sample() renamed sample_seq() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.sample.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sampling a random integer sequence — igraph.sample","text":"","code":"igraph.sample(low, high, length)"},{"path":"https://r.igraph.org/reference/igraph.sample.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sampling a random integer sequence — igraph.sample","text":"low lower limit interval (inclusive). high higher limit interval (inclusive). length length sample.","code":""},{"path":"https://r.igraph.org/reference/igraph.shape.noclip.html","id":null,"dir":"Reference","previous_headings":"","what":"Various vertex shapes when plotting igraph graphs — igraph.shape.noclip","title":"Various vertex shapes when plotting igraph graphs — igraph.shape.noclip","text":"igraph.shape.noclip() renamed shape_noclip() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.shape.noclip.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Various vertex shapes when plotting igraph graphs — igraph.shape.noclip","text":"","code":"igraph.shape.noclip(coords, el, params, end = c(\"both\", \"from\", \"to\"))"},{"path":"https://r.igraph.org/reference/igraph.shape.noplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Various vertex shapes when plotting igraph graphs — igraph.shape.noplot","title":"Various vertex shapes when plotting igraph graphs — igraph.shape.noplot","text":"igraph.shape.noplot() renamed shape_noplot() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.shape.noplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Various vertex shapes when plotting igraph graphs — igraph.shape.noplot","text":"","code":"igraph.shape.noplot(coords, v = NULL, params)"},{"path":"https://r.igraph.org/reference/igraph.to.graphNEL.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert igraph graphs to graphNEL objects from the graph package — igraph.to.graphNEL","title":"Convert igraph graphs to graphNEL objects from the graph package — igraph.to.graphNEL","text":"igraph..graphNEL() renamed as_graphnel() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.to.graphNEL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert igraph graphs to graphNEL objects from the graph package — igraph.to.graphNEL","text":"","code":"igraph.to.graphNEL(graph)"},{"path":"https://r.igraph.org/reference/igraph.to.graphNEL.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert igraph graphs to graphNEL objects from the graph package — igraph.to.graphNEL","text":"graph igraph graph object.","code":""},{"path":"https://r.igraph.org/reference/igraph.version.html","id":null,"dir":"Reference","previous_headings":"","what":"Query igraph's version string — igraph.version","title":"Query igraph's version string — igraph.version","text":"igraph.version() renamed igraph_version() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraph.version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query igraph's version string — igraph.version","text":"","code":"igraph.version()"},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":null,"dir":"Reference","previous_headings":"","what":"Run igraph demos, step by step — igraph_demo","title":"Run igraph demos, step by step — igraph_demo","text":"Run one accompanying igraph demos, somewhat interactively, using Tk window.","code":""},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run igraph demos, step by step — igraph_demo","text":"","code":"igraph_demo(which)"},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run igraph demos, step by step — igraph_demo","text":"given, names available demos listed. Otherwise either filename name igraph demo.","code":""},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run igraph demos, step by step — igraph_demo","text":"Returns NULL, invisibly.","code":""},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run igraph demos, step by step — igraph_demo","text":"function provides somewhat nicer interface igraph demos come package, standard demo() function. igraph demos divided chunks igraph_demo() runs chunk chunk, possibility inspecting workspace two chunks. tcltk package needed igraph_demo().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Run igraph demos, step by step — igraph_demo","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/igraph_demo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run igraph demos, step by step — igraph_demo","text":"","code":"igraph_demo() #> [1] \"centrality\" \"cohesive\" \"community\" \"crashR\" \"hrg\" #> [6] \"smallworld\" if (interactive() && requireNamespace(\"tcltk\", quietly = TRUE)) { igraph_demo(\"centrality\") }"},{"path":"https://r.igraph.org/reference/igraph_options.html","id":null,"dir":"Reference","previous_headings":"","what":"Parameters for the igraph package — igraph_options","title":"Parameters for the igraph package — igraph_options","text":"igraph parameters (usually) affect behavior many functions. can set whole session via igraph_options().","code":""},{"path":"https://r.igraph.org/reference/igraph_options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parameters for the igraph package — igraph_options","text":"","code":"igraph_options(...) igraph_opt(x, default = NULL)"},{"path":"https://r.igraph.org/reference/igraph_options.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parameters for the igraph package — igraph_options","text":"... list may given argument, number arguments may name=value form, argument may given. See Value Details sections explanation. x character string holding option name. default specified option set options list, value returned. facilitates retrieving option checking whether set setting separately .","code":""},{"path":"https://r.igraph.org/reference/igraph_options.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parameters for the igraph package — igraph_options","text":"igraph_options() returns list old values updated parameters, invisibly. Without arguments, returns values options. igraph_opt(), current value set option x, NULL option unset.","code":""},{"path":"https://r.igraph.org/reference/igraph_options.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Parameters for the igraph package — igraph_options","text":"parameter values set via call igraph_options() function remain effect rest session, affecting subsequent behaviour functions igraph package given parameters relevant. offers possibility customizing functioning igraph package, instance insertions appropriate calls igraph_options() load hook package igraph. currently used parameters alphabetical order: add.params Logical scalar, whether add model parameter graphs created various graph constructors. default TRUE. add.vertex.names Logical scalar, whether add vertex names node level indices, like degree, betweenness scores, etc. default TRUE. annotate.plot Logical scalar, whether annotate igraph plots graph's name (name graph attribute, present) main, number vertices edges xlab. Defaults FALSE. dend.plot.type plotting function use plotting community structure dendrograms via plot_dendrogram() edge.attr.comb Specifies edge attributes graph modified. default value list(weight=\"sum\", name=\"concat\", \"ignore\"). See attribute.combination() details . print.edge.attributes Logical constant, whether print edge attributes printing graphs. Defaults FALSE. print.full Logical scalar, whether print.igraph() show graph structure well, summary graph. print.graph.attributes Logical constant, whether print graph attributes printing graphs. Defaults FALSE. print.vertex.attributes Logical constant, whether print vertex attributes printing graphs. Defaults FALSE. return.vs.es Whether functions return set sequence vertices/edges return formal vertex/edge sequence objects. option introduced igraph version 1.0.0 defaults TRUE. package requires old behavior, can set FALSE .onLoad function package, without affecting packages. sparsematrices Whether use Matrix package (sparse) matrices. recommended, user works larger graphs. verbose Logical constant, whether igraph functions talk minimal. E.g. TRUE functions use progress bars computing. Defaults FALSE. vertex.attr.comb Specifies vertex attributes graph modified. default value list(name=\"concat\", \"ignore\") See attribute.combination() details .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph_options.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Parameters for the igraph package — igraph_options","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/igraph_options.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Parameters for the igraph package — igraph_options","text":"","code":"oldval <- igraph_opt(\"verbose\") igraph_options(verbose = TRUE) layout_with_kk(make_ring(10)) #> Make graph external pointer. #> Materializing 'from' vector. #> Materializing 'to' vector. #> [,1] [,2] #> [1,] 1.1483519 -0.003216317 #> [2,] 0.9291475 0.676715503 #> [3,] 0.3521535 1.097946790 #> [4,] -0.3622379 1.099581508 #> [5,] -0.9411536 0.680995251 #> [6,] -1.1634674 0.002073742 #> [7,] -0.9442631 -0.677858079 #> [8,] -0.3672691 -1.099089365 #> [9,] 0.3471224 -1.100724083 #> [10,] 0.9260381 -0.682137826 igraph_options(verbose = oldval) oldval <- igraph_options(verbose = TRUE, sparsematrices = FALSE) make_ring(10)[] #> Make graph external pointer. #> Materializing 'from' vector. #> Materializing 'to' vector. #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> [1,] 0 1 0 0 0 0 0 0 0 1 #> [2,] 1 0 1 0 0 0 0 0 0 0 #> [3,] 0 1 0 1 0 0 0 0 0 0 #> [4,] 0 0 1 0 1 0 0 0 0 0 #> [5,] 0 0 0 1 0 1 0 0 0 0 #> [6,] 0 0 0 0 1 0 1 0 0 0 #> [7,] 0 0 0 0 0 1 0 1 0 0 #> [8,] 0 0 0 0 0 0 1 0 1 0 #> [9,] 0 0 0 0 0 0 0 1 0 1 #> [10,] 1 0 0 0 0 0 0 0 1 0 igraph_options(oldval) igraph_opt(\"verbose\") #> [1] FALSE"},{"path":"https://r.igraph.org/reference/igraph_test.html","id":null,"dir":"Reference","previous_headings":"","what":"Run package tests — igraph_test","title":"Run package tests — igraph_test","text":"Runs package tests.","code":""},{"path":"https://r.igraph.org/reference/igraph_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run package tests — igraph_test","text":"","code":"igraph_test()"},{"path":"https://r.igraph.org/reference/igraph_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run package tests — igraph_test","text":"Whatever returned test_dir testthat package.","code":""},{"path":"https://r.igraph.org/reference/igraph_test.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run package tests — igraph_test","text":"testthat package needed run tests. location tests can extracted package via system.file(\"tests\", package=\"igraph\"). function simply calls test_dir function testthat package test directory.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph_test.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Run package tests — igraph_test","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/igraph_version.html","id":null,"dir":"Reference","previous_headings":"","what":"Query igraph's version string — igraph_version","title":"Query igraph's version string — igraph_version","text":"Returns package version.","code":""},{"path":"https://r.igraph.org/reference/igraph_version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query igraph's version string — igraph_version","text":"","code":"igraph_version()"},{"path":"https://r.igraph.org/reference/igraph_version.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query igraph's version string — igraph_version","text":"character scalar, igraph version string.","code":""},{"path":"https://r.igraph.org/reference/igraph_version.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Query igraph's version string — igraph_version","text":"igraph version string always version R package.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/igraph_version.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Query igraph's version string — igraph_version","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/igraph_version.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query igraph's version string — igraph_version","text":"","code":"## Compare to the package version packageDescription(\"igraph\")$Version #> [1] \"2.0.3\" igraph_version() #> [1] \"2.0.3\""},{"path":"https://r.igraph.org/reference/igraphdemo.html","id":null,"dir":"Reference","previous_headings":"","what":"Run igraph demos, step by step — igraphdemo","title":"Run igraph demos, step by step — igraphdemo","text":"igraphdemo() renamed igraph_demo() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraphdemo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run igraph demos, step by step — igraphdemo","text":"","code":"igraphdemo(which)"},{"path":"https://r.igraph.org/reference/igraphdemo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run igraph demos, step by step — igraphdemo","text":"given, names available demos listed. Otherwise either filename name igraph demo.","code":""},{"path":"https://r.igraph.org/reference/igraphtest.html","id":null,"dir":"Reference","previous_headings":"","what":"Run package tests — igraphtest","title":"Run package tests — igraphtest","text":"igraphtest() renamed igraph_test() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/igraphtest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run package tests — igraphtest","text":"","code":"igraphtest()"},{"path":"https://r.igraph.org/reference/incident.html","id":null,"dir":"Reference","previous_headings":"","what":"Incident edges of a vertex in a graph — incident","title":"Incident edges of a vertex in a graph — incident","text":"Incident edges vertex graph","code":""},{"path":"https://r.igraph.org/reference/incident.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Incident edges of a vertex in a graph — incident","text":"","code":"incident(graph, v, mode = c(\"all\", \"out\", \"in\", \"total\"))"},{"path":"https://r.igraph.org/reference/incident.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Incident edges of a vertex in a graph — incident","text":"graph input graph. v vertex incident edges queried. mode Whether query outgoing (‘’), incoming (‘’) edges, types (‘’). ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/incident.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Incident edges of a vertex in a graph — incident","text":"edge sequence containing incident edges input vertex.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/incident.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Incident edges of a vertex in a graph — incident","text":"","code":"g <- make_graph(\"Zachary\") incident(g, 1) #> + 16/78 edges from d01d736: #> [1] 1-- 2 1-- 3 1-- 4 1-- 5 1-- 6 1-- 7 1-- 8 1-- 9 1--11 1--12 1--13 1--14 #> [13] 1--18 1--20 1--22 1--32 incident(g, 34) #> + 17/78 edges from d01d736: #> [1] 9--34 10--34 14--34 15--34 16--34 19--34 20--34 21--34 23--34 24--34 #> [11] 27--34 28--34 29--34 30--34 31--34 32--34 33--34"},{"path":"https://r.igraph.org/reference/incident_edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Incident edges of multiple vertices in a graph — incident_edges","title":"Incident edges of multiple vertices in a graph — incident_edges","text":"function similar incident(), queries multiple vertices .","code":""},{"path":"https://r.igraph.org/reference/incident_edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Incident edges of multiple vertices in a graph — incident_edges","text":"","code":"incident_edges(graph, v, mode = c(\"out\", \"in\", \"all\", \"total\"))"},{"path":"https://r.igraph.org/reference/incident_edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Incident edges of multiple vertices in a graph — incident_edges","text":"graph Input graph. v vertices query mode Whether query outgoing (‘’), incoming (‘’) edges, types (‘’). ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/incident_edges.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Incident edges of multiple vertices in a graph — incident_edges","text":"list edge sequences.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/incident_edges.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Incident edges of multiple vertices in a graph — incident_edges","text":"","code":"g <- make_graph(\"Zachary\") incident_edges(g, c(1, 34)) #> [[1]] #> + 16/78 edges from d14cbf1: #> [1] 1-- 2 1-- 3 1-- 4 1-- 5 1-- 6 1-- 7 1-- 8 1-- 9 1--11 1--12 1--13 1--14 #> [13] 1--18 1--20 1--22 1--32 #> #> [[2]] #> + 17/78 edges from d14cbf1: #> [1] 9--34 10--34 14--34 15--34 16--34 19--34 20--34 21--34 23--34 24--34 #> [11] 27--34 28--34 29--34 30--34 31--34 32--34 33--34 #>"},{"path":"https://r.igraph.org/reference/indent_print.html","id":null,"dir":"Reference","previous_headings":"","what":"Indent a printout — indent_print","title":"Indent a printout — indent_print","text":"Indent printout","code":""},{"path":"https://r.igraph.org/reference/indent_print.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indent a printout — indent_print","text":"","code":"indent_print(..., .indent = \" \", .printer = print)"},{"path":"https://r.igraph.org/reference/indent_print.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indent a printout — indent_print","text":"... Passed printing function. .indent Character scalar, indent printout . .printer printing function, defaults print.","code":""},{"path":"https://r.igraph.org/reference/indent_print.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indent a printout — indent_print","text":"first element ..., invisibly.","code":""},{"path":"https://r.igraph.org/reference/independence.number.html","id":null,"dir":"Reference","previous_headings":"","what":"Independent vertex sets — independence.number","title":"Independent vertex sets — independence.number","text":"independence.number() renamed ivs_size() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/independence.number.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Independent vertex sets — independence.number","text":"","code":"independence.number(graph)"},{"path":"https://r.igraph.org/reference/independence.number.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Independent vertex sets — independence.number","text":"graph input graph, directed graphs considered undirected, loop edges multiple edges ignored.","code":""},{"path":"https://r.igraph.org/reference/independent.vertex.sets.html","id":null,"dir":"Reference","previous_headings":"","what":"Independent vertex sets — independent.vertex.sets","title":"Independent vertex sets — independent.vertex.sets","text":"independent.vertex.sets() renamed ivs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/independent.vertex.sets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Independent vertex sets — independent.vertex.sets","text":"","code":"independent.vertex.sets(graph, min = NULL, max = NULL)"},{"path":"https://r.igraph.org/reference/independent.vertex.sets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Independent vertex sets — independent.vertex.sets","text":"graph input graph, directed graphs considered undirected, loop edges multiple edges ignored. min Numeric constant, limit minimum size independent vertex sets find. NULL means limit. max Numeric constant, limit maximum size independent vertex sets find. NULL means limit.","code":""},{"path":"https://r.igraph.org/reference/induced.subgraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Subgraph of a graph — induced.subgraph","title":"Subgraph of a graph — induced.subgraph","text":"induced.subgraph() renamed induced_subgraph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/induced.subgraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subgraph of a graph — induced.subgraph","text":"","code":"induced.subgraph( graph, vids, impl = c(\"auto\", \"copy_and_delete\", \"create_from_scratch\") )"},{"path":"https://r.igraph.org/reference/induced.subgraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subgraph of a graph — induced.subgraph","text":"graph original graph. vids Numeric vector, vertices original graph form subgraph. impl Character scalar, choose two implementation subgraph calculation. ‘copy_and_delete’ copies graph first, deletes vertices edges included result graph. ‘create_from_scratch’ searches vertices edges must kept uses create graph scratch. ‘auto’ chooses two implementations automatically, using heuristics based size original result graph.","code":""},{"path":"https://r.igraph.org/reference/infomap.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Infomap community finding — infomap.community","title":"Infomap community finding — infomap.community","text":"infomap.community() renamed cluster_infomap() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/infomap.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Infomap community finding — infomap.community","text":"","code":"infomap.community( graph, e.weights = NULL, v.weights = NULL, nb.trials = 10, modularity = TRUE )"},{"path":"https://r.igraph.org/reference/infomap.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Infomap community finding — infomap.community","text":"graph input graph. Edge directions taken account. e.weights NULL, numeric vector edge weights. length must match number edges graph. default ‘weight’ edge attribute used weights. present, edges considered weight. Larger edge weights correspond stronger connections. v.weights NULL, numeric vector vertex weights. length must match number vertices graph. default ‘weight’ vertex attribute used weights. present, vertices considered weight. larger vertex weight means larger probability random surfer jumps vertex. nb.trials number attempts partition network (can integer value equal larger 1). modularity Logical scalar, whether calculate modularity score detected community structure.","code":""},{"path":"https://r.igraph.org/reference/interconnected.islands.game.html","id":null,"dir":"Reference","previous_headings":"","what":"A graph with subgraphs that are each a random graph. — interconnected.islands.game","title":"A graph with subgraphs that are each a random graph. — interconnected.islands.game","text":"interconnected.islands.game() renamed sample_islands() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/interconnected.islands.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A graph with subgraphs that are each a random graph. — interconnected.islands.game","text":"","code":"interconnected.islands.game(islands.n, islands.size, islands.pin, n.inter)"},{"path":"https://r.igraph.org/reference/interconnected.islands.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A graph with subgraphs that are each a random graph. — interconnected.islands.game","text":"islands.n number islands graph. islands.size size islands graph. islands.pin probability create possible edge island. n.inter number edges create two islands.","code":""},{"path":"https://r.igraph.org/reference/intersection.html","id":null,"dir":"Reference","previous_headings":"","what":"Intersection of two or more sets — intersection","title":"Intersection of two or more sets — intersection","text":"S3 generic function. See methods(\"intersection\") actual implementations various S3 classes. Initially implemented igraph graphs igraph vertex edge sequences. See intersection.igraph(), intersection.igraph.vs().","code":""},{"path":"https://r.igraph.org/reference/intersection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Intersection of two or more sets — intersection","text":"","code":"intersection(...)"},{"path":"https://r.igraph.org/reference/intersection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Intersection of two or more sets — intersection","text":"... Arguments, number interpretation depends function implements intersection().","code":""},{"path":"https://r.igraph.org/reference/intersection.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Intersection of two or more sets — intersection","text":"Depends function implements method.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/intersection.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Intersection of edge sequences — intersection.igraph.es","title":"Intersection of edge sequences — intersection.igraph.es","text":"Intersection edge sequences","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Intersection of edge sequences — intersection.igraph.es","text":"","code":"# S3 method for class 'igraph.es' intersection(...)"},{"path":"https://r.igraph.org/reference/intersection.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Intersection of edge sequences — intersection.igraph.es","text":"... edge sequences take intersection .","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Intersection of edge sequences — intersection.igraph.es","text":"edge sequence contains edges appear given sequences, edge exactly .","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.es.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Intersection of edge sequences — intersection.igraph.es","text":"must belong graph. Note function ‘set’ semantics multiplicity edges lost result.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/intersection.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Intersection of edge sequences — intersection.igraph.es","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) intersection(E(g)[1:6], E(g)[5:9]) #> + 2/10 edges from a049317 (vertex names): #> [1] E--F F--G"},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Intersection of graphs — intersection.igraph","title":"Intersection of graphs — intersection.igraph","text":"intersection two graphs created. graphs may identical overlapping vertex sets.","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Intersection of graphs — intersection.igraph","text":"","code":"# S3 method for class 'igraph' intersection(..., byname = \"auto\", keep.all.vertices = TRUE)"},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Intersection of graphs — intersection.igraph","text":"... Graph objects lists graph objects. byname logical scalar, character scalar auto. Whether perform operation based symbolic vertex names. auto, means TRUE graphs named FALSE otherwise. warning generated auto () graphs named. keep..vertices Logical scalar, whether keep vertices appear subset input graphs.","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Intersection of graphs — intersection.igraph","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Intersection of graphs — intersection.igraph","text":"intersection() creates intersection two graphs: edges present graphs included. corresponding operator %s%. byname argument TRUE (auto graphs named), operation performed symbolic vertex names instead internal numeric vertex ids. intersection() keeps attributes graphs. graph, vertex edge attributes copied result. attribute present multiple graphs result name clash, attribute renamed adding suffixes: _1, _2, etc. name vertex attribute treated specially operation performed based symbolic vertex names. case name must present graphs, renamed result graph. error generated input graphs directed others undirected.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Intersection of graphs — intersection.igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Intersection of graphs — intersection.igraph","text":"","code":"## Common part of two social networks net1 <- graph_from_literal( D - A:B:F:G, A - C - F - A, B - E - G - B, A - B, F - G, H - F:G, H - I - J ) net2 <- graph_from_literal(D - A:F:Y, B - A - X - F - H - Z, F - Y) print_all(net1 %s% net2) #> IGRAPH 91616a5 UN-- 13 4 -- #> + attr: name (v/c) #> + vertex attributes: #> | name #> | [1] D #> | [2] A #> | [3] B #> | [4] F #> | [5] G #> | [6] C #> | [7] E #> | [8] H #> | [9] I #> | [10] J #> | [11] Y #> | [12] X #> | [13] Z #> + edges from 91616a5 (vertex names): #> [1] F--H A--B D--F D--A"},{"path":"https://r.igraph.org/reference/intersection.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Intersection of vertex sequences — intersection.igraph.vs","title":"Intersection of vertex sequences — intersection.igraph.vs","text":"Intersection vertex sequences","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Intersection of vertex sequences — intersection.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' intersection(...)"},{"path":"https://r.igraph.org/reference/intersection.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Intersection of vertex sequences — intersection.igraph.vs","text":"... vertex sequences take intersection .","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Intersection of vertex sequences — intersection.igraph.vs","text":"vertex sequence contains vertices appear given sequences, vertex exactly .","code":""},{"path":"https://r.igraph.org/reference/intersection.igraph.vs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Intersection of vertex sequences — intersection.igraph.vs","text":"must belong graph. Note function ‘set’ semantics multiplicity vertices lost result.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/intersection.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Intersection of vertex sequences — intersection.igraph.vs","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) intersection(E(g)[1:6], E(g)[5:9]) #> + 2/10 edges from a075b7e (vertex names): #> [1] E--F F--G"},{"path":"https://r.igraph.org/reference/is.bipartite.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether the graph has a vertex attribute called type — is.bipartite","title":"Checks whether the graph has a vertex attribute called type — is.bipartite","text":".bipartite() renamed is_bipartite() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.bipartite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether the graph has a vertex attribute called type — is.bipartite","text":"","code":"is.bipartite(graph)"},{"path":"https://r.igraph.org/reference/is.bipartite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether the graph has a vertex attribute called type — is.bipartite","text":"graph input graph","code":""},{"path":"https://r.igraph.org/reference/is.chordal.html","id":null,"dir":"Reference","previous_headings":"","what":"Chordality of a graph — is.chordal","title":"Chordality of a graph — is.chordal","text":".chordal() renamed is_chordal() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.chordal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Chordality of a graph — is.chordal","text":"","code":"is.chordal( graph, alpha = NULL, alpham1 = NULL, fillin = FALSE, newgraph = FALSE )"},{"path":"https://r.igraph.org/reference/is.chordal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Chordality of a graph — is.chordal","text":"graph input graph. may directed, edge directions ignored, algorithm defined undirected graphs. alpha Numeric vector, maximal chardinality ordering vertices. NULL, automatically calculated calling max_cardinality(), alpham1 given.. alpham1 Numeric vector, inverse alpha. NULL, automatically calculated calling max_cardinality(), alpha. fillin Logical scalar, whether calculate fill-edges. newgraph Logical scalar, whether calculate triangulated graph.","code":""},{"path":"https://r.igraph.org/reference/is.connected.html","id":null,"dir":"Reference","previous_headings":"","what":"Connected components of a graph — is.connected","title":"Connected components of a graph — is.connected","text":".connected() renamed is_connected() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.connected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connected components of a graph — is.connected","text":"","code":"is.connected(graph, mode = c(\"weak\", \"strong\"))"},{"path":"https://r.igraph.org/reference/is.connected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connected components of a graph — is.connected","text":"graph graph analyze. mode Character string, either “weak” “strong”. directed graphs “weak” implies weakly, “strong” strongly connected components search. ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/is.dag.html","id":null,"dir":"Reference","previous_headings":"","what":"Directed acyclic graphs — is.dag","title":"Directed acyclic graphs — is.dag","text":".dag() renamed is_dag() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.dag.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Directed acyclic graphs — is.dag","text":"","code":"is.dag(graph)"},{"path":"https://r.igraph.org/reference/is.dag.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Directed acyclic graphs — is.dag","text":"graph input graph. may undirected, case FALSE reported.","code":""},{"path":"https://r.igraph.org/reference/is.degree.sequence.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a degree sequence is valid for a multi-graph — is.degree.sequence","title":"Check if a degree sequence is valid for a multi-graph — is.degree.sequence","text":".degree.sequence() renamed is_degseq() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.degree.sequence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a degree sequence is valid for a multi-graph — is.degree.sequence","text":"","code":"is.degree.sequence(out.deg, in.deg = NULL)"},{"path":"https://r.igraph.org/reference/is.degree.sequence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a degree sequence is valid for a multi-graph — is.degree.sequence","text":".deg Integer vector, degree sequence undirected graphs, -degree sequence directed graphs. .deg NULL integer vector. undirected graphs, NULL. directed graphs specifies -degrees.","code":""},{"path":"https://r.igraph.org/reference/is.directed.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether a graph is directed — is.directed","title":"Check whether a graph is directed — is.directed","text":".directed() renamed is_directed() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.directed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether a graph is directed — is.directed","text":"","code":"is.directed(graph)"},{"path":"https://r.igraph.org/reference/is.directed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether a graph is directed — is.directed","text":"graph input graph","code":""},{"path":"https://r.igraph.org/reference/is.graphical.degree.sequence.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a degree sequence graphical? — is.graphical.degree.sequence","title":"Is a degree sequence graphical? — is.graphical.degree.sequence","text":".graphical.degree.sequence() renamed is_graphical() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.graphical.degree.sequence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a degree sequence graphical? — is.graphical.degree.sequence","text":"","code":"is.graphical.degree.sequence( out.deg, in.deg = NULL, allowed.edge.types = c(\"simple\", \"loops\", \"multi\", \"all\") )"},{"path":"https://r.igraph.org/reference/is.graphical.degree.sequence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a degree sequence graphical? — is.graphical.degree.sequence","text":".deg Integer vector, degree sequence undirected graphs, -degree sequence directed graphs. .deg NULL integer vector. undirected graphs, NULL. directed graphs specifies -degrees. allowed.edge.types allowed edge types graph. ‘simple’ means neither loop multiple edges allowed (.e. graph must simple). ‘loops’ means loop edges allowed mutiple edges . ‘multi’ means multiple edges allowed loop edges . ‘’ means loop edges multiple edges allowed.","code":""},{"path":"https://r.igraph.org/reference/is.hierarchical.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to deal with the result of network community detection — is.hierarchical","title":"Functions to deal with the result of network community detection — is.hierarchical","text":".hierarchical() renamed is_hierarchical() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.hierarchical.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to deal with the result of network community detection — is.hierarchical","text":"","code":"is.hierarchical(communities)"},{"path":"https://r.igraph.org/reference/is.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Is this object an igraph graph? — is.igraph","title":"Is this object an igraph graph? — is.igraph","text":".igraph() renamed is_igraph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is this object an igraph graph? — is.igraph","text":"","code":"is.igraph(graph)"},{"path":"https://r.igraph.org/reference/is.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is this object an igraph graph? — is.igraph","text":"graph R object.","code":""},{"path":"https://r.igraph.org/reference/is.loop.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the multiple or loop edges in a graph — is.loop","title":"Find the multiple or loop edges in a graph — is.loop","text":".loop() renamed which_loop() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.loop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the multiple or loop edges in a graph — is.loop","text":"","code":"is.loop(graph, eids = E(graph))"},{"path":"https://r.igraph.org/reference/is.loop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the multiple or loop edges in a graph — is.loop","text":"graph input graph. eids edges query restricted. default edges graph.","code":""},{"path":"https://r.igraph.org/reference/is.matching.html","id":null,"dir":"Reference","previous_headings":"","what":"Matching — is.matching","title":"Matching — is.matching","text":".matching() renamed is_matching() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.matching.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Matching — is.matching","text":"","code":"is.matching(graph, matching, types = NULL)"},{"path":"https://r.igraph.org/reference/is.matching.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Matching — is.matching","text":"graph input graph. might directed, edge directions ignored. matching potential matching. integer vector gives pair matching vertex. vertices without pair, supply NA . types Vertex types, graph bipartite. default taken ‘type’ vertex attribute, present.","code":""},{"path":"https://r.igraph.org/reference/is.maximal.matching.html","id":null,"dir":"Reference","previous_headings":"","what":"Matching — is.maximal.matching","title":"Matching — is.maximal.matching","text":".maximal.matching() renamed is_max_matching() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.maximal.matching.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Matching — is.maximal.matching","text":"","code":"is.maximal.matching(graph, matching, types = NULL)"},{"path":"https://r.igraph.org/reference/is.maximal.matching.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Matching — is.maximal.matching","text":"graph input graph. might directed, edge directions ignored. matching potential matching. integer vector gives pair matching vertex. vertices without pair, supply NA . types Vertex types, graph bipartite. default taken ‘type’ vertex attribute, present.","code":""},{"path":"https://r.igraph.org/reference/is.minimal.separator.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimal vertex separators — is.minimal.separator","title":"Minimal vertex separators — is.minimal.separator","text":".minimal.separator() renamed is_min_separator() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.minimal.separator.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimal vertex separators — is.minimal.separator","text":"","code":"is.minimal.separator(graph, candidate)"},{"path":"https://r.igraph.org/reference/is.minimal.separator.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimal vertex separators — is.minimal.separator","text":"graph input graph. may directed, edge directions ignored. candidate numeric vector giving vertex ids candidate separator.","code":""},{"path":"https://r.igraph.org/reference/is.multiple.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the multiple or loop edges in a graph — is.multiple","title":"Find the multiple or loop edges in a graph — is.multiple","text":".multiple() renamed which_multiple() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.multiple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the multiple or loop edges in a graph — is.multiple","text":"","code":"is.multiple(graph, eids = E(graph))"},{"path":"https://r.igraph.org/reference/is.multiple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the multiple or loop edges in a graph — is.multiple","text":"graph input graph. eids edges query restricted. default edges graph.","code":""},{"path":"https://r.igraph.org/reference/is.mutual.html","id":null,"dir":"Reference","previous_headings":"","what":"Find mutual edges in a directed graph — is.mutual","title":"Find mutual edges in a directed graph — is.mutual","text":".mutual() renamed which_mutual() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.mutual.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find mutual edges in a directed graph — is.mutual","text":"","code":"is.mutual(graph, eids = E(graph), loops = TRUE)"},{"path":"https://r.igraph.org/reference/is.mutual.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find mutual edges in a directed graph — is.mutual","text":"graph input graph. eids Edge sequence, edges probed. default includes edges order ids. loops Logical, whether consider directed self-loops mutual.","code":""},{"path":"https://r.igraph.org/reference/is.named.html","id":null,"dir":"Reference","previous_headings":"","what":"Named graphs — is.named","title":"Named graphs — is.named","text":".named() renamed is_named() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.named.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Named graphs — is.named","text":"","code":"is.named(graph)"},{"path":"https://r.igraph.org/reference/is.named.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Named graphs — is.named","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/is.separator.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex separators — is.separator","title":"Vertex separators — is.separator","text":".separator() renamed is_separator() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.separator.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex separators — is.separator","text":"","code":"is.separator(graph, candidate)"},{"path":"https://r.igraph.org/reference/is.separator.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex separators — is.separator","text":"graph input graph. may directed, edge directions ignored. candidate numeric vector giving vertex ids candidate separator.","code":""},{"path":"https://r.igraph.org/reference/is.simple.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple graphs — is.simple","title":"Simple graphs — is.simple","text":".simple() renamed is_simple() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.simple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple graphs — is.simple","text":"","code":"is.simple(graph)"},{"path":"https://r.igraph.org/reference/is.simple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple graphs — is.simple","text":"graph graph work .","code":""},{"path":"https://r.igraph.org/reference/is.weighted.html","id":null,"dir":"Reference","previous_headings":"","what":"Weighted graphs — is.weighted","title":"Weighted graphs — is.weighted","text":".weighted() renamed is_weighted() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/is.weighted.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Weighted graphs — is.weighted","text":"","code":"is.weighted(graph)"},{"path":"https://r.igraph.org/reference/is.weighted.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Weighted graphs — is.weighted","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/is_acyclic.html","id":null,"dir":"Reference","previous_headings":"","what":"Acyclic graphs — is_acyclic","title":"Acyclic graphs — is_acyclic","text":"function tests whether given graph free cycles.","code":""},{"path":"https://r.igraph.org/reference/is_acyclic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acyclic graphs — is_acyclic","text":"","code":"is_acyclic(graph)"},{"path":"https://r.igraph.org/reference/is_acyclic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acyclic graphs — is_acyclic","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/is_acyclic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Acyclic graphs — is_acyclic","text":"logical vector length one.","code":""},{"path":"https://r.igraph.org/reference/is_acyclic.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Acyclic graphs — is_acyclic","text":"function looks directed cycles directed graphs undirected cycles undirected graphs.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_acyclic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acyclic graphs — is_acyclic","text":"","code":"g <- make_graph(c(1,2, 1,3, 2,4, 3,4), directed = TRUE) is_acyclic(g) #> [1] TRUE is_acyclic(as.undirected(g)) #> [1] FALSE"},{"path":"https://r.igraph.org/reference/is_biconnected.html","id":null,"dir":"Reference","previous_headings":"","what":"Check biconnectedness — is_biconnected","title":"Check biconnectedness — is_biconnected","text":"Tests whether graph biconnected.","code":""},{"path":"https://r.igraph.org/reference/is_biconnected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check biconnectedness — is_biconnected","text":"","code":"is_biconnected(graph)"},{"path":"https://r.igraph.org/reference/is_biconnected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check biconnectedness — is_biconnected","text":"graph input graph. Edge directions ignored.","code":""},{"path":"https://r.igraph.org/reference/is_biconnected.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check biconnectedness — is_biconnected","text":"Logical, TRUE graph biconnected.","code":""},{"path":"https://r.igraph.org/reference/is_biconnected.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check biconnectedness — is_biconnected","text":"graph biconnected removal single vertex (adjacent edges) disconnect . igraph consider single-vertex graphs biconnected. Note authors consider graph consisting two connected vertices biconnected, however, igraph .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_biconnected.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check biconnectedness — is_biconnected","text":"","code":"is_biconnected(make_graph(\"bull\")) #> [1] FALSE is_biconnected(make_graph(\"dodecahedron\")) #> [1] TRUE is_biconnected(make_full_graph(1)) #> [1] FALSE is_biconnected(make_full_graph(2)) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/is_bipartite.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether the graph has a vertex attribute called type. — is_bipartite","title":"Checks whether the graph has a vertex attribute called type. — is_bipartite","text":"check whether graph bipartite mathematical sense. Use bipartite_mapping() .","code":""},{"path":"https://r.igraph.org/reference/is_bipartite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether the graph has a vertex attribute called type. — is_bipartite","text":"","code":"is_bipartite(graph)"},{"path":"https://r.igraph.org/reference/is_bipartite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether the graph has a vertex attribute called type. — is_bipartite","text":"graph input graph","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_chordal.html","id":null,"dir":"Reference","previous_headings":"","what":"Chordality of a graph — is_chordal","title":"Chordality of a graph — is_chordal","text":"graph chordal (triangulated) cycles four nodes chord, edge joining two nodes adjacent cycle. equivalent definition chordless cycles three nodes.","code":""},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Chordality of a graph — is_chordal","text":"","code":"is_chordal( graph, alpha = NULL, alpham1 = NULL, fillin = FALSE, newgraph = FALSE )"},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Chordality of a graph — is_chordal","text":"graph input graph. may directed, edge directions ignored, algorithm defined undirected graphs. alpha Numeric vector, maximal chardinality ordering vertices. NULL, automatically calculated calling max_cardinality(), alpham1 given.. alpham1 Numeric vector, inverse alpha. NULL, automatically calculated calling max_cardinality(), alpha. fillin Logical scalar, whether calculate fill-edges. newgraph Logical scalar, whether calculate triangulated graph.","code":""},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Chordality of a graph — is_chordal","text":"list three members: chordal Logical scalar, TRUE iff input graph chordal. fillin requested, numeric vector giving fill-edges. NULL otherwise. newgraph requested, triangulated graph, igraph object. NULL otherwise.","code":""},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Chordality of a graph — is_chordal","text":"chordality graph decided first performing maximum cardinality search (alpha alpham1 arguments NULL), calculating set fill-edges. set fill-edges empty graph chordal. also true adding fill-edges graph makes chordal.","code":""},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Chordality of a graph — is_chordal","text":"Robert E Tarjan Mihalis Yannakakis. (1984). Simple linear-time algorithms test chordality graphs, test acyclicity hypergraphs, selectively reduce acyclic hypergraphs. SIAM Journal Computation 13, 566–579.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Chordality of a graph — is_chordal","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/is_chordal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Chordality of a graph — is_chordal","text":"","code":"## The examples from the Tarjan-Yannakakis paper g1 <- graph_from_literal( A - B:C:I, B - A:C:D, C - A:B:E:H, D - B:E:F, E - C:D:F:H, F - D:E:G, G - F:H, H - C:E:G:I, I - A:H ) max_cardinality(g1) #> $alpha #> [1] 9 4 6 8 3 5 7 2 1 #> #> $alpham1 #> + 9/9 vertices, named, from 10147ff: #> [1] G F D B E C H I A #> is_chordal(g1, fillin = TRUE) #> $chordal #> [1] FALSE #> #> $fillin #> [1] 2 6 8 7 5 7 2 7 6 1 7 1 #> #> $newgraph #> NULL #> g2 <- graph_from_literal( A - B:E, B - A:E:F:D, C - E:D:G, D - B:F:E:C:G, E - A:B:C:D:F, F - B:D:E, G - C:D:H:I, H - G:I:J, I - G:H:J, J - H:I ) max_cardinality(g2) #> $alpha #> [1] 10 8 9 6 7 5 4 2 3 1 #> #> $alpham1 #> + 10/10 vertices, named, from 6570661: #> [1] J H I G C F D B E A #> is_chordal(g2, fillin = TRUE) #> $chordal #> [1] TRUE #> #> $fillin #> numeric(0) #> #> $newgraph #> NULL #>"},{"path":"https://r.igraph.org/reference/is_dag.html","id":null,"dir":"Reference","previous_headings":"","what":"Directed acyclic graphs — is_dag","title":"Directed acyclic graphs — is_dag","text":"function tests whether given graph DAG, directed acyclic graph.","code":""},{"path":"https://r.igraph.org/reference/is_dag.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Directed acyclic graphs — is_dag","text":"","code":"is_dag(graph)"},{"path":"https://r.igraph.org/reference/is_dag.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Directed acyclic graphs — is_dag","text":"graph input graph. may undirected, case FALSE reported.","code":""},{"path":"https://r.igraph.org/reference/is_dag.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Directed acyclic graphs — is_dag","text":"logical vector length one.","code":""},{"path":"https://r.igraph.org/reference/is_dag.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Directed acyclic graphs — is_dag","text":"is_dag() checks whether directed cycle graph. , graph DAG.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_dag.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Directed acyclic graphs — is_dag","text":"Tamas Nepusz ntamas@gmail.com C code, Gabor Csardi csardi.gabor@gmail.com R interface.","code":""},{"path":"https://r.igraph.org/reference/is_dag.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Directed acyclic graphs — is_dag","text":"","code":"g <- make_tree(10) is_dag(g) #> [1] TRUE g2 <- g + edge(5, 1) is_dag(g2) #> [1] FALSE"},{"path":"https://r.igraph.org/reference/is_degseq.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a degree sequence is valid for a multi-graph — is_degseq","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":"is_degseq() checks whether given vertex degrees (- -degrees directed graphs) can realized graph. Note graph simple, may contain loop multiple edges. undirected graphs, also checks whether sum degrees even. directed graphs, function checks whether lengths two degree vectors equal whether sums also equal. known sufficient necessary conditions degree sequence valid.","code":""},{"path":"https://r.igraph.org/reference/is_degseq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":"","code":"is_degseq(out.deg, in.deg = NULL)"},{"path":"https://r.igraph.org/reference/is_degseq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":".deg Integer vector, degree sequence undirected graphs, -degree sequence directed graphs. .deg NULL integer vector. undirected graphs, NULL. directed graphs specifies -degrees.","code":""},{"path":"https://r.igraph.org/reference/is_degseq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":"logical scalar.","code":""},{"path":"https://r.igraph.org/reference/is_degseq.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":"Z Király, Recognizing graphic degree sequences generating realizations. TR-2011-11, Egerváry Research Group, H-1117, Budapest, Hungary. ISSN 1587-4451 (2012). B. Cloteaux, Real? Fast Graphicality Testing, Comput. Sci. Eng. 17, 91 (2015). . Berger, note characterization digraphic sequences, Discrete Math. 314, 38 (2014). G. Cairns S. Mendan, Degree Sequence Graphs Loops (2013).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_degseq.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":"Tamás Nepusz ntamas@gmail.com Szabolcs Horvát szhorvat@gmail.com","code":""},{"path":"https://r.igraph.org/reference/is_degseq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check if a degree sequence is valid for a multi-graph — is_degseq","text":"","code":"g <- sample_gnp(100, 2 / 100) is_degseq(degree(g)) #> [1] TRUE is_graphical(degree(g)) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/is_directed.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether a graph is directed — is_directed","title":"Check whether a graph is directed — is_directed","text":"Check whether graph directed","code":""},{"path":"https://r.igraph.org/reference/is_directed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether a graph is directed — is_directed","text":"","code":"is_directed(graph)"},{"path":"https://r.igraph.org/reference/is_directed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether a graph is directed — is_directed","text":"graph input graph","code":""},{"path":"https://r.igraph.org/reference/is_directed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check whether a graph is directed — is_directed","text":"Logical scalar, whether graph directed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_directed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check whether a graph is directed — is_directed","text":"","code":"g <- make_ring(10) is_directed(g) #> [1] FALSE g2 <- make_ring(10, directed = TRUE) is_directed(g2) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/is_forest.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide whether a graph is a forest. — is_forest","title":"Decide whether a graph is a forest. — is_forest","text":"is_forest() decides whether graph forest, optionally returns set possible root vertices components.","code":""},{"path":"https://r.igraph.org/reference/is_forest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide whether a graph is a forest. — is_forest","text":"","code":"is_forest(graph, mode = c(\"out\", \"in\", \"all\", \"total\"), details = FALSE)"},{"path":"https://r.igraph.org/reference/is_forest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide whether a graph is a forest. — is_forest","text":"graph igraph graph object mode Whether consider edge directions directed graph. ‘’ ignores edge directions; ‘’ requires edges oriented outwards root, ‘’ requires edges oriented towards root. details Whether return whether graph tree (FALSE) also possible root (TRUE)","code":""},{"path":"https://r.igraph.org/reference/is_forest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decide whether a graph is a forest. — is_forest","text":"details FALSE, logical value indicates whether graph tree. details TRUE, named list two entries: res Logical value indicates whether graph tree. root root vertex tree; undefined graph tree.","code":""},{"path":"https://r.igraph.org/reference/is_forest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Decide whether a graph is a forest. — is_forest","text":"undirected graph forest cycles. directed case, possible additional requirement edges tree oriented away root (-trees arborescences) edges oriented towards root (-trees anti-arborescences). test can controlled using mode parameter. convention, null graph (.e. graph vertices) considered forest.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_forest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decide whether a graph is a forest. — is_forest","text":"","code":"g <- make_tree(3) + make_tree(5,3) is_forest(g) #> [1] TRUE is_forest(g, details = TRUE) #> $res #> [1] TRUE #> #> $roots #> + 2/8 vertices, from 1a838ee: #> [1] 1 4 #>"},{"path":"https://r.igraph.org/reference/is_graphical.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a degree sequence graphical? — is_graphical","title":"Is a degree sequence graphical? — is_graphical","text":"Determine whether given vertex degrees (- -degrees directed graphs) can realized graph.","code":""},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a degree sequence graphical? — is_graphical","text":"","code":"is_graphical( out.deg, in.deg = NULL, allowed.edge.types = c(\"simple\", \"loops\", \"multi\", \"all\") )"},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a degree sequence graphical? — is_graphical","text":".deg Integer vector, degree sequence undirected graphs, -degree sequence directed graphs. .deg NULL integer vector. undirected graphs, NULL. directed graphs specifies -degrees. allowed.edge.types allowed edge types graph. ‘simple’ means neither loop multiple edges allowed (.e. graph must simple). ‘loops’ means loop edges allowed mutiple edges . ‘multi’ means multiple edges allowed loop edges . ‘’ means loop edges multiple edges allowed.","code":""},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a degree sequence graphical? — is_graphical","text":"logical scalar.","code":""},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Is a degree sequence graphical? — is_graphical","text":"classical concept graphicality assumes simple graphs. function can perform check also self-loops, multi-edges, allowed graph.","code":""},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Is a degree sequence graphical? — is_graphical","text":"Hakimi SL: realizability set integers degrees vertices simple graph. J SIAM Appl Math 10:496-506, 1962. PL Erdős, Miklós Z Toroczkai: simple Havel-Hakimi type algorithm realize graphical degree sequences directed graphs. Electronic Journal Combinatorics 17(1):R66, 2010.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Is a degree sequence graphical? — is_graphical","text":"Tamás Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/is_graphical.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is a degree sequence graphical? — is_graphical","text":"","code":"g <- sample_gnp(100, 2 / 100) is_degseq(degree(g)) #> [1] TRUE is_graphical(degree(g)) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/is_igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Is this object an igraph graph? — is_igraph","title":"Is this object an igraph graph? — is_igraph","text":"object igraph graph?","code":""},{"path":"https://r.igraph.org/reference/is_igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is this object an igraph graph? — is_igraph","text":"","code":"is_igraph(graph)"},{"path":"https://r.igraph.org/reference/is_igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is this object an igraph graph? — is_igraph","text":"graph R object.","code":""},{"path":"https://r.igraph.org/reference/is_igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is this object an igraph graph? — is_igraph","text":"logical constant, TRUE argument graph graph object.","code":""},{"path":"https://r.igraph.org/reference/is_igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Is this object an igraph graph? — is_igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/is_igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is this object an igraph graph? — is_igraph","text":"","code":"g <- make_ring(10) is_igraph(g) #> [1] TRUE is_igraph(numeric(10)) #> [1] FALSE"},{"path":"https://r.igraph.org/reference/is_min_separator.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimal vertex separators — is_min_separator","title":"Minimal vertex separators — is_min_separator","text":"Check whether given set vertices minimal vertex separator.","code":""},{"path":"https://r.igraph.org/reference/is_min_separator.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimal vertex separators — is_min_separator","text":"","code":"is_min_separator(graph, candidate)"},{"path":"https://r.igraph.org/reference/is_min_separator.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimal vertex separators — is_min_separator","text":"graph input graph. may directed, edge directions ignored. candidate numeric vector giving vertex ids candidate separator.","code":""},{"path":"https://r.igraph.org/reference/is_min_separator.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimal vertex separators — is_min_separator","text":"logical scalar, whether supplied vertex set (minimal) vertex separator .","code":""},{"path":"https://r.igraph.org/reference/is_min_separator.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minimal vertex separators — is_min_separator","text":"is_min_separator() decides whether supplied vertex set minimal vertex separator. minimal vertex separator vertex separator, none proper subsets vertex separator.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_min_separator.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimal vertex separators — is_min_separator","text":"","code":"# The graph from the Moody-White paper mw <- graph_from_literal( 1 - 2:3:4:5:6, 2 - 3:4:5:7, 3 - 4:6:7, 4 - 5:6:7, 5 - 6:7:21, 6 - 7, 7 - 8:11:14:19, 8 - 9:11:14, 9 - 10, 10 - 12:13, 11 - 12:14, 12 - 16, 13 - 16, 14 - 15, 15 - 16, 17 - 18:19:20, 18 - 20:21, 19 - 20:22:23, 20 - 21, 21 - 22:23, 22 - 23 ) # Cohesive subgraphs mw1 <- induced_subgraph(mw, as.character(c(1:7, 17:23))) mw2 <- induced_subgraph(mw, as.character(7:16)) mw3 <- induced_subgraph(mw, as.character(17:23)) mw4 <- induced_subgraph(mw, as.character(c(7, 8, 11, 14))) mw5 <- induced_subgraph(mw, as.character(1:7)) check.sep <- function(G) { sep <- min_separators(G) sapply(sep, is_min_separator, graph = G) } check.sep(mw) #> [1] TRUE check.sep(mw1) #> [1] TRUE TRUE TRUE TRUE check.sep(mw2) #> [1] TRUE TRUE TRUE check.sep(mw3) #> [1] TRUE check.sep(mw4) #> [1] FALSE FALSE FALSE FALSE check.sep(mw5) #> [1] TRUE TRUE TRUE"},{"path":"https://r.igraph.org/reference/is_named.html","id":null,"dir":"Reference","previous_headings":"","what":"Named graphs — is_named","title":"Named graphs — is_named","text":"igraph graph named, symbolic name associated vertices.","code":""},{"path":"https://r.igraph.org/reference/is_named.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Named graphs — is_named","text":"","code":"is_named(graph)"},{"path":"https://r.igraph.org/reference/is_named.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Named graphs — is_named","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/is_named.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Named graphs — is_named","text":"logical scalar.","code":""},{"path":"https://r.igraph.org/reference/is_named.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Named graphs — is_named","text":"igraph vertices can always identified specified via numeric vertex ids. , however, always convenient, many cases exist symbolic ids correspond vertices. allow flexible identification vertices, one can assign vertex attribute called ‘name’ igraph graph. , symbolic vertex names can used igraph functions, instead numeric ids. Note uniqueness vertex names currently enforced igraph, check , assigning vertex names.","code":""},{"path":"https://r.igraph.org/reference/is_named.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Named graphs — is_named","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/is_named.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Named graphs — is_named","text":"","code":"g <- make_ring(10) is_named(g) #> [1] FALSE V(g)$name <- letters[1:10] is_named(g) #> [1] TRUE neighbors(g, \"a\") #> + 2/10 vertices, named, from 0c83687: #> [1] b j"},{"path":"https://r.igraph.org/reference/is_printer_callback.html","id":null,"dir":"Reference","previous_headings":"","what":"Is this a printer callback? — is_printer_callback","title":"Is this a printer callback? — is_printer_callback","text":"printer callback?","code":""},{"path":"https://r.igraph.org/reference/is_printer_callback.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is this a printer callback? — is_printer_callback","text":"","code":"is_printer_callback(x)"},{"path":"https://r.igraph.org/reference/is_printer_callback.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is this a printer callback? — is_printer_callback","text":"x R object.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_separator.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex separators — is_separator","title":"Vertex separators — is_separator","text":"Check whether given set vertices vertex separator.","code":""},{"path":"https://r.igraph.org/reference/is_separator.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex separators — is_separator","text":"","code":"is_separator(graph, candidate)"},{"path":"https://r.igraph.org/reference/is_separator.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex separators — is_separator","text":"graph input graph. may directed, edge directions ignored. candidate numeric vector giving vertex ids candidate separator.","code":""},{"path":"https://r.igraph.org/reference/is_separator.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Vertex separators — is_separator","text":"logical scalar, whether supplied vertex set (minimal) vertex separator . lists vertex separator minimum size.","code":""},{"path":"https://r.igraph.org/reference/is_separator.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Vertex separators — is_separator","text":"is_separator() decides whether supplied vertex set vertex separator. vertex set vertex separator removal results disconnected graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide whether a graph is a tree. — is_tree","title":"Decide whether a graph is a tree. — is_tree","text":"is_tree() decides whether graph tree, optionally returns possible root vertex graph tree.","code":""},{"path":"https://r.igraph.org/reference/is_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide whether a graph is a tree. — is_tree","text":"","code":"is_tree(graph, mode = c(\"out\", \"in\", \"all\", \"total\"), details = FALSE)"},{"path":"https://r.igraph.org/reference/is_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide whether a graph is a tree. — is_tree","text":"graph igraph graph object mode Whether consider edge directions directed graph. ‘’ ignores edge directions; ‘’ requires edges oriented outwards root, ‘’ requires edges oriented towards root. details Whether return whether graph tree (FALSE) also possible root (TRUE)","code":""},{"path":"https://r.igraph.org/reference/is_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decide whether a graph is a tree. — is_tree","text":"details FALSE, logical value indicates whether graph tree. details TRUE, named list two entries: res Logical value indicates whether graph tree. root root vertex tree; undefined graph tree.","code":""},{"path":"https://r.igraph.org/reference/is_tree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Decide whether a graph is a tree. — is_tree","text":"undirected graph tree connected cycles. directed case, possible additional requirement edges oriented away root (-tree arborescence) edges oriented towards root (-tree anti-arborescence). test can controlled using mode parameter. convention, null graph (.e. graph vertices) considered tree.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/is_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decide whether a graph is a tree. — is_tree","text":"","code":"g <- make_tree(7, 2) is_tree(g) #> [1] TRUE is_tree(g, details = TRUE) #> $res #> [1] TRUE #> #> $root #> + 1/7 vertex, from 0ac5340: #> [1] 1 #>"},{"path":"https://r.igraph.org/reference/is_weighted.html","id":null,"dir":"Reference","previous_headings":"","what":"Weighted graphs — is_weighted","title":"Weighted graphs — is_weighted","text":"weighted graphs, real number assigned (directed undirected) edge.","code":""},{"path":"https://r.igraph.org/reference/is_weighted.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Weighted graphs — is_weighted","text":"","code":"is_weighted(graph)"},{"path":"https://r.igraph.org/reference/is_weighted.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Weighted graphs — is_weighted","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/is_weighted.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Weighted graphs — is_weighted","text":"logical scalar.","code":""},{"path":"https://r.igraph.org/reference/is_weighted.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Weighted graphs — is_weighted","text":"igraph edge weights represented via edge attribute, called ‘weight’. is_weighted() function checks attribute exists. (even checks numeric edge attribute.) Edge weights used different purposes different functions. E.g. shortest path functions use cost path; community finding methods use strength relationship two vertices, etc. Check manual pages functions working weighted graphs details.","code":""},{"path":"https://r.igraph.org/reference/is_weighted.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Weighted graphs — is_weighted","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/is_weighted.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Weighted graphs — is_weighted","text":"","code":"g <- make_ring(10) shortest_paths(g, 8, 2) #> $vpath #> $vpath[[1]] #> + 5/10 vertices, from 0fb08de: #> [1] 8 9 10 1 2 #> #> #> $epath #> NULL #> #> $predecessors #> NULL #> #> $inbound_edges #> NULL #> E(g)$weight <- seq_len(ecount(g)) shortest_paths(g, 8, 2) #> $vpath #> $vpath[[1]] #> + 7/10 vertices, from 0fb08de: #> [1] 8 7 6 5 4 3 2 #> #> #> $epath #> NULL #> #> $predecessors #> NULL #> #> $inbound_edges #> NULL #>"},{"path":"https://r.igraph.org/reference/isomorphic.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide if two graphs are isomorphic — isomorphic","title":"Decide if two graphs are isomorphic — isomorphic","text":"Decide two graphs isomorphic","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide if two graphs are isomorphic — isomorphic","text":"","code":"isomorphic(graph1, graph2, method = c(\"auto\", \"direct\", \"vf2\", \"bliss\"), ...) is_isomorphic_to( graph1, graph2, method = c(\"auto\", \"direct\", \"vf2\", \"bliss\"), ... )"},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide if two graphs are isomorphic — isomorphic","text":"graph1 first graph. graph2 second graph. method method use. Possible values: ‘auto’, ‘direct’, ‘vf2’, ‘bliss’. See details . ... Additional arguments, passed various methods.","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decide if two graphs are isomorphic — isomorphic","text":"Logical scalar, TRUE graphs isomorphic.","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"-auto-method","dir":"Reference","previous_headings":"","what":"‘auto’ method","title":"Decide if two graphs are isomorphic — isomorphic","text":"tries select appropriate method based two graphs. algorithm uses: two graphs agree order size (.e. number vertices edges), return FALSE. graphs three four vertices, ‘direct’ method used. graphs directed, ‘vf2’ method used. Otherwise ‘bliss’ method used.","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"-direct-method","dir":"Reference","previous_headings":"","what":"‘direct’ method","title":"Decide if two graphs are isomorphic — isomorphic","text":"method works graphs three four vertices, based pre-calculated stored table. extra arguments.","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"-vf-method","dir":"Reference","previous_headings":"","what":"‘vf2’ method","title":"Decide if two graphs are isomorphic — isomorphic","text":"method uses VF2 algorithm Cordella, Foggia et al., see references . supports vertex edge colors following extra arguments: vertex.color1, vertex.color2 Optional integer vectors giving colors vertices colored graph isomorphism. given, graph “color” vertex attribute, used. want ignore attributes, supply NULL arguments. See also examples . edge.color1, edge.color2 Optional integer vectors giving colors edges edge-colored (sub)graph isomorphism. given, graph “color” edge attribute, used. want ignore attributes, supply NULL arguments.","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"-bliss-method","dir":"Reference","previous_headings":"","what":"‘bliss’ method","title":"Decide if two graphs are isomorphic — isomorphic","text":"Uses BLISS algorithm Junttila Kaski, works undirected graphs. graphs canonical_permutation() permute() function called transfer canonical form; finally canonical forms compared. Extra arguments: sh Character constant, heuristics use BLISS algorithm graph1 graph2. See sh argument canonical_permutation() possible values. sh defaults ‘fm’.","code":""},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Decide if two graphs are isomorphic — isomorphic","text":"Tommi Junttila Petteri Kaski: Engineering Efficient Canonical Labeling Tool Large Sparse Graphs, Proceedings Ninth Workshop Algorithm Engineering Experiments Fourth Workshop Analytic Algorithms Combinatorics. 2007. LP Cordella, P Foggia, C Sansone, M Vento: improved algorithm matching large graphs, Proc. 3rd IAPR TC-15 Workshop Graphbased Representations Pattern Recognition, 149–159, 2001.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/isomorphic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decide if two graphs are isomorphic — isomorphic","text":"","code":"# create some non-isomorphic graphs g1 <- graph_from_isomorphism_class(3, 10) g2 <- graph_from_isomorphism_class(3, 11) isomorphic(g1, g2) #> [1] FALSE # create two isomorphic graphs, by permuting the vertices of the first g1 <- sample_pa(30, m = 2, directed = FALSE) g2 <- permute(g1, sample(vcount(g1))) # should be TRUE isomorphic(g1, g2) #> [1] TRUE isomorphic(g1, g2, method = \"bliss\") #> [1] TRUE isomorphic(g1, g2, method = \"vf2\") #> [1] TRUE # colored graph isomorphism g1 <- make_ring(10) g2 <- make_ring(10) isomorphic(g1, g2) #> [1] TRUE V(g1)$color <- rep(1:2, length = vcount(g1)) V(g2)$color <- rep(2:1, length = vcount(g2)) # consider colors by default count_isomorphisms(g1, g2) #> [1] 10 # ignore colors count_isomorphisms(g1, g2, vertex.color1 = NULL, vertex.color2 = NULL ) #> [1] 20"},{"path":"https://r.igraph.org/reference/isomorphism_class.html","id":null,"dir":"Reference","previous_headings":"","what":"Isomorphism class of a graph — isomorphism_class","title":"Isomorphism class of a graph — isomorphism_class","text":"isomorphism class non-negative integer number. Graphs (number vertices) isomorphism class isomorphic isomorphic graphs always isomorphism class. Currently can handle directed graphs 3 4 vertices undirected graphs 3 6 vertices.","code":""},{"path":"https://r.igraph.org/reference/isomorphism_class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Isomorphism class of a graph — isomorphism_class","text":"","code":"isomorphism_class(graph, v)"},{"path":"https://r.igraph.org/reference/isomorphism_class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Isomorphism class of a graph — isomorphism_class","text":"graph input graph. v Optionally vertex sequence. missing, induced subgraph input graph, consisting vertices, used.","code":""},{"path":"https://r.igraph.org/reference/isomorphism_class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Isomorphism class of a graph — isomorphism_class","text":"integer number.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/isomorphism_class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Isomorphism class of a graph — isomorphism_class","text":"","code":"# create some non-isomorphic graphs g1 <- graph_from_isomorphism_class(3, 10) g2 <- graph_from_isomorphism_class(3, 11) isomorphism_class(g1) #> [1] 10 isomorphism_class(g2) #> [1] 11 isomorphic(g1, g2) #> [1] FALSE"},{"path":"https://r.igraph.org/reference/isomorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate all isomorphic mappings between the vertices of two graphs — isomorphisms","title":"Calculate all isomorphic mappings between the vertices of two graphs — isomorphisms","text":"Calculate isomorphic mappings vertices two graphs","code":""},{"path":"https://r.igraph.org/reference/isomorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate all isomorphic mappings between the vertices of two graphs — isomorphisms","text":"","code":"isomorphisms(graph1, graph2, method = \"vf2\", ...)"},{"path":"https://r.igraph.org/reference/isomorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate all isomorphic mappings between the vertices of two graphs — isomorphisms","text":"graph1 first graph. graph2 second graph. method Currently ‘vf2’ supported, see isomorphic() details extra arguments. ... Extra arguments, passed various methods.","code":""},{"path":"https://r.igraph.org/reference/isomorphisms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate all isomorphic mappings between the vertices of two graphs — isomorphisms","text":"list vertex sequences, corresponding mappings first graph second.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/ivs.html","id":null,"dir":"Reference","previous_headings":"","what":"Independent vertex sets — ivs","title":"Independent vertex sets — ivs","text":"vertex set called independent edges two vertices . functions find independent vertex sets undirected graphs","code":""},{"path":"https://r.igraph.org/reference/ivs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Independent vertex sets — ivs","text":"","code":"ivs(graph, min = NULL, max = NULL) largest_ivs(graph) maximal_ivs(graph) ivs_size(graph)"},{"path":"https://r.igraph.org/reference/ivs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Independent vertex sets — ivs","text":"graph input graph, directed graphs considered undirected, loop edges multiple edges ignored. min Numeric constant, limit minimum size independent vertex sets find. NULL means limit. max Numeric constant, limit maximum size independent vertex sets find. NULL means limit.","code":""},{"path":"https://r.igraph.org/reference/ivs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Independent vertex sets — ivs","text":"ivs(), largest_ivs() maximal_ivs() return list containing numeric vertex ids, list element independent vertex set. ivs_size() returns integer constant.","code":""},{"path":"https://r.igraph.org/reference/ivs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Independent vertex sets — ivs","text":"ivs() finds independent vertex sets network, obeying size limitations given min max arguments. largest_ivs() finds largest independent vertex sets graph. independent vertex set largest independent vertex set vertices. maximal_ivs() finds maximal independent vertex sets graph. independent vertex set maximal extended larger independent vertex set. largest independent vertex sets maximal, opposite always true. ivs_size() calculate size largest independent vertex set(s). functions use algorithm described Tsukiyama et al., see reference .","code":""},{"path":"https://r.igraph.org/reference/ivs.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Independent vertex sets — ivs","text":"S. Tsukiyama, M. Ide, H. Ariyoshi . Shirawaka. new algorithm generating maximal independent sets. SIAM J Computing, 6:505–517, 1977.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/ivs.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Independent vertex sets — ivs","text":"Tamas Nepusz ntamas@gmail.com ported Nauty Graph Library Keith Briggs (http://keithbriggs.info/) Gabor Csardi csardi.gabor@gmail.com wrote R interface manual page.","code":""},{"path":"https://r.igraph.org/reference/ivs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Independent vertex sets — ivs","text":"","code":"# Do not run, takes a couple of seconds # A quite dense graph set.seed(42) g <- sample_gnp(100, 0.9) ivs_size(g) #> [1] 4 ivs(g, min = ivs_size(g)) #> [[1]] #> + 4/100 vertices, from b30b646: #> [1] 7 37 55 56 #> #> [[2]] #> + 4/100 vertices, from b30b646: #> [1] 7 55 56 69 #> #> [[3]] #> + 4/100 vertices, from b30b646: #> [1] 7 56 69 74 #> #> [[4]] #> + 4/100 vertices, from b30b646: #> [1] 8 15 73 80 #> #> [[5]] #> + 4/100 vertices, from b30b646: #> [1] 8 15 73 84 #> #> [[6]] #> + 4/100 vertices, from b30b646: #> [1] 13 16 37 40 #> #> [[7]] #> + 4/100 vertices, from b30b646: #> [1] 21 32 45 61 #> #> [[8]] #> + 4/100 vertices, from b30b646: #> [1] 22 55 56 64 #> #> [[9]] #> + 4/100 vertices, from b30b646: #> [1] 23 69 75 90 #> largest_ivs(g) #> [[1]] #> + 4/100 vertices, from b30b646: #> [1] 21 32 45 61 #> #> [[2]] #> + 4/100 vertices, from b30b646: #> [1] 7 37 55 56 #> #> [[3]] #> + 4/100 vertices, from b30b646: #> [1] 7 55 56 69 #> #> [[4]] #> + 4/100 vertices, from b30b646: #> [1] 7 56 69 74 #> #> [[5]] #> + 4/100 vertices, from b30b646: #> [1] 8 15 73 80 #> #> [[6]] #> + 4/100 vertices, from b30b646: #> [1] 8 15 73 84 #> #> [[7]] #> + 4/100 vertices, from b30b646: #> [1] 22 55 56 64 #> #> [[8]] #> + 4/100 vertices, from b30b646: #> [1] 23 69 75 90 #> #> [[9]] #> + 4/100 vertices, from b30b646: #> [1] 13 16 37 40 #> # Empty graph induced_subgraph(g, largest_ivs(g)[[1]]) #> IGRAPH 88ee735 U--- 4 0 -- Erdos-Renyi (gnp) graph #> + attr: name (g/c), type (g/c), loops (g/l), p (g/n) #> + edges from 88ee735: length(maximal_ivs(g)) #> [1] 326"},{"path":"https://r.igraph.org/reference/k.regular.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a random regular graph — k.regular.game","title":"Create a random regular graph — k.regular.game","text":"k.regular.game() renamed sample_k_regular() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/k.regular.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a random regular graph — k.regular.game","text":"","code":"k.regular.game(no.of.nodes, k, directed = FALSE, multiple = FALSE)"},{"path":"https://r.igraph.org/reference/k.regular.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a random regular graph — k.regular.game","text":"..nodes Integer scalar, number vertices generated graph. k Integer scalar, degree vertex graph, -degree -degree directed graph. directed Logical scalar, whether create directed graph. multiple Logical scalar, whether multiple edges allowed.","code":""},{"path":"https://r.igraph.org/reference/k_shortest_paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the \\(k\\) shortest paths between two vertices — k_shortest_paths","title":"Find the \\(k\\) shortest paths between two vertices — k_shortest_paths","text":"Finds \\(k\\) shortest paths given source target vertex order increasing length. Currently function uses Yen's algorithm.","code":""},{"path":"https://r.igraph.org/reference/k_shortest_paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the \\(k\\) shortest paths between two vertices — k_shortest_paths","text":"","code":"k_shortest_paths( graph, from, to, ..., k, weights = NULL, mode = c(\"out\", \"in\", \"all\", \"total\") )"},{"path":"https://r.igraph.org/reference/k_shortest_paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the \\(k\\) shortest paths between two vertices — k_shortest_paths","text":"graph input graph. source vertex shortest paths. target vertex shortest paths. ... dots future extensions must empty. k number paths find. returned order increasing length. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, corresponding undirected graph used, .e. directed paths searched. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/k_shortest_paths.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the \\(k\\) shortest paths between two vertices — k_shortest_paths","text":"named list two components returned: vpaths list \\(k\\) shortest paths terms vertices epaths list \\(k\\) shortest paths terms edges","code":""},{"path":"https://r.igraph.org/reference/k_shortest_paths.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Find the \\(k\\) shortest paths between two vertices — k_shortest_paths","text":"Yen, Jin Y.: algorithm finding shortest routes source nodes given destination general networks. Quarterly Applied Mathematics. 27 (4): 526–530. (1970) doi:10.1090/qam/253822","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/keeping_degseq.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph rewiring while preserving the degree distribution — keeping_degseq","title":"Graph rewiring while preserving the degree distribution — keeping_degseq","text":"function can used together rewire() randomly rewire edges preserving original graph's degree distribution.","code":""},{"path":"https://r.igraph.org/reference/keeping_degseq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph rewiring while preserving the degree distribution — keeping_degseq","text":"","code":"keeping_degseq(loops = FALSE, niter = 100)"},{"path":"https://r.igraph.org/reference/keeping_degseq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph rewiring while preserving the degree distribution — keeping_degseq","text":"loops Whether allow destroying creating loop edges. niter Number rewiring trials perform.","code":""},{"path":"https://r.igraph.org/reference/keeping_degseq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph rewiring while preserving the degree distribution — keeping_degseq","text":"rewiring algorithm chooses two arbitrary edges step ((,b) (c,d)) substitutes (,d) (c,b), already exists graph. algorithm create multiple edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/keeping_degseq.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph rewiring while preserving the degree distribution — keeping_degseq","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/keeping_degseq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph rewiring while preserving the degree distribution — keeping_degseq","text":"","code":"g <- make_ring(10) g %>% rewire(keeping_degseq(niter = 20)) %>% degree() #> [1] 2 2 2 2 2 2 2 2 2 2 print_all(rewire(g, with = keeping_degseq(niter = vcount(g) * 10))) #> IGRAPH a27951f U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + graph attributes: #> | + name: #> | [1] \"Ring graph\" #> | + mutual: #> | [1] FALSE #> | + circular: #> | [1] TRUE #> + edges from a27951f: #> [1] 2-- 8 3-- 7 6-- 9 4-- 5 5--10 1-- 7 6--10 2-- 3 4-- 9 1-- 8"},{"path":"https://r.igraph.org/reference/knn.html","id":null,"dir":"Reference","previous_headings":"","what":"Average nearest neighbor degree — knn","title":"Average nearest neighbor degree — knn","text":"Calculate average nearest neighbor degree given vertices quantity function vertex degree","code":""},{"path":"https://r.igraph.org/reference/knn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average nearest neighbor degree — knn","text":"","code":"knn( graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), neighbor.degree.mode = c(\"all\", \"out\", \"in\", \"total\"), weights = NULL )"},{"path":"https://r.igraph.org/reference/knn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average nearest neighbor degree — knn","text":"graph input graph. may directed. vids vertices calculation performed. Normally includes vertices. Note, vertices given , ‘knn’ ‘knnk’ calculated based given vertices . mode Character constant indicate type neighbors consider directed graphs. considers -neighbors, considers -neighbors ignores edge directions. neighbor.degree.mode type degree average directed graphs. averages -degrees, averages -degrees ignores edge directions degree calculation. weights Weight vector. graph weight edge attribute, used default. argument given, vertex strength (see strength()) used instead vertex degree. note knnk still given function normal vertex degree. Weights used calculate weighted degree (also called strength()) instead degree.","code":""},{"path":"https://r.igraph.org/reference/knn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average nearest neighbor degree — knn","text":"list two members: knn numeric vector giving average nearest neighbor degree vertices vids. knnk numeric vector, length maximum (total) vertex degree graph. first element average nearest neighbor degree vertices degree one, etc.","code":""},{"path":"https://r.igraph.org/reference/knn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Average nearest neighbor degree — knn","text":"Note zero degree vertices answer ‘knn’ NaN (zero divided zero), true ‘knnk’ given degree never appears network. weighted version computes weighted average neighbor degrees $$k_{nn,u} = \\frac{1}{s_u} \\sum_v w_{uv} k_v,$$ \\(s_u = \\sum_v w_{uv}\\) sum incident edge weights vertex u, .e. strength. sum runs neighbors v vertex u indicated mode. \\(w_{uv}\\) denotes weighted adjacency matrix \\(k_v\\) neighbors' degree, specified neighbor_degree_mode.","code":""},{"path":"https://r.igraph.org/reference/knn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Average nearest neighbor degree — knn","text":"Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras, Alessandro Vespignani: architecture complex weighted networks, Proc. Natl. Acad. Sci. USA 101, 3747 (2004)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/knn.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Average nearest neighbor degree — knn","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/knn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Average nearest neighbor degree — knn","text":"","code":"# Some trivial ones g <- make_ring(10) knn(g) #> $knn #> [1] 2 2 2 2 2 2 2 2 2 2 #> #> $knnk #> [1] NaN 2 #> g2 <- make_star(10) knn(g2) #> $knn #> [1] 1 9 9 9 9 9 9 9 9 9 #> #> $knnk #> [1] 9 NaN NaN NaN NaN NaN NaN NaN 1 #> # A scale-free one, try to plot 'knnk' g3 <- sample_pa(1000, m = 5) knn(g3) #> $knn #> [1] 14.926154 15.804348 13.437500 15.336700 16.507092 15.849817 #> [7] 25.950000 66.230769 16.280423 19.182432 24.094737 49.942857 #> [13] 190.285714 32.551724 25.250000 16.939394 63.368421 20.520000 #> [19] 69.045455 52.518519 263.400000 49.160000 63.428571 19.065217 #> [25] 88.266667 91.800000 44.638889 151.400000 21.871429 32.865385 #> [31] 57.400000 146.222222 110.666667 16.471429 78.933333 102.166667 #> [37] 29.595745 37.750000 43.633333 47.323529 60.550000 216.500000 #> [43] 76.200000 90.166667 32.964286 39.032258 56.954545 43.655172 #> [49] 40.628571 59.642857 48.965517 54.176471 68.066667 82.875000 #> [55] 107.600000 67.666667 68.428571 33.888889 52.166667 96.400000 #> [61] 101.937500 131.000000 255.400000 206.500000 136.200000 50.258065 #> [67] 51.125000 31.181818 41.526316 30.888889 138.250000 143.333333 #> [73] 42.354839 46.090909 57.800000 55.600000 29.416667 156.875000 #> [79] 187.333333 114.833333 119.714286 80.200000 94.000000 36.250000 #> [85] 59.200000 163.200000 115.583333 237.200000 92.777778 35.037037 #> [91] 63.600000 87.636364 48.900000 111.571429 86.500000 51.071429 #> [97] 251.400000 81.375000 184.000000 144.600000 73.000000 86.153846 #> [103] 45.818182 76.142857 127.888889 204.000000 268.000000 245.500000 #> [109] 109.800000 180.666667 111.000000 202.600000 221.333333 197.600000 #> [115] 88.000000 99.888889 186.666667 177.428571 182.400000 172.800000 #> [121] 172.000000 184.166667 106.153846 101.600000 120.142857 125.666667 #> [127] 170.000000 46.105263 79.666667 28.756757 123.166667 133.800000 #> [133] 77.062500 80.071429 148.750000 224.000000 163.875000 96.833333 #> [139] 64.733333 96.250000 74.214286 80.333333 213.500000 66.647059 #> [145] 30.875000 136.444444 34.444444 67.272727 23.307692 233.000000 #> [151] 113.200000 143.625000 89.272727 64.761905 84.000000 35.066667 #> [157] 94.500000 74.750000 84.000000 107.600000 98.375000 59.421053 #> [163] 185.200000 170.571429 207.666667 45.200000 171.571429 175.500000 #> [169] 60.714286 139.142857 75.714286 120.000000 139.777778 262.800000 #> [175] 59.090909 77.142857 175.800000 155.600000 83.400000 75.111111 #> [181] 116.300000 135.750000 156.125000 134.800000 61.833333 163.833333 #> [187] 82.888889 60.384615 59.700000 163.142857 137.285714 125.000000 #> [193] 105.142857 35.952381 171.400000 165.000000 65.947368 135.333333 #> [199] 57.428571 67.500000 248.200000 19.285714 161.000000 120.600000 #> [205] 151.857143 102.000000 235.000000 117.000000 116.714286 213.666667 #> [211] 127.142857 117.200000 224.400000 214.000000 97.000000 129.666667 #> [217] 40.777778 140.428571 113.222222 258.000000 124.200000 39.222222 #> [223] 156.000000 107.000000 83.100000 244.600000 102.800000 71.000000 #> [229] 176.400000 201.200000 192.400000 182.200000 125.200000 54.600000 #> [235] 44.800000 80.000000 117.000000 61.692308 32.800000 44.307692 #> [241] 135.666667 44.125000 171.000000 112.555556 83.000000 86.222222 #> [247] 135.000000 38.750000 52.600000 156.800000 65.000000 107.500000 #> [253] 84.090909 34.000000 113.833333 59.454545 125.500000 91.750000 #> [259] 90.800000 145.600000 128.000000 108.125000 57.400000 94.250000 #> [265] 99.875000 57.909091 54.142857 62.500000 55.555556 72.333333 #> [271] 95.285714 213.000000 128.625000 257.600000 125.666667 198.400000 #> [277] 76.625000 48.428571 105.200000 118.875000 78.400000 114.428571 #> [283] 121.000000 116.400000 96.142857 189.400000 170.000000 60.375000 #> [289] 254.000000 150.600000 162.000000 194.800000 122.666667 134.200000 #> [295] 115.833333 110.714286 217.800000 100.000000 134.714286 12.562500 #> [301] 159.000000 81.090909 66.285714 142.600000 113.400000 43.272727 #> [307] 143.000000 161.000000 64.166667 202.000000 60.166667 63.125000 #> [313] 123.500000 52.000000 177.000000 69.200000 138.800000 102.666667 #> [319] 153.333333 259.000000 64.750000 144.000000 52.000000 25.571429 #> [325] 91.000000 58.133333 110.800000 68.888889 158.400000 175.800000 #> [331] 104.875000 171.600000 155.857143 202.200000 151.200000 86.625000 #> [337] 99.285714 131.833333 190.800000 74.111111 136.166667 135.000000 #> [343] 88.857143 67.500000 168.285714 108.166667 70.857143 34.000000 #> [349] 103.600000 58.100000 91.833333 111.000000 57.000000 207.600000 #> [355] 140.200000 164.000000 90.166667 149.600000 87.500000 160.400000 #> [361] 186.000000 137.000000 204.000000 104.571429 121.800000 49.111111 #> [367] 36.714286 129.400000 116.800000 116.714286 51.571429 64.833333 #> [373] 129.400000 259.800000 110.714286 62.545455 248.400000 155.200000 #> [379] 204.666667 175.333333 145.000000 91.500000 151.000000 196.800000 #> [385] 101.400000 148.600000 124.857143 91.142857 200.400000 123.400000 #> [391] 150.200000 107.571429 97.333333 69.428571 105.000000 112.875000 #> [397] 187.500000 47.285714 97.666667 154.200000 143.166667 116.666667 #> [403] 106.400000 61.083333 67.571429 144.142857 101.400000 55.333333 #> [409] 99.000000 95.600000 167.166667 116.800000 43.200000 173.571429 #> [415] 102.200000 127.500000 186.833333 138.000000 87.000000 139.285714 #> [421] 172.800000 167.200000 136.000000 180.200000 131.333333 142.600000 #> [427] 131.800000 77.000000 165.428571 122.000000 138.333333 68.111111 #> [433] 59.600000 244.600000 181.600000 157.800000 75.571429 91.333333 #> [439] 65.875000 122.500000 140.000000 153.600000 150.800000 105.875000 #> [445] 66.000000 202.000000 86.750000 18.166667 129.000000 222.400000 #> [451] 196.600000 87.166667 120.200000 187.714286 87.714286 51.000000 #> [457] 214.000000 170.400000 132.200000 142.200000 121.200000 111.428571 #> [463] 192.000000 62.000000 107.400000 179.000000 118.750000 95.000000 #> [469] 116.400000 107.000000 124.500000 95.400000 204.800000 59.375000 #> [475] 121.800000 125.000000 86.250000 76.000000 144.800000 123.333333 #> [481] 70.615385 89.000000 112.200000 81.000000 232.600000 168.800000 #> [487] 144.285714 110.714286 103.285714 163.333333 179.800000 135.200000 #> [493] 111.333333 129.400000 109.714286 129.285714 226.800000 208.000000 #> [499] 127.833333 200.000000 44.833333 89.666667 157.600000 114.400000 #> [505] 50.333333 105.333333 161.500000 122.833333 143.200000 126.800000 #> [511] 169.800000 176.142857 123.600000 42.000000 75.400000 83.500000 #> [517] 150.800000 155.800000 192.000000 79.000000 92.200000 146.600000 #> [523] 77.200000 88.000000 218.800000 73.000000 165.666667 126.800000 #> [529] 87.800000 92.800000 60.250000 62.000000 151.200000 50.222222 #> [535] 99.857143 177.666667 127.800000 123.800000 192.600000 142.800000 #> [541] 102.400000 194.400000 89.000000 130.800000 150.000000 75.200000 #> [547] 100.600000 142.285714 243.800000 141.000000 143.500000 137.000000 #> [553] 121.600000 162.400000 129.500000 29.500000 78.666667 239.800000 #> [559] 41.428571 103.285714 126.600000 134.714286 178.800000 213.600000 #> [565] 52.888889 147.400000 102.600000 206.714286 124.000000 125.166667 #> [571] 134.200000 108.833333 205.800000 151.000000 139.500000 148.600000 #> [577] 158.000000 152.166667 237.400000 145.428571 110.142857 91.428571 #> [583] 147.000000 53.600000 164.200000 107.800000 147.400000 84.000000 #> [589] 147.666667 104.200000 74.625000 91.333333 183.800000 114.200000 #> [595] 163.500000 87.166667 50.600000 194.800000 31.800000 87.600000 #> [601] 144.000000 177.200000 170.800000 171.166667 252.800000 261.400000 #> [607] 196.600000 94.200000 122.600000 212.800000 113.200000 187.200000 #> [613] 140.000000 43.800000 114.500000 272.400000 160.800000 129.285714 #> [619] 192.166667 118.200000 141.800000 130.000000 217.800000 210.600000 #> [625] 79.333333 54.000000 137.600000 167.000000 122.000000 121.285714 #> [631] 155.000000 175.800000 238.200000 76.200000 98.800000 121.400000 #> [637] 187.600000 137.600000 130.200000 104.166667 106.400000 15.400000 #> [643] 271.800000 217.600000 146.000000 64.142857 79.400000 157.000000 #> [649] 117.400000 234.200000 56.600000 147.200000 115.800000 199.000000 #> [655] 43.800000 95.571429 183.285714 18.833333 147.000000 38.800000 #> [661] 249.400000 75.800000 177.600000 157.666667 159.600000 137.125000 #> [667] 109.285714 74.600000 237.333333 30.000000 147.000000 63.600000 #> [673] 65.800000 118.800000 128.500000 139.600000 215.000000 116.666667 #> [679] 17.800000 204.800000 43.333333 135.500000 118.600000 146.800000 #> [685] 122.625000 102.000000 194.000000 141.400000 220.400000 205.800000 #> [691] 122.000000 201.200000 28.571429 89.800000 207.200000 93.777778 #> [697] 140.000000 118.833333 77.428571 119.800000 189.600000 146.666667 #> [703] 62.000000 45.000000 40.200000 67.600000 148.800000 68.000000 #> [709] 60.500000 201.000000 128.166667 158.000000 87.166667 168.000000 #> [715] 27.400000 13.800000 126.714286 72.833333 94.600000 158.000000 #> [721] 140.800000 205.200000 202.600000 216.200000 113.333333 184.333333 #> [727] 140.200000 64.000000 69.833333 112.500000 74.400000 157.400000 #> [733] 167.000000 85.500000 84.714286 28.000000 106.600000 166.833333 #> [739] 105.000000 14.400000 155.400000 215.000000 72.200000 133.200000 #> [745] 81.800000 117.200000 91.400000 80.000000 117.666667 119.800000 #> [751] 103.200000 145.400000 118.800000 144.200000 245.400000 52.000000 #> [757] 13.600000 143.800000 138.000000 94.600000 158.200000 207.200000 #> [763] 167.000000 104.200000 75.833333 99.800000 150.600000 242.600000 #> [769] 114.000000 114.714286 65.400000 53.000000 111.200000 173.333333 #> [775] 52.000000 74.800000 109.000000 73.500000 145.000000 62.000000 #> [781] 150.600000 245.000000 59.000000 98.000000 169.200000 64.200000 #> [787] 78.333333 167.400000 170.666667 170.200000 174.200000 176.400000 #> [793] 104.000000 126.200000 41.400000 148.800000 147.400000 93.000000 #> [799] 188.800000 105.600000 80.200000 194.200000 85.200000 126.200000 #> [805] 28.800000 160.800000 74.000000 50.800000 54.333333 98.166667 #> [811] 178.000000 42.000000 70.666667 141.200000 252.000000 311.000000 #> [817] 19.800000 11.333333 143.600000 201.000000 175.600000 143.166667 #> [823] 219.800000 248.800000 129.200000 111.200000 219.400000 113.800000 #> [829] 34.200000 85.333333 149.800000 118.200000 186.400000 177.600000 #> [835] 124.200000 172.800000 184.000000 101.200000 114.000000 15.000000 #> [841] 120.600000 93.400000 170.200000 82.200000 99.800000 186.800000 #> [847] 29.000000 53.000000 174.000000 48.600000 87.800000 185.166667 #> [853] 9.857143 174.000000 83.800000 110.800000 166.400000 123.333333 #> [859] 141.600000 71.200000 174.800000 133.600000 149.000000 215.600000 #> [865] 136.166667 128.600000 124.200000 100.800000 254.200000 50.600000 #> [871] 158.600000 97.000000 174.000000 174.200000 143.000000 20.400000 #> [877] 124.400000 32.000000 92.800000 105.400000 80.600000 34.166667 #> [883] 99.400000 61.400000 146.400000 204.000000 71.000000 101.000000 #> [889] 121.000000 20.800000 191.400000 119.600000 35.800000 70.800000 #> [895] 122.200000 126.000000 70.800000 120.200000 85.000000 122.600000 #> [901] 79.800000 221.600000 34.600000 68.666667 157.600000 70.000000 #> [907] 84.400000 28.600000 109.800000 146.800000 64.800000 141.800000 #> [913] 61.000000 246.200000 174.600000 112.200000 103.200000 138.800000 #> [919] 109.600000 83.600000 71.000000 121.000000 156.600000 112.400000 #> [925] 196.600000 136.600000 202.600000 104.833333 131.200000 220.400000 #> [931] 97.400000 151.600000 87.400000 194.000000 174.600000 84.000000 #> [937] 51.800000 194.200000 93.400000 184.600000 117.666667 222.600000 #> [943] 138.800000 99.400000 221.400000 87.000000 134.400000 144.200000 #> [949] 52.000000 189.200000 185.800000 122.200000 109.285714 127.600000 #> [955] 78.600000 27.400000 218.400000 22.400000 119.200000 175.400000 #> [961] 93.800000 80.200000 120.000000 135.400000 89.400000 84.400000 #> [967] 63.600000 80.200000 105.833333 25.400000 212.600000 140.000000 #> [973] 184.000000 270.600000 163.000000 233.600000 183.200000 201.000000 #> [979] 156.200000 16.800000 104.000000 102.800000 158.400000 39.600000 #> [985] 89.600000 65.000000 142.600000 22.166667 65.400000 157.600000 #> [991] 209.800000 135.800000 118.200000 71.200000 122.800000 8.200000 #> [997] 81.200000 53.000000 74.000000 104.600000 #> #> $knnk #> [1] NaN NaN NaN NaN 137.53050 123.76667 108.61516 #> [8] 99.74219 85.68199 85.30000 65.78788 73.07292 65.70192 69.49107 #> [15] 70.68889 60.76250 60.41176 59.91667 55.27368 55.01667 54.71429 #> [22] 50.81818 NaN 51.12500 49.16000 66.23077 38.08333 35.65476 #> [29] 46.31034 50.51667 43.88172 NaN NaN 47.32353 45.28571 #> [36] 44.63889 28.75676 NaN NaN NaN NaN NaN #> [43] NaN NaN NaN NaN 29.59574 NaN NaN #> [50] NaN NaN 32.86538 NaN NaN NaN NaN #> [57] NaN 32.55172 NaN NaN NaN NaN NaN #> [64] NaN NaN NaN NaN NaN NaN 21.87143 #> [71] NaN NaN NaN NaN NaN NaN NaN #> [78] NaN NaN 25.95000 NaN NaN NaN 25.25000 #> [85] NaN NaN NaN NaN NaN NaN NaN #> [92] 19.06522 NaN NaN 24.09474 NaN NaN NaN #> [99] NaN 20.52000 NaN NaN NaN NaN NaN #> [106] NaN NaN NaN NaN NaN NaN NaN #> [113] NaN NaN NaN NaN NaN NaN NaN #> [120] NaN NaN NaN NaN NaN NaN NaN #> [127] NaN NaN NaN NaN NaN 16.93939 NaN #> [134] NaN NaN NaN NaN NaN NaN 16.47143 #> [141] NaN NaN NaN NaN NaN NaN NaN #> [148] 19.18243 NaN NaN NaN NaN NaN NaN #> [155] NaN NaN NaN NaN NaN NaN NaN #> [162] NaN NaN NaN NaN NaN NaN NaN #> [169] NaN NaN NaN NaN NaN NaN NaN #> [176] NaN NaN NaN NaN NaN NaN NaN #> [183] NaN NaN NaN NaN NaN NaN 16.28042 #> [190] NaN NaN NaN NaN NaN NaN NaN #> [197] NaN NaN NaN NaN NaN NaN NaN #> [204] NaN NaN NaN NaN NaN NaN NaN #> [211] NaN NaN NaN NaN NaN NaN NaN #> [218] NaN NaN NaN NaN NaN NaN NaN #> [225] NaN NaN NaN NaN NaN NaN NaN #> [232] NaN NaN NaN NaN NaN NaN NaN #> [239] NaN NaN NaN NaN NaN NaN NaN #> [246] NaN NaN NaN NaN NaN NaN NaN #> [253] NaN NaN NaN NaN NaN NaN NaN #> [260] NaN NaN NaN NaN NaN NaN NaN #> [267] NaN NaN NaN NaN NaN NaN 15.84982 #> [274] NaN NaN 15.80435 NaN NaN NaN NaN #> [281] NaN 16.50709 NaN NaN NaN NaN NaN #> [288] NaN NaN NaN NaN NaN NaN NaN #> [295] NaN NaN 15.33670 NaN NaN NaN NaN #> [302] NaN NaN NaN NaN NaN NaN NaN #> [309] NaN NaN NaN NaN NaN NaN NaN #> [316] NaN NaN NaN NaN NaN NaN NaN #> [323] NaN NaN 14.92615 NaN NaN NaN NaN #> [330] NaN NaN NaN NaN NaN NaN NaN #> [337] NaN NaN NaN NaN NaN NaN NaN #> [344] NaN NaN NaN NaN NaN NaN NaN #> [351] NaN NaN NaN NaN NaN NaN NaN #> [358] NaN NaN NaN NaN NaN NaN NaN #> [365] NaN NaN NaN NaN NaN NaN NaN #> [372] NaN NaN NaN NaN NaN NaN NaN #> [379] NaN NaN NaN NaN NaN 13.43750 #> # A random graph g4 <- sample_gnp(1000, p = 5 / 1000) knn(g4) #> $knn #> [1] 10.000000 4.750000 6.250000 4.600000 5.666667 6.800000 5.888889 #> [8] 4.500000 4.600000 5.166667 6.428571 8.500000 8.000000 6.200000 #> [15] 8.000000 4.000000 5.250000 3.000000 6.500000 6.333333 9.666667 #> [22] 7.833333 6.000000 6.000000 6.444444 6.500000 5.285714 4.250000 #> [29] 9.000000 5.500000 5.454545 5.625000 5.500000 5.000000 7.000000 #> [36] 6.500000 6.666667 6.200000 5.900000 6.000000 6.500000 6.000000 #> [43] 5.000000 7.500000 6.500000 5.625000 7.000000 5.142857 4.333333 #> [50] 3.500000 6.375000 5.500000 7.000000 7.600000 7.750000 5.666667 #> [57] 6.000000 5.833333 7.250000 6.666667 6.000000 6.666667 6.750000 #> [64] 5.700000 6.555556 6.000000 6.333333 6.666667 5.500000 6.222222 #> [71] 7.000000 6.500000 5.500000 5.000000 5.800000 4.625000 6.600000 #> [78] 6.400000 7.400000 7.200000 4.600000 5.571429 7.000000 5.857143 #> [85] 6.250000 4.400000 7.000000 5.500000 6.000000 5.500000 7.000000 #> [92] 7.000000 3.750000 5.000000 6.000000 5.000000 6.714286 7.000000 #> [99] 9.400000 5.857143 7.000000 6.333333 6.000000 6.750000 5.000000 #> [106] 6.833333 6.800000 4.750000 5.500000 5.666667 9.000000 6.428571 #> [113] 5.750000 5.000000 6.000000 5.500000 8.833333 6.000000 3.833333 #> [120] 5.750000 4.250000 6.500000 7.000000 6.250000 5.000000 5.400000 #> [127] 5.800000 9.500000 7.333333 5.714286 6.200000 6.400000 6.333333 #> [134] 5.857143 7.142857 6.666667 5.400000 6.000000 6.714286 4.333333 #> [141] 7.000000 6.142857 5.555556 5.818182 4.600000 6.833333 2.000000 #> [148] 4.600000 3.000000 5.625000 6.000000 4.500000 4.000000 4.750000 #> [155] 6.200000 7.000000 5.000000 5.500000 5.500000 5.400000 6.571429 #> [162] 8.800000 6.000000 6.666667 7.000000 5.000000 9.500000 6.000000 #> [169] 6.500000 7.000000 8.000000 7.200000 5.666667 6.714286 4.666667 #> [176] 4.000000 5.600000 5.666667 4.000000 6.600000 7.600000 5.857143 #> [183] 4.000000 7.000000 6.000000 6.500000 4.857143 10.000000 7.500000 #> [190] 7.500000 6.000000 5.375000 7.000000 7.000000 6.000000 5.666667 #> [197] 5.333333 7.166667 7.000000 5.800000 5.000000 6.000000 5.000000 #> [204] 6.857143 3.666667 5.500000 5.750000 4.250000 6.750000 7.333333 #> [211] 5.000000 4.000000 7.000000 3.500000 5.333333 6.750000 6.500000 #> [218] 5.800000 6.500000 5.714286 5.333333 8.000000 6.272727 6.750000 #> [225] 4.666667 6.833333 6.400000 6.800000 4.500000 6.000000 8.333333 #> [232] 6.777778 5.000000 6.400000 6.000000 5.000000 7.400000 4.500000 #> [239] 5.500000 7.000000 6.666667 6.250000 7.250000 4.833333 6.666667 #> [246] 7.250000 4.500000 6.000000 6.428571 7.000000 6.600000 4.333333 #> [253] 6.750000 6.750000 6.636364 6.600000 6.900000 6.142857 4.500000 #> [260] 5.200000 6.000000 5.142857 5.666667 8.333333 8.250000 6.250000 #> [267] 6.333333 5.857143 5.500000 6.500000 6.000000 6.833333 7.833333 #> [274] 5.100000 7.000000 5.000000 6.250000 6.800000 5.375000 5.500000 #> [281] 6.000000 7.750000 7.500000 6.400000 6.000000 6.666667 6.000000 #> [288] 4.400000 4.800000 4.666667 4.250000 6.500000 5.875000 5.750000 #> [295] 6.666667 8.600000 6.200000 6.333333 5.500000 7.000000 7.000000 #> [302] 6.000000 6.750000 4.666667 6.000000 6.000000 8.000000 7.500000 #> [309] 6.666667 6.000000 7.400000 6.800000 5.166667 5.000000 6.636364 #> [316] 5.714286 6.000000 7.400000 5.800000 7.750000 5.285714 6.900000 #> [323] 5.571429 5.500000 5.600000 4.500000 6.142857 7.833333 7.400000 #> [330] 6.000000 6.375000 4.909091 7.000000 7.285714 7.166667 6.000000 #> [337] 6.142857 5.166667 8.333333 6.400000 5.857143 6.250000 7.000000 #> [344] 6.857143 6.200000 7.400000 6.500000 3.500000 6.200000 5.250000 #> [351] 5.000000 4.166667 4.500000 6.000000 5.333333 4.000000 6.333333 #> [358] 6.200000 6.555556 6.400000 5.166667 6.400000 6.500000 6.200000 #> [365] 5.000000 6.166667 5.750000 9.333333 7.000000 5.666667 6.142857 #> [372] 7.250000 7.166667 6.111111 5.888889 5.857143 3.666667 5.555556 #> [379] 4.000000 5.111111 7.000000 5.375000 6.750000 5.875000 6.285714 #> [386] 6.250000 6.166667 6.888889 5.500000 5.400000 5.333333 4.000000 #> [393] 6.666667 4.600000 3.250000 5.600000 9.000000 3.800000 7.000000 #> [400] 5.333333 6.333333 7.000000 5.857143 6.333333 6.428571 9.000000 #> [407] 6.500000 4.428571 7.111111 5.000000 5.500000 5.875000 5.666667 #> [414] 7.250000 6.000000 5.714286 6.111111 2.666667 5.727273 3.500000 #> [421] 5.833333 6.333333 4.000000 6.666667 7.000000 5.000000 6.500000 #> [428] 4.333333 6.545455 7.000000 3.000000 6.285714 6.333333 7.500000 #> [435] 5.500000 4.200000 4.500000 4.500000 4.400000 6.250000 5.166667 #> [442] 6.000000 5.714286 7.333333 8.500000 7.200000 6.500000 5.666667 #> [449] 5.666667 6.000000 7.500000 5.500000 6.285714 5.666667 7.200000 #> [456] 4.000000 4.000000 5.375000 6.000000 8.333333 5.200000 6.000000 #> [463] 7.666667 5.000000 7.000000 5.125000 5.000000 7.571429 7.000000 #> [470] 5.000000 4.500000 5.250000 6.333333 6.250000 5.875000 6.750000 #> [477] 6.000000 7.333333 7.600000 9.000000 6.142857 5.200000 6.600000 #> [484] 5.000000 6.666667 7.250000 5.500000 4.000000 7.000000 5.600000 #> [491] 7.000000 7.500000 6.555556 4.250000 6.300000 6.750000 5.375000 #> [498] 5.833333 5.142857 5.400000 5.400000 6.571429 4.800000 5.800000 #> [505] 6.800000 6.000000 6.000000 9.000000 7.500000 4.250000 7.000000 #> [512] 6.000000 6.000000 5.400000 4.750000 4.333333 4.666667 4.000000 #> [519] 5.833333 6.500000 6.000000 6.500000 5.833333 6.666667 6.333333 #> [526] 5.333333 6.000000 5.250000 5.636364 6.250000 8.500000 7.500000 #> [533] 6.000000 5.666667 5.800000 3.500000 4.333333 5.900000 6.666667 #> [540] 4.666667 6.666667 8.250000 7.666667 5.200000 4.333333 5.666667 #> [547] 5.500000 5.000000 7.100000 5.083333 3.000000 6.000000 8.250000 #> [554] 7.400000 5.666667 6.250000 5.666667 6.166667 5.900000 NaN #> [561] 4.000000 5.500000 6.000000 6.750000 4.857143 7.500000 NaN #> [568] 5.000000 6.666667 6.900000 6.000000 4.500000 5.750000 5.500000 #> [575] 7.285714 5.200000 6.000000 5.666667 5.500000 7.333333 6.333333 #> [582] 6.500000 8.714286 5.600000 7.250000 5.400000 4.500000 5.666667 #> [589] 6.000000 7.500000 7.666667 5.800000 7.222222 5.166667 6.000000 #> [596] 5.625000 6.125000 5.500000 7.545455 9.000000 4.200000 4.500000 #> [603] 7.200000 4.400000 6.285714 4.500000 5.400000 5.000000 6.333333 #> [610] 6.888889 6.000000 6.250000 4.000000 4.833333 5.500000 4.666667 #> [617] 4.750000 6.500000 6.333333 4.250000 6.200000 7.166667 5.500000 #> [624] 6.333333 4.875000 5.500000 5.285714 5.833333 7.250000 5.833333 #> [631] 5.900000 5.750000 5.083333 5.500000 6.750000 4.666667 4.500000 #> [638] 6.750000 6.000000 8.200000 6.200000 5.200000 7.833333 4.333333 #> [645] 6.714286 6.125000 6.400000 6.000000 6.666667 6.800000 4.857143 #> [652] 6.800000 5.333333 6.600000 5.166667 5.666667 4.000000 8.000000 #> [659] 6.250000 3.000000 6.333333 5.000000 5.500000 5.166667 4.833333 #> [666] 12.000000 6.125000 5.818182 4.500000 7.166667 5.000000 6.500000 #> [673] 6.600000 6.142857 4.000000 4.000000 8.333333 6.250000 6.125000 #> [680] 7.166667 7.000000 5.400000 5.800000 5.800000 6.000000 5.333333 #> [687] 7.750000 4.500000 8.500000 5.666667 5.000000 4.800000 5.800000 #> [694] 7.500000 8.333333 5.500000 6.500000 7.666667 5.000000 6.125000 #> [701] 7.500000 5.800000 4.800000 5.833333 7.000000 5.600000 6.600000 #> [708] 6.571429 7.142857 7.375000 8.000000 5.666667 6.000000 5.666667 #> [715] 5.166667 6.875000 6.500000 6.571429 6.600000 5.500000 5.000000 #> [722] 7.333333 5.375000 5.500000 5.600000 5.857143 7.142857 7.200000 #> [729] 6.500000 5.600000 6.600000 3.666667 6.250000 5.333333 5.928571 #> [736] 6.571429 8.200000 6.400000 4.500000 8.000000 5.111111 6.400000 #> [743] 7.166667 9.000000 4.250000 5.166667 4.500000 6.600000 5.625000 #> [750] 5.500000 5.333333 5.500000 5.428571 5.100000 5.600000 7.000000 #> [757] 7.750000 4.000000 7.500000 6.200000 8.000000 5.000000 6.000000 #> [764] 6.000000 6.750000 3.600000 4.571429 5.500000 5.000000 6.333333 #> [771] 4.333333 6.666667 5.600000 4.250000 6.000000 6.777778 7.000000 #> [778] 6.000000 5.000000 6.200000 6.400000 5.111111 6.857143 7.750000 #> [785] 5.571429 6.142857 7.666667 6.400000 5.833333 6.500000 5.571429 #> [792] 4.333333 7.750000 8.000000 7.000000 5.666667 5.285714 6.200000 #> [799] 5.800000 5.600000 7.600000 6.600000 8.250000 5.666667 7.666667 #> [806] 8.000000 5.250000 6.000000 5.750000 7.000000 5.750000 4.000000 #> [813] 6.666667 7.000000 5.000000 8.333333 5.250000 5.000000 5.833333 #> [820] 5.666667 6.500000 5.250000 7.666667 4.600000 5.500000 6.250000 #> [827] 5.666667 6.500000 7.000000 5.750000 6.285714 7.000000 5.000000 #> [834] 8.333333 6.166667 8.714286 6.375000 4.375000 5.500000 6.714286 #> [841] 4.333333 7.250000 6.750000 6.750000 7.222222 6.833333 8.000000 #> [848] 8.500000 6.333333 4.500000 5.200000 5.200000 5.666667 5.666667 #> [855] 7.000000 4.200000 6.111111 6.000000 7.750000 5.400000 4.000000 #> [862] 6.750000 9.000000 4.000000 5.000000 6.000000 5.833333 4.375000 #> [869] 6.000000 4.500000 5.857143 4.200000 6.500000 5.666667 5.857143 #> [876] 6.000000 5.500000 5.400000 7.000000 5.500000 6.857143 6.142857 #> [883] 7.285714 4.750000 5.600000 5.250000 5.750000 6.000000 6.333333 #> [890] 5.200000 5.500000 8.400000 5.800000 5.400000 5.333333 8.400000 #> [897] 4.500000 6.166667 6.750000 6.111111 6.750000 6.500000 6.333333 #> [904] 6.500000 9.000000 5.600000 7.500000 5.833333 6.000000 5.000000 #> [911] 6.125000 6.250000 6.333333 6.750000 6.333333 6.166667 7.000000 #> [918] 5.625000 5.400000 6.400000 5.500000 6.000000 5.857143 6.000000 #> [925] 7.333333 4.500000 6.000000 5.000000 6.428571 6.000000 6.500000 #> [932] 5.222222 7.600000 6.875000 6.875000 6.333333 7.750000 3.333333 #> [939] 6.666667 4.750000 4.800000 5.250000 8.500000 6.125000 6.285714 #> [946] 7.000000 5.000000 3.000000 8.333333 6.500000 5.750000 6.333333 #> [953] 4.600000 5.333333 4.000000 5.333333 6.000000 6.166667 3.000000 #> [960] 8.400000 4.571429 6.200000 5.000000 5.800000 6.500000 5.000000 #> [967] 5.600000 5.800000 7.000000 6.166667 7.750000 5.833333 5.444444 #> [974] 4.600000 7.600000 5.833333 5.857143 7.250000 8.000000 4.750000 #> [981] 7.000000 6.333333 6.200000 6.571429 4.500000 6.000000 5.571429 #> [988] 5.000000 4.500000 5.666667 5.000000 2.500000 6.400000 6.500000 #> [995] 6.800000 3.000000 7.250000 6.625000 6.500000 7.500000 #> #> $knnk #> [1] 5.625000 6.064706 5.994792 6.056452 6.114754 6.103571 6.128571 5.971429 #> [9] 6.033951 5.977273 6.000000 5.666667 NaN 5.928571 #> # A weighted graph g5 <- make_star(10) E(g5)$weight <- seq(ecount(g5)) knn(g5) #> $knn #> [1] 1 9 9 9 9 9 9 9 9 9 #> #> $knnk #> [1] 9 NaN NaN NaN NaN NaN NaN NaN 1 #>"},{"path":"https://r.igraph.org/reference/label.propagation.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding communities based on propagating labels — label.propagation.community","title":"Finding communities based on propagating labels — label.propagation.community","text":"label.propagation.community() renamed cluster_label_prop() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/label.propagation.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding communities based on propagating labels — label.propagation.community","text":"","code":"label.propagation.community( graph, weights = NULL, ..., mode = c(\"out\", \"in\", \"all\"), initial = NULL, fixed = NULL )"},{"path":"https://r.igraph.org/reference/label.propagation.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding communities based on propagating labels — label.propagation.community","text":"graph input graph. Note algorithm wsa originally defined undirected graphs. advised set ‘mode’ pass directed graph treat undirected. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. ... dots future extensions must empty. mode Logical, whether consider edge directions label propagation, , direction labels propagate. Ignored undirected graphs. \"\" means ignore edge directions (even directed graphs). \"\" means propagate labels along natural direction edges. \"\" means propagate labels backwards (.e. head tail). initial initial state. NULL, every vertex different label beginning. Otherwise must vector entry vertex. Non-negative values denote different labels, negative entries denote vertices without labels. fixed Logical vector denoting labels fixed. course makes sense provided initial state, otherwise element ignored. Also note vertices without labels fixed.","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph Laplacian — laplacian_matrix","title":"Graph Laplacian — laplacian_matrix","text":"Laplacian graph.","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph Laplacian — laplacian_matrix","text":"","code":"laplacian_matrix( graph, normalized = FALSE, weights = NULL, sparse = igraph_opt(\"sparsematrices\") )"},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph Laplacian — laplacian_matrix","text":"graph input graph. normalized Whether calculate normalized Laplacian. See definitions . weights optional vector giving edge weights weighted Laplacian matrix. NULL graph edge attribute called weight, used automatically. Set NA want unweighted Laplacian graph weight edge attribute. sparse Logical scalar, whether return result sparse matrix. Matrix package required sparse matrices.","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph Laplacian — laplacian_matrix","text":"numeric matrix.","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph Laplacian — laplacian_matrix","text":"Laplacian Matrix graph symmetric matrix number rows columns number vertices graph element (,j) d[], degree vertex ==j, -1 !=j edge vertices j 0 otherwise. normalized version Laplacian Matrix similar: element (,j) 1 ==j, -1/sqrt(d[] d[j]) !=j edge vertices j 0 otherwise. weighted version Laplacian simply works weighted degree instead plain degree. .e. (,j) d[], weighted degree vertex ==j, -w !=j edge vertices j weight w, 0 otherwise. weighted degree vertex sum weights adjacent edges.","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph Laplacian — laplacian_matrix","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/laplacian_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph Laplacian — laplacian_matrix","text":"","code":"g <- make_ring(10) laplacian_matrix(g) #> 10 x 10 sparse Matrix of class \"dgCMatrix\" #> #> [1,] 2 -1 . . . . . . . -1 #> [2,] -1 2 -1 . . . . . . . #> [3,] . -1 2 -1 . . . . . . #> [4,] . . -1 2 -1 . . . . . #> [5,] . . . -1 2 -1 . . . . #> [6,] . . . . -1 2 -1 . . . #> [7,] . . . . . -1 2 -1 . . #> [8,] . . . . . . -1 2 -1 . #> [9,] . . . . . . . -1 2 -1 #> [10,] -1 . . . . . . . -1 2 laplacian_matrix(g, norm = TRUE) #> 10 x 10 sparse Matrix of class \"dgCMatrix\" #> #> [1,] 1.0 -0.5 . . . . . . . -0.5 #> [2,] -0.5 1.0 -0.5 . . . . . . . #> [3,] . -0.5 1.0 -0.5 . . . . . . #> [4,] . . -0.5 1.0 -0.5 . . . . . #> [5,] . . . -0.5 1.0 -0.5 . . . . #> [6,] . . . . -0.5 1.0 -0.5 . . . #> [7,] . . . . . -0.5 1.0 -0.5 . . #> [8,] . . . . . . -0.5 1.0 -0.5 . #> [9,] . . . . . . . -0.5 1.0 -0.5 #> [10,] -0.5 . . . . . . . -0.5 1.0 laplacian_matrix(g, norm = TRUE, sparse = FALSE) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> [1,] 1.0 -0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.5 #> [2,] -0.5 1.0 -0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 #> [3,] 0.0 -0.5 1.0 -0.5 0.0 0.0 0.0 0.0 0.0 0.0 #> [4,] 0.0 0.0 -0.5 1.0 -0.5 0.0 0.0 0.0 0.0 0.0 #> [5,] 0.0 0.0 0.0 -0.5 1.0 -0.5 0.0 0.0 0.0 0.0 #> [6,] 0.0 0.0 0.0 0.0 -0.5 1.0 -0.5 0.0 0.0 0.0 #> [7,] 0.0 0.0 0.0 0.0 0.0 -0.5 1.0 -0.5 0.0 0.0 #> [8,] 0.0 0.0 0.0 0.0 0.0 0.0 -0.5 1.0 -0.5 0.0 #> [9,] 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.5 1.0 -0.5 #> [10,] -0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.5 1.0"},{"path":"https://r.igraph.org/reference/largest.cliques.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to find cliques, i.e. complete subgraphs in a graph — largest.cliques","title":"Functions to find cliques, i.e. complete subgraphs in a graph — largest.cliques","text":"largest.cliques() renamed largest_cliques() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/largest.cliques.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to find cliques, i.e. complete subgraphs in a graph — largest.cliques","text":"","code":"largest.cliques(graph)"},{"path":"https://r.igraph.org/reference/largest.cliques.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to find cliques, i.e. complete subgraphs in a graph — largest.cliques","text":"graph input graph, directed graphs considered undirected ones, multiple edges loops ignored.","code":""},{"path":"https://r.igraph.org/reference/largest.independent.vertex.sets.html","id":null,"dir":"Reference","previous_headings":"","what":"Independent vertex sets — largest.independent.vertex.sets","title":"Independent vertex sets — largest.independent.vertex.sets","text":"largest.independent.vertex.sets() renamed largest_ivs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/largest.independent.vertex.sets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Independent vertex sets — largest.independent.vertex.sets","text":"","code":"largest.independent.vertex.sets(graph)"},{"path":"https://r.igraph.org/reference/largest.independent.vertex.sets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Independent vertex sets — largest.independent.vertex.sets","text":"graph input graph, directed graphs considered undirected, loop edges multiple edges ignored.","code":""},{"path":"https://r.igraph.org/reference/lastcit.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Random citation graphs — lastcit.game","title":"Random citation graphs — lastcit.game","text":"lastcit.game() renamed sample_last_cit() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/lastcit.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random citation graphs — lastcit.game","text":"","code":"lastcit.game( n, edges = 1, agebins = n/7100, pref = (1:(agebins + 1))^-3, directed = TRUE )"},{"path":"https://r.igraph.org/reference/lastcit.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random citation graphs — lastcit.game","text":"n Number vertices. edges Number edges per step. agebins Number aging bins. pref Vector (sample_last_cit() sample_cit_types() matrix (sample_cit_cit_types()) giving (unnormalized) citation probabilities different vertex types. directed Logical scalar, whether generate directed networks.","code":""},{"path":"https://r.igraph.org/reference/layout.auto.html","id":null,"dir":"Reference","previous_headings":"","what":"Choose an appropriate graph layout algorithm automatically — layout.auto","title":"Choose an appropriate graph layout algorithm automatically — layout.auto","text":"layout.auto() renamed layout_nicely() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.auto.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Choose an appropriate graph layout algorithm automatically — layout.auto","text":"","code":"layout.auto(graph, dim = 2, ...)"},{"path":"https://r.igraph.org/reference/layout.auto.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Choose an appropriate graph layout algorithm automatically — layout.auto","text":"graph input graph dim Dimensions, 2 3. ... layout_nicely() extra arguments passed real layout function. nicely() argument passed layout_nicely().","code":""},{"path":"https://r.igraph.org/reference/layout.bipartite.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple two-row layout for bipartite graphs — layout.bipartite","title":"Simple two-row layout for bipartite graphs — layout.bipartite","text":"layout.bipartite() renamed layout_as_bipartite() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.bipartite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple two-row layout for bipartite graphs — layout.bipartite","text":"","code":"layout.bipartite(graph, types = NULL, hgap = 1, vgap = 1, maxiter = 100)"},{"path":"https://r.igraph.org/reference/layout.bipartite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple two-row layout for bipartite graphs — layout.bipartite","text":"graph bipartite input graph. logical ‘type’ vertex attribute, types argument must given. types logical vector, vertex types. argument NULL (default), ‘type’ vertex attribute used. hgap Real scalar, minimum horizontal gap vertices layer. vgap Real scalar, distance two layers. maxiter Integer scalar, maximum number iterations crossing minimization stage. 100 reasonable default; feel many edge crossings, increase .","code":""},{"path":"https://r.igraph.org/reference/layout.davidson.harel.html","id":null,"dir":"Reference","previous_headings":"","what":"The Davidson-Harel layout algorithm — layout.davidson.harel","title":"The Davidson-Harel layout algorithm — layout.davidson.harel","text":"layout.davidson.harel() renamed layout_with_dh() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.davidson.harel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Davidson-Harel layout algorithm — layout.davidson.harel","text":"","code":"layout.davidson.harel( graph, coords = NULL, maxiter = 10, fineiter = max(10, log2(vcount(graph))), cool.fact = 0.75, weight.node.dist = 1, weight.border = 0, weight.edge.lengths = edge_density(graph)/10, weight.edge.crossings = 1 - sqrt(edge_density(graph)), weight.node.edge.dist = 0.2 * (1 - edge_density(graph)) )"},{"path":"https://r.igraph.org/reference/layout.davidson.harel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Davidson-Harel layout algorithm — layout.davidson.harel","text":"graph graph lay . Edge directions ignored. coords Optional starting positions vertices. argument NULL appropriate matrix starting coordinates. maxiter Number iterations perform first phase. fineiter Number iterations fine tuning phase. cool.fact Cooling factor. weight.node.dist Weight node-node distances component energy function. weight.border Weight distance border component energy function. can set zero, vertices allowed sit border. weight.edge.lengths Weight edge length component energy function. weight.edge.crossings Weight edge crossing component energy function. weight.node.edge.dist Weight node-edge distance component energy function.","code":""},{"path":"https://r.igraph.org/reference/layout.deprecated.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated layout functions — layout.reingold.tilford","title":"Deprecated layout functions — layout.reingold.tilford","text":"Please use new names, see layout_().","code":""},{"path":"https://r.igraph.org/reference/layout.deprecated.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deprecated layout functions — layout.reingold.tilford","text":"","code":"layout.reingold.tilford(..., params = list()) layout.circle(..., params = list()) layout.sphere(..., params = list()) layout.random(..., params = list()) layout.fruchterman.reingold(..., params = list()) layout.kamada.kawai(..., params = list()) layout.lgl(..., params = list())"},{"path":"https://r.igraph.org/reference/layout.deprecated.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deprecated layout functions — layout.reingold.tilford","text":"... Passed new layout functions. params Passed new layout functions arguments.","code":""},{"path":"https://r.igraph.org/reference/layout.drl.html","id":null,"dir":"Reference","previous_headings":"","what":"The DrL graph layout generator — layout.drl","title":"The DrL graph layout generator — layout.drl","text":"layout.drl() renamed layout_with_drl() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.drl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The DrL graph layout generator — layout.drl","text":"","code":"layout.drl( graph, use.seed = FALSE, seed = matrix(runif(vcount(graph) * 2), ncol = 2), options = drl_defaults$default, weights = NULL, dim = 2 )"},{"path":"https://r.igraph.org/reference/layout.drl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The DrL graph layout generator — layout.drl","text":"graph input graph, can directed undirected. use.seed Logical scalar, whether use coordinates given seed argument starting point. seed matrix two columns, starting coordinates vertices use.seed TRUE. ignored otherwise. options Options layout generator, named list. See details . weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use layout. Larger edge weights correspond stronger connections. dim Either ‘2’ ‘3’, specifies whether want two dimensional three dimensional layout. Note nature DrL algorithm, three dimensional layout takes significantly longer compute.","code":""},{"path":"https://r.igraph.org/reference/layout.fruchterman.reingold.grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Grid Fruchterman-Reingold layout, this was removed from igraph — layout.fruchterman.reingold.grid","title":"Grid Fruchterman-Reingold layout, this was removed from igraph — layout.fruchterman.reingold.grid","text":"Now calls Fruchterman-Reingold layout, warning.","code":""},{"path":"https://r.igraph.org/reference/layout.fruchterman.reingold.grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Grid Fruchterman-Reingold layout, this was removed from igraph — layout.fruchterman.reingold.grid","text":"","code":"layout.fruchterman.reingold.grid(graph, ...)"},{"path":"https://r.igraph.org/reference/layout.fruchterman.reingold.grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Grid Fruchterman-Reingold layout, this was removed from igraph — layout.fruchterman.reingold.grid","text":"graph Input graph. ... Extra arguments ignored.","code":""},{"path":"https://r.igraph.org/reference/layout.fruchterman.reingold.grid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Grid Fruchterman-Reingold layout, this was removed from igraph — layout.fruchterman.reingold.grid","text":"Layout coordinates, two column matrix.","code":""},{"path":"https://r.igraph.org/reference/layout.gem.html","id":null,"dir":"Reference","previous_headings":"","what":"The GEM layout algorithm — layout.gem","title":"The GEM layout algorithm — layout.gem","text":"layout.gem() renamed layout_with_gem() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.gem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The GEM layout algorithm — layout.gem","text":"","code":"layout.gem( graph, coords = NULL, maxiter = 40 * vcount(graph)^2, temp.max = max(vcount(graph), 1), temp.min = 1/10, temp.init = sqrt(max(vcount(graph), 1)) )"},{"path":"https://r.igraph.org/reference/layout.gem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The GEM layout algorithm — layout.gem","text":"graph input graph. Edge directions ignored. coords NULL, starting coordinates given , two three column matrix, depending dim argument. maxiter maximum number iterations perform. Updating single vertex counts iteration. reasonable default 40 * n * n, n number vertices. original paper suggests 4 * n * n, usually works parameters set carefully. temp.max maximum allowed local temperature. reasonable default number vertices. temp.min global temperature algorithm terminates (even reaching maxiter iterations). reasonable default 1/10. temp.init Initial local temperature vertices. reasonable default square root number vertices.","code":""},{"path":"https://r.igraph.org/reference/layout.graphopt.html","id":null,"dir":"Reference","previous_headings":"","what":"The graphopt layout algorithm — layout.graphopt","title":"The graphopt layout algorithm — layout.graphopt","text":"layout.graphopt() renamed layout_with_graphopt() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.graphopt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The graphopt layout algorithm — layout.graphopt","text":"","code":"layout.graphopt( graph, start = NULL, niter = 500, charge = 0.001, mass = 30, spring.length = 0, spring.constant = 1, max.sa.movement = 5 )"},{"path":"https://r.igraph.org/reference/layout.graphopt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The graphopt layout algorithm — layout.graphopt","text":"graph input graph. start given, matrix two columns one line vertex. matrix used starting positions algorithm. given, random starting matrix used. niter Integer scalar, number iterations perform. couple hundred general. large graph might want iterations check result. good enough can feed start argument. default value 500. charge charge vertices, used calculate electric repulsion. default 0.001. mass mass vertices, used spring forces. default 30. spring.length length springs, integer number. default value zero. spring.constant spring constant, default value one. max.sa.movement Real constant, gives maximum amount movement allowed single step along single axis. default value 5.","code":""},{"path":"https://r.igraph.org/reference/layout.grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple grid layout — layout.grid","title":"Simple grid layout — layout.grid","text":"layout.grid() renamed layout_on_grid() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple grid layout — layout.grid","text":"","code":"layout.grid(graph, width = 0, height = 0, dim = 2)"},{"path":"https://r.igraph.org/reference/layout.grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple grid layout — layout.grid","text":"graph input graph. width number vertices single row grid. zero negative, 2d layouts width grid square root number vertices graph, rounded next integer. Similarly, cube root 3d layouts. height number vertices single column grid, three dimensional layouts. zero negative, determinted automatically. dim Two three. Whether make 2d 3d layout.","code":""},{"path":"https://r.igraph.org/reference/layout.mds.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph layout by multidimensional scaling — layout.mds","title":"Graph layout by multidimensional scaling — layout.mds","text":"layout.mds() renamed layout_with_mds() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.mds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph layout by multidimensional scaling — layout.mds","text":"","code":"layout.mds(graph, dist = NULL, dim = 2, options = arpack_defaults())"},{"path":"https://r.igraph.org/reference/layout.mds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph layout by multidimensional scaling — layout.mds","text":"graph input graph. dist distance matrix multidimensional scaling. NULL (default), unweighted shortest path matrix used. dim layout_with_mds() supports dimensions number nodes minus one, graph connected; unconnected graphs, possible value 2. merge_coords() works 2D. options currently ignored, ARPACK used solving eigenproblem","code":""},{"path":"https://r.igraph.org/reference/layout.merge.html","id":null,"dir":"Reference","previous_headings":"","what":"Merging graph layouts — layout.merge","title":"Merging graph layouts — layout.merge","text":"layout.merge() renamed merge_coords() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.merge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merging graph layouts — layout.merge","text":"","code":"layout.merge(graphs, layouts, method = \"dla\")"},{"path":"https://r.igraph.org/reference/layout.merge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merging graph layouts — layout.merge","text":"graphs list graph objects. layouts list two-column matrices. method Character constant giving method use. Right now dla implemented.","code":""},{"path":"https://r.igraph.org/reference/layout.norm.html","id":null,"dir":"Reference","previous_headings":"","what":"Normalize coordinates for plotting graphs — layout.norm","title":"Normalize coordinates for plotting graphs — layout.norm","text":"layout.norm() renamed norm_coords() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.norm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Normalize coordinates for plotting graphs — layout.norm","text":"","code":"layout.norm( layout, xmin = -1, xmax = 1, ymin = -1, ymax = 1, zmin = -1, zmax = 1 )"},{"path":"https://r.igraph.org/reference/layout.norm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Normalize coordinates for plotting graphs — layout.norm","text":"layout matrix two three columns, layout normalize. xmin, xmax limits first coordinate, one NULL normalization performed along direction. ymin, ymax limits second coordinate, one NULL normalization performed along direction. zmin, zmax limits third coordinate, one NULL normalization performed along direction.","code":""},{"path":"https://r.igraph.org/reference/layout.spring.html","id":null,"dir":"Reference","previous_headings":"","what":"Spring layout, this was removed from igraph — layout.spring","title":"Spring layout, this was removed from igraph — layout.spring","text":"Now calls Fruchterman-Reingold layout, warning.","code":""},{"path":"https://r.igraph.org/reference/layout.spring.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spring layout, this was removed from igraph — layout.spring","text":"","code":"layout.spring(graph, ...)"},{"path":"https://r.igraph.org/reference/layout.spring.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Spring layout, this was removed from igraph — layout.spring","text":"graph Input graph. ... Extra arguments ignored.","code":""},{"path":"https://r.igraph.org/reference/layout.spring.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Spring layout, this was removed from igraph — layout.spring","text":"Layout coordinates, two column matrix.","code":""},{"path":"https://r.igraph.org/reference/layout.star.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate coordinates to place the vertices of a graph in a star-shape — layout.star","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout.star","text":"layout.star() renamed layout_as_star() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.star.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout.star","text":"","code":"layout.star(graph, center = V(graph)[1], order = NULL)"},{"path":"https://r.igraph.org/reference/layout.star.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout.star","text":"graph graph layout. center id vertex put center. default first vertex. order Numeric vector, order vertices along perimeter. default ordering given vertex ids.","code":""},{"path":"https://r.igraph.org/reference/layout.sugiyama.html","id":null,"dir":"Reference","previous_headings":"","what":"The Sugiyama graph layout generator — layout.sugiyama","title":"The Sugiyama graph layout generator — layout.sugiyama","text":"layout.sugiyama() renamed layout_with_sugiyama() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/layout.sugiyama.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Sugiyama graph layout generator — layout.sugiyama","text":"","code":"layout.sugiyama( graph, layers = NULL, hgap = 1, vgap = 1, maxiter = 100, weights = NULL, attributes = c(\"default\", \"all\", \"none\") )"},{"path":"https://r.igraph.org/reference/layout.sugiyama.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Sugiyama graph layout generator — layout.sugiyama","text":"graph input graph. layers numeric vector NULL. NULL, specify layer index vertices. Layers numbered one. NULL, igraph calculates layers automatically. hgap Real scalar, minimum horizontal gap vertices layer. vgap Real scalar, distance layers. maxiter Integer scalar, maximum number iterations crossing minimization stage. 100 reasonable default; feel many edge crossings, increase . weights Optional edge weight vector. NULL, 'weight' edge attribute used, one. Supply NA igraph ignores edge weights. used graph contains cycles; igraph tend reverse edges smaller weights breaking cycles. attributes graph/vertex/edge attributes keep extended graph. ‘default’ keeps ‘size’, ‘size2’, ‘shape’, ‘label’ ‘color’ vertex attributes ‘arrow.mode’ ‘arrow.size’ edge attributes. ‘’ keep graph, vertex edge attributes, ‘none’ keeps none .","code":""},{"path":"https://r.igraph.org/reference/layout.svd.html","id":null,"dir":"Reference","previous_headings":"","what":"SVD layout, this was removed from igraph — layout.svd","title":"SVD layout, this was removed from igraph — layout.svd","text":"Now calls Fruchterman-Reingold layout, warning.","code":""},{"path":"https://r.igraph.org/reference/layout.svd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"SVD layout, this was removed from igraph — layout.svd","text":"","code":"layout.svd(graph, ...)"},{"path":"https://r.igraph.org/reference/layout.svd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"SVD layout, this was removed from igraph — layout.svd","text":"graph Input graph. ... Extra arguments ignored.","code":""},{"path":"https://r.igraph.org/reference/layout.svd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"SVD layout, this was removed from igraph — layout.svd","text":"Layout coordinates, two column matrix.","code":""},{"path":"https://r.igraph.org/reference/layout_.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph layouts — layout_","title":"Graph layouts — layout_","text":"generic function apply layout function graph.","code":""},{"path":"https://r.igraph.org/reference/layout_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph layouts — layout_","text":"","code":"layout_(graph, layout, ...) # S3 method for class 'igraph_layout_spec' print(x, ...) # S3 method for class 'igraph_layout_modifier' print(x, ...)"},{"path":"https://r.igraph.org/reference/layout_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph layouts — layout_","text":"graph input graph. layout layout specification. must call layout specification function. ... modifiers, see complete list . print() methods, ignored. x layout specification","code":""},{"path":"https://r.igraph.org/reference/layout_.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph layouts — layout_","text":"return value layout function, usually two column matrix. 3D layouts three column matrix.","code":""},{"path":"https://r.igraph.org/reference/layout_.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph layouts — layout_","text":"two ways calculate graph layouts igraph. first way call layout function (prefix layout_() graph, get vertex coordinates. second way (new igraph 0.8.0), two steps, flexible. First call layout specification function (one without layout_() prefix, layout_() (add_layout_()) perform layouting. second way preferred, flexible. allows operations layouting. E.g. using component_wise() argument, layout can calculated separately component, merged get final results.","code":""},{"path":"https://r.igraph.org/reference/layout_.html","id":"modifiers","dir":"Reference","previous_headings":"","what":"Modifiers","title":"Graph layouts — layout_","text":"Modifiers modify layout calculation performed. Currently implemented modifiers: component_wise() calculates layout separately component graph, merges . normalize() scales layout square.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph layouts — layout_","text":"","code":"g <- make_ring(10) + make_full_graph(5) coords <- layout_(g, as_star()) plot(g, layout = coords)"},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple two-row layout for bipartite graphs — layout_as_bipartite","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"Minimize edge-crossings simple two-row (column) layout bipartite graphs.","code":""},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"","code":"layout_as_bipartite(graph, types = NULL, hgap = 1, vgap = 1, maxiter = 100) as_bipartite(...)"},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"graph bipartite input graph. logical ‘type’ vertex attribute, types argument must given. types logical vector, vertex types. argument NULL (default), ‘type’ vertex attribute used. hgap Real scalar, minimum horizontal gap vertices layer. vgap Real scalar, distance two layers. maxiter Integer scalar, maximum number iterations crossing minimization stage. 100 reasonable default; feel many edge crossings, increase . ... Arguments pass layout_as_bipartite().","code":""},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"matrix two columns many rows number vertices input graph.","code":""},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"layout created first placing vertices two rows, according types. positions within rows optimized minimize edge crossings, using Sugiyama algorithm (see layout_with_sugiyama()).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_as_bipartite.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simple two-row layout for bipartite graphs — layout_as_bipartite","text":"","code":"# Random bipartite graph inc <- matrix(sample(0:1, 50, replace = TRUE, prob = c(2, 1)), 10, 5) g <- graph_from_biadjacency_matrix(inc) plot(g, layout = layout_as_bipartite, vertex.color = c(\"green\", \"cyan\")[V(g)$type + 1] ) # Two columns g %>% add_layout_(as_bipartite()) %>% plot()"},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"simple layout generator, places one vertex center circle rest vertices equidistantly perimeter.","code":""},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"","code":"layout_as_star(graph, center = V(graph)[1], order = NULL) as_star(...)"},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"graph graph layout. center id vertex put center. default first vertex. order Numeric vector, order vertices along perimeter. default ordering given vertex ids. ... Arguments pass layout_as_star().","code":""},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"matrix two columns many rows number vertices input graph.","code":""},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"possible choose vertex center, order vertices can also given.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_as_star.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate coordinates to place the vertices of a graph in a star-shape — layout_as_star","text":"","code":"g <- make_star(10) layout_as_star(g) #> [,1] [,2] #> [1,] 0.0000000 0.0000000 #> [2,] 1.0000000 0.0000000 #> [3,] 0.7660444 0.6427876 #> [4,] 0.1736482 0.9848078 #> [5,] -0.5000000 0.8660254 #> [6,] -0.9396926 0.3420201 #> [7,] -0.9396926 -0.3420201 #> [8,] -0.5000000 -0.8660254 #> [9,] 0.1736482 -0.9848078 #> [10,] 0.7660444 -0.6427876 ## Alternative form layout_(g, as_star()) #> [,1] [,2] #> [1,] 0.0000000 0.0000000 #> [2,] 1.0000000 0.0000000 #> [3,] 0.7660444 0.6427876 #> [4,] 0.1736482 0.9848078 #> [5,] -0.5000000 0.8660254 #> [6,] -0.9396926 0.3420201 #> [7,] -0.9396926 -0.3420201 #> [8,] -0.5000000 -0.8660254 #> [9,] 0.1736482 -0.9848078 #> [10,] 0.7660444 -0.6427876"},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"The Reingold-Tilford graph layout algorithm — layout_as_tree","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"tree-like layout, perfect trees, acceptable graphs many cycles.","code":""},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"","code":"layout_as_tree( graph, root = numeric(), circular = FALSE, rootlevel = numeric(), mode = c(\"out\", \"in\", \"all\"), flip.y = TRUE ) as_tree(...)"},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"graph input graph. root index root vertex root vertices. non-empty vector supplied vertex ids used roots trees (single tree graph connected). empty vector, root vertices automatically calculated based topological sorting, performed opposite mode mode argument. vertices sorted, one selected component. circular Logical scalar, whether plot tree circular fashion. Defaults FALSE, tree branches going bottom-(top-, see flip.y argument. rootlevel argument can useful drawing forests trees (.e. unconnected tree components). specifies level root vertices every tree forest. considered roots argument empty vector. mode Specifies edges consider building tree. ‘’, outgoing, ‘’, incoming edges parent considered. ‘’ edges used (behavior igraph 0.5 ). parameter also influences root vertices calculated, given. See roots parameter. flip.y Logical scalar, whether flip ‘y’ coordinates. default flipping puts root vertex top. ... Passed layout_as_tree().","code":""},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"numeric matrix two columns, one row vertex.","code":""},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"Arranges nodes tree given node used root. tree directed downwards parents centered children. exact algorithm, reference . given graph tree, breadth-first search executed first obtain possible spanning tree.","code":""},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"Reingold, E Tilford, J (1981). Tidier drawing trees. IEEE Trans. Softw. Eng., SE-7(2):223–228.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_as_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Reingold-Tilford graph layout algorithm — layout_as_tree","text":"","code":"tree <- make_tree(20, 3) plot(tree, layout = layout_as_tree) plot(tree, layout = layout_as_tree(tree, flip.y = FALSE)) plot(tree, layout = layout_as_tree(tree, circular = TRUE)) tree2 <- make_tree(10, 3) + make_tree(10, 2) plot(tree2, layout = layout_as_tree) plot(tree2, layout = layout_as_tree(tree2, root = c(1, 11), rootlevel = c(2, 1) ))"},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph layout with vertices on a circle. — layout_in_circle","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"Place vertices circle, order vertex ids.","code":""},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"","code":"layout_in_circle(graph, order = V(graph)) in_circle(...)"},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"graph input graph. order vertices place circle, order desired placement. Vertices included placed (0,0). ... Passed layout_in_circle().","code":""},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"numeric matrix two columns, one row vertex.","code":""},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"want order vertices differently, permute using permute() function.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_in_circle.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph layout with vertices on a circle. — layout_in_circle","text":"","code":"## Place vertices on a circle, order them according to their ## community library(igraphdata) data(karate) karate_groups <- cluster_optimal(karate) #> This graph was created by an old(er) igraph version. #> Call upgrade_graph() on it to use with the current igraph version #> For now we convert it on the fly... coords <- layout_in_circle(karate, order = order(membership(karate_groups)) ) V(karate)$label <- sub(\"Actor \", \"\", V(karate)$name) V(karate)$label.color <- membership(karate_groups) V(karate)$shape <- \"none\" plot(karate, layout = coords)"},{"path":"https://r.igraph.org/reference/layout_nicely.html","id":null,"dir":"Reference","previous_headings":"","what":"Choose an appropriate graph layout algorithm automatically — layout_nicely","title":"Choose an appropriate graph layout algorithm automatically — layout_nicely","text":"function tries choose appropriate graph layout algorithm graph, automatically, based simple algorithm. See details .","code":""},{"path":"https://r.igraph.org/reference/layout_nicely.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Choose an appropriate graph layout algorithm automatically — layout_nicely","text":"","code":"layout_nicely(graph, dim = 2, ...) nicely(...)"},{"path":"https://r.igraph.org/reference/layout_nicely.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Choose an appropriate graph layout algorithm automatically — layout_nicely","text":"graph input graph dim Dimensions, 2 3. ... layout_nicely() extra arguments passed real layout function. nicely() argument passed layout_nicely().","code":""},{"path":"https://r.igraph.org/reference/layout_nicely.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Choose an appropriate graph layout algorithm automatically — layout_nicely","text":"numeric matrix two three columns.","code":""},{"path":"https://r.igraph.org/reference/layout_nicely.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Choose an appropriate graph layout algorithm automatically — layout_nicely","text":"layout_nicely() tries choose appropriate layout function supplied graph, uses generate layout. current implementation works like : graph graph attribute called ‘layout’, used. attribute R function, called, graph extra arguments. Otherwise, graph vertex attributes called ‘x’ ‘y’, used coordinates. graph additional ‘z’ vertex attribute, also used. Otherwise, graph connected less 1000 vertices, Fruchterman-Reingold layout used, calling layout_with_fr(). Otherwise DrL layout used, layout_with_drl() called. layout algorithm implementations, argument named ‘weights’ typically used specify weights edges layout algorithm supports . case, omitting ‘weights’ setting NULL make igraph use 'weight' edge attribute graph present. However, layout algorithms support non-positive weights, layout_nicely() fail simply called graph without specifying explicit weights weights happened include non-positive numbers. strive ensure layout_nicely() works ---box graphs, rule omit ‘weights’ set NULL layout_nicely() end calling layout_with_fr() layout_with_drl(), forward weights functions issue warning . can use weights = NA silence warning.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_nicely.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Choose an appropriate graph layout algorithm automatically — layout_nicely","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple grid layout — layout_on_grid","title":"Simple grid layout — layout_on_grid","text":"layout places vertices rectangular grid, two three dimensions.","code":""},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple grid layout — layout_on_grid","text":"","code":"layout_on_grid(graph, width = 0, height = 0, dim = 2) on_grid(...) layout.grid.3d(graph, width = 0, height = 0)"},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple grid layout — layout_on_grid","text":"graph input graph. width number vertices single row grid. zero negative, 2d layouts width grid square root number vertices graph, rounded next integer. Similarly, cube root 3d layouts. height number vertices single column grid, three dimensional layouts. zero negative, determinted automatically. dim Two three. Whether make 2d 3d layout. ... Passed layout_on_grid().","code":""},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simple grid layout — layout_on_grid","text":"two-column three-column matrix.","code":""},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simple grid layout — layout_on_grid","text":"function places vertices simple rectangular grid, one . want change order vertices, see permute() function.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simple grid layout — layout_on_grid","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_on_grid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simple grid layout — layout_on_grid","text":"","code":"g <- make_lattice(c(3, 3)) layout_on_grid(g) #> [,1] [,2] #> [1,] 0 0 #> [2,] 1 0 #> [3,] 2 0 #> [4,] 0 1 #> [5,] 1 1 #> [6,] 2 1 #> [7,] 0 2 #> [8,] 1 2 #> [9,] 2 2 g2 <- make_lattice(c(3, 3, 3)) layout_on_grid(g2, dim = 3) #> [,1] [,2] [,3] #> [1,] 0 0 0 #> [2,] 1 0 0 #> [3,] 2 0 0 #> [4,] 0 1 0 #> [5,] 1 1 0 #> [6,] 2 1 0 #> [7,] 0 2 0 #> [8,] 1 2 0 #> [9,] 2 2 0 #> [10,] 0 0 1 #> [11,] 1 0 1 #> [12,] 2 0 1 #> [13,] 0 1 1 #> [14,] 1 1 1 #> [15,] 2 1 1 #> [16,] 0 2 1 #> [17,] 1 2 1 #> [18,] 2 2 1 #> [19,] 0 0 2 #> [20,] 1 0 2 #> [21,] 2 0 2 #> [22,] 0 1 2 #> [23,] 1 1 2 #> [24,] 2 1 2 #> [25,] 0 2 2 #> [26,] 1 2 2 #> [27,] 2 2 2 plot(g, layout = layout_on_grid) if (interactive() && requireNamespace(\"rgl\", quietly = TRUE)) { rglplot(g, layout = layout_on_grid(g, dim = 3)) }"},{"path":"https://r.igraph.org/reference/layout_on_sphere.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","title":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","text":"Place vertices sphere, approximately uniformly, order vertex ids.","code":""},{"path":"https://r.igraph.org/reference/layout_on_sphere.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","text":"","code":"layout_on_sphere(graph) on_sphere(...)"},{"path":"https://r.igraph.org/reference/layout_on_sphere.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","text":"graph input graph. ... Passed layout_on_sphere().","code":""},{"path":"https://r.igraph.org/reference/layout_on_sphere.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","text":"numeric matrix three columns, one row vertex.","code":""},{"path":"https://r.igraph.org/reference/layout_on_sphere.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","text":"layout_on_sphere() places vertices (approximately) uniformly surface sphere, thus 3d layout. clear however “uniformly sphere” means. want order vertices differently, permute using permute() function.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_on_sphere.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph layout with vertices on the surface of a sphere — layout_on_sphere","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_randomly.html","id":null,"dir":"Reference","previous_headings":"","what":"Randomly place vertices on a plane or in 3d space — layout_randomly","title":"Randomly place vertices on a plane or in 3d space — layout_randomly","text":"function uniformly randomly places vertices graph two three dimensions.","code":""},{"path":"https://r.igraph.org/reference/layout_randomly.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Randomly place vertices on a plane or in 3d space — layout_randomly","text":"","code":"layout_randomly(graph, dim = 2) randomly(...)"},{"path":"https://r.igraph.org/reference/layout_randomly.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Randomly place vertices on a plane or in 3d space — layout_randomly","text":"graph input graph. dim Integer scalar, dimension space use. must 2 3. ... Parameters pass layout_randomly().","code":""},{"path":"https://r.igraph.org/reference/layout_randomly.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Randomly place vertices on a plane or in 3d space — layout_randomly","text":"numeric matrix two three columns.","code":""},{"path":"https://r.igraph.org/reference/layout_randomly.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Randomly place vertices on a plane or in 3d space — layout_randomly","text":"Randomly places vertices [-1,1] square (2d) cube (3d). probably useless layout, can use starting point layout generators.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_randomly.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Randomly place vertices on a plane or in 3d space — layout_randomly","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":null,"dir":"Reference","previous_headings":"","what":"The Davidson-Harel layout algorithm — layout_with_dh","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"Place vertices graph plane, according simulated annealing algorithm Davidson Harel.","code":""},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"","code":"layout_with_dh( graph, coords = NULL, maxiter = 10, fineiter = max(10, log2(vcount(graph))), cool.fact = 0.75, weight.node.dist = 1, weight.border = 0, weight.edge.lengths = edge_density(graph)/10, weight.edge.crossings = 1 - sqrt(edge_density(graph)), weight.node.edge.dist = 0.2 * (1 - edge_density(graph)) ) with_dh(...)"},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"graph graph lay . Edge directions ignored. coords Optional starting positions vertices. argument NULL appropriate matrix starting coordinates. maxiter Number iterations perform first phase. fineiter Number iterations fine tuning phase. cool.fact Cooling factor. weight.node.dist Weight node-node distances component energy function. weight.border Weight distance border component energy function. can set zero, vertices allowed sit border. weight.edge.lengths Weight edge length component energy function. weight.edge.crossings Weight edge crossing component energy function. weight.node.edge.dist Weight node-edge distance component energy function. ... Passed layout_with_dh().","code":""},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"two- three-column matrix, row giving coordinates vertex, according ids vertex ids.","code":""},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"function implements algorithm Davidson Harel, see Ron Davidson, David Harel: Drawing Graphs Nicely Using Simulated Annealing. ACM Transactions Graphics 15(4), pp. 301-331, 1996. algorithm uses simulated annealing sophisticated energy function, unfortunately hard parameterize different graphs. original publication disclose parameter values, ones determined experimentation. algorithm consists two phases, annealing phase, fine-tuning phase. simulated annealing second phase. implementation tries follow original publication, much possible. major difference coordinates explicitly kept within bounds rectangle layout.","code":""},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"Ron Davidson, David Harel: Drawing Graphs Nicely Using Simulated Annealing. ACM Transactions Graphics 15(4), pp. 301-331, 1996.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_dh.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Davidson-Harel layout algorithm — layout_with_dh","text":"","code":"set.seed(42) ## Figures from the paper g_1b <- make_star(19, mode = \"undirected\") + path(c(2:19, 2)) + path(c(seq(2, 18, by = 2), 2)) plot(g_1b, layout = layout_with_dh) g_2 <- make_lattice(c(8, 3)) + edges(1, 8, 9, 16, 17, 24) plot(g_2, layout = layout_with_dh) g_3 <- make_empty_graph(n = 70) plot(g_3, layout = layout_with_dh) g_4 <- make_empty_graph(n = 70, directed = FALSE) + edges(1:70) plot(g_4, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_5a <- make_ring(24) plot(g_5a, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_5b <- make_ring(40) plot(g_5b, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_6 <- make_lattice(c(2, 2, 2)) plot(g_6, layout = layout_with_dh) g_7 <- graph_from_literal(1:3:5 -- 2:4:6) plot(g_7, layout = layout_with_dh, vertex.label = V(g_7)$name) g_8 <- make_ring(5) + make_ring(10) + make_ring(5) + edges( 1, 6, 2, 8, 3, 10, 4, 12, 5, 14, 7, 16, 9, 17, 11, 18, 13, 19, 15, 20 ) plot(g_8, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_9 <- make_lattice(c(3, 2, 2)) plot(g_9, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_10 <- make_lattice(c(6, 6)) plot(g_10, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_11a <- make_tree(31, 2, mode = \"undirected\") plot(g_11a, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_11b <- make_tree(21, 4, mode = \"undirected\") plot(g_11b, layout = layout_with_dh, vertex.size = 5, vertex.label = NA) g_12 <- make_empty_graph(n = 37, directed = FALSE) + path(1:5, 10, 22, 31, 37:33, 27, 16, 6, 1) + path(6, 7, 11, 9, 10) + path(16:22) + path(27:31) + path(2, 7, 18, 28, 34) + path(3, 8, 11, 19, 29, 32, 35) + path(4, 9, 20, 30, 36) + path(1, 7, 12, 14, 19, 24, 26, 30, 37) + path(5, 9, 13, 15, 19, 23, 25, 28, 33) + path(3, 12, 16, 25, 35, 26, 22, 13, 3) plot(g_12, layout = layout_with_dh, vertex.size = 5, vertex.label = NA)"},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":null,"dir":"Reference","previous_headings":"","what":"The DrL graph layout generator — layout_with_drl","title":"The DrL graph layout generator — layout_with_drl","text":"DrL force-directed graph layout toolbox focused real-world large-scale graphs, developed Shawn Martin colleagues Sandia National Laboratories.","code":""},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The DrL graph layout generator — layout_with_drl","text":"","code":"layout_with_drl( graph, use.seed = FALSE, seed = matrix(runif(vcount(graph) * 2), ncol = 2), options = drl_defaults$default, weights = NULL, dim = 2 ) with_drl(...)"},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The DrL graph layout generator — layout_with_drl","text":"graph input graph, can directed undirected. use.seed Logical scalar, whether use coordinates given seed argument starting point. seed matrix two columns, starting coordinates vertices use.seed TRUE. ignored otherwise. options Options layout generator, named list. See details . weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use layout. Larger edge weights correspond stronger connections. dim Either ‘2’ ‘3’, specifies whether want two dimensional three dimensional layout. Note nature DrL algorithm, three dimensional layout takes significantly longer compute. ... Passed layout_with_drl().","code":""},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The DrL graph layout generator — layout_with_drl","text":"numeric matrix two columns.","code":""},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The DrL graph layout generator — layout_with_drl","text":"function implements force-directed DrL layout generator. generator following parameters: edge.cut Edge cutting done late stages algorithm order achieve less dense layouts. Edges cut lot stress (large value objective function sum). edge cutting parameter value 0 1 0 representing edge cutting 1 representing maximal edge cutting. init.iterations Number iterations first phase. init.temperature Start temperature, first phase. init.attraction Attraction, first phase. init.damping.mult Damping, first phase. liquid.iterations Number iterations, liquid phase. liquid.temperature Start temperature, liquid phase. liquid.attraction Attraction, liquid phase. liquid.damping.mult Damping, liquid phase. expansion.iterations Number iterations, expansion phase. expansion.temperature Start temperature, expansion phase. expansion.attraction Attraction, expansion phase. expansion.damping.mult Damping, expansion phase. cooldown.iterations Number iterations, cooldown phase. cooldown.temperature Start temperature, cooldown phase. cooldown.attraction Attraction, cooldown phase. cooldown.damping.mult Damping, cooldown phase. crunch.iterations Number iterations, crunch phase. crunch.temperature Start temperature, crunch phase. crunch.attraction Attraction, crunch phase. crunch.damping.mult Damping, crunch phase. simmer.iterations Number iterations, simmer phase. simmer.temperature Start temperature, simmer phase. simmer.attraction Attraction, simmer phase. simmer.damping.mult Damping, simmer phase.","code":""},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The DrL graph layout generator — layout_with_drl","text":"See following technical report: Martin, S., Brown, W.M., Klavans, R., Boyack, K.W., DrL: Distributed Recursive (Graph) Layout. SAND Reports, 2008. 2936: p. 1-10.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The DrL graph layout generator — layout_with_drl","text":"Shawn Martin (http://www.cs.otago.ac.nz/homepages/smartin/) Gabor Csardi csardi.gabor@gmail.com R/igraph interface three dimensional version.","code":""},{"path":"https://r.igraph.org/reference/layout_with_drl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The DrL graph layout generator — layout_with_drl","text":"","code":"g <- as.undirected(sample_pa(100, m = 1)) l <- layout_with_drl(g, options = list(simmer.attraction = 0)) plot(g, layout = l, vertex.size = 3, vertex.label = NA)"},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":null,"dir":"Reference","previous_headings":"","what":"The Fruchterman-Reingold layout algorithm — layout_with_fr","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"Place vertices plane using force-directed layout algorithm Fruchterman Reingold.","code":""},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"","code":"layout_with_fr( graph, coords = NULL, dim = 2, niter = 500, start.temp = sqrt(vcount(graph)), grid = c(\"auto\", \"grid\", \"nogrid\"), weights = NULL, minx = NULL, maxx = NULL, miny = NULL, maxy = NULL, minz = NULL, maxz = NULL, coolexp, maxdelta, area, repulserad, maxiter ) with_fr(...)"},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"graph graph lay . Edge directions ignored. coords Optional starting positions vertices. argument NULL appropriate matrix starting coordinates. dim Integer scalar, 2 3, dimension layout. Two dimensional layouts places plane, three dimensional ones 3d space. niter Integer scalar, number iterations perform. start.temp Real scalar, start temperature. maximum amount movement alloved along one axis, within one step, vertex. Currently decreased linearly zero iteration. grid Character scalar, whether use faster, less accurate grid based implementation algorithm. default (“auto”), grid-based implementation used graph one thousand vertices. weights vector giving edge weights. weight edge attribute used default, present. weights given, attraction along edges multiplied given edge weights. places vertices connected highly weighted edge closer . Weights must positive. minx NULL, must numeric vector gives lower boundaries ‘x’ coordinates vertices. length vector must match number vertices graph. maxx Similar minx, gives upper boundaries. miny Similar minx, gives lower boundaries ‘y’ coordinates. maxy Similar minx, gives upper boundaries ‘y’ coordinates. minz Similar minx, gives lower boundaries ‘z’ coordinates. maxz Similar minx, gives upper boundaries ‘z’ coordinates. coolexp, maxdelta, area, repulserad arguments supported igraph version 0.8.0 ignored (warning). maxiter deprecated synonym niter, compatibility. ... Passed layout_with_fr().","code":""},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"two- three-column matrix, row giving coordinates vertex, according ids vertex ids.","code":""},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"See referenced paper details algorithm. function rewritten scratch igraph version 0.8.0.","code":""},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"Fruchterman, T.M.J. Reingold, E.M. (1991). Graph Drawing Force-directed Placement. Software - Practice Experience, 21(11):1129-1164.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_fr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Fruchterman-Reingold layout algorithm — layout_with_fr","text":"","code":"# Fixing ego g <- sample_pa(20, m = 2) minC <- rep(-Inf, vcount(g)) maxC <- rep(Inf, vcount(g)) minC[1] <- maxC[1] <- 0 co <- layout_with_fr(g, minx = minC, maxx = maxC, miny = minC, maxy = maxC ) co[1, ] #> [1] 0 0 plot(g, layout = co, vertex.size = 30, edge.arrow.size = 0.2, vertex.label = c(\"ego\", rep(\"\", vcount(g) - 1)), rescale = FALSE, xlim = range(co[, 1]), ylim = range(co[, 2]), vertex.label.dist = 0, vertex.label.color = \"red\" ) axis(1) axis(2)"},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":null,"dir":"Reference","previous_headings":"","what":"The GEM layout algorithm — layout_with_gem","title":"The GEM layout algorithm — layout_with_gem","text":"Place vertices plane using GEM force-directed layout algorithm.","code":""},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The GEM layout algorithm — layout_with_gem","text":"","code":"layout_with_gem( graph, coords = NULL, maxiter = 40 * vcount(graph)^2, temp.max = max(vcount(graph), 1), temp.min = 1/10, temp.init = sqrt(max(vcount(graph), 1)) ) with_gem(...)"},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The GEM layout algorithm — layout_with_gem","text":"graph input graph. Edge directions ignored. coords NULL, starting coordinates given , two three column matrix, depending dim argument. maxiter maximum number iterations perform. Updating single vertex counts iteration. reasonable default 40 * n * n, n number vertices. original paper suggests 4 * n * n, usually works parameters set carefully. temp.max maximum allowed local temperature. reasonable default number vertices. temp.min global temperature algorithm terminates (even reaching maxiter iterations). reasonable default 1/10. temp.init Initial local temperature vertices. reasonable default square root number vertices. ... Passed layout_with_gem().","code":""},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The GEM layout algorithm — layout_with_gem","text":"numeric matrix two columns, many rows number vertices.","code":""},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The GEM layout algorithm — layout_with_gem","text":"See referenced paper details algorithm.","code":""},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The GEM layout algorithm — layout_with_gem","text":"Arne Frick, Andreas Ludwig, Heiko Mehldau: Fast Adaptive Layout Algorithm Undirected Graphs, Proc. Graph Drawing 1994, LNCS 894, pp. 388-403, 1995.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The GEM layout algorithm — layout_with_gem","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_gem.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The GEM layout algorithm — layout_with_gem","text":"","code":"set.seed(42) g <- make_ring(10) plot(g, layout = layout_with_gem)"},{"path":"https://r.igraph.org/reference/layout_with_graphopt.html","id":null,"dir":"Reference","previous_headings":"","what":"The graphopt layout algorithm — layout_with_graphopt","title":"The graphopt layout algorithm — layout_with_graphopt","text":"force-directed layout algorithm, scales relatively well large graphs.","code":""},{"path":"https://r.igraph.org/reference/layout_with_graphopt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The graphopt layout algorithm — layout_with_graphopt","text":"","code":"layout_with_graphopt( graph, start = NULL, niter = 500, charge = 0.001, mass = 30, spring.length = 0, spring.constant = 1, max.sa.movement = 5 ) with_graphopt(...)"},{"path":"https://r.igraph.org/reference/layout_with_graphopt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The graphopt layout algorithm — layout_with_graphopt","text":"graph input graph. start given, matrix two columns one line vertex. matrix used starting positions algorithm. given, random starting matrix used. niter Integer scalar, number iterations perform. couple hundred general. large graph might want iterations check result. good enough can feed start argument. default value 500. charge charge vertices, used calculate electric repulsion. default 0.001. mass mass vertices, used spring forces. default 30. spring.length length springs, integer number. default value zero. spring.constant spring constant, default value one. max.sa.movement Real constant, gives maximum amount movement allowed single step along single axis. default value 5. ... Passed layout_with_graphopt().","code":""},{"path":"https://r.igraph.org/reference/layout_with_graphopt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The graphopt layout algorithm — layout_with_graphopt","text":"numeric matrix two columns, row vertex.","code":""},{"path":"https://r.igraph.org/reference/layout_with_graphopt.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The graphopt layout algorithm — layout_with_graphopt","text":"layout_with_graphopt() port graphopt layout algorithm Michael Schmuhl. graphopt version 0.4.1 rewritten C support layers removed (might added later) code bit reorganized avoid unnecessary steps node charge (see ) zero. graphopt uses physical analogies defining attracting repelling forces among vertices physical system simulated reaches equilibrium. (simulated annealing anything like , stable fixed point guaranteed.)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_graphopt.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The graphopt layout algorithm — layout_with_graphopt","text":"Michael Schmuhl original graphopt code, rewritten wrapped Gabor Csardi csardi.gabor@gmail.com.","code":""},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":null,"dir":"Reference","previous_headings":"","what":"The Kamada-Kawai layout algorithm — layout_with_kk","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"Place vertices plane, 3D space, based physical model springs.","code":""},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"","code":"layout_with_kk( graph, coords = NULL, dim = 2, maxiter = 50 * vcount(graph), epsilon = 0, kkconst = max(vcount(graph), 1), weights = NULL, minx = NULL, maxx = NULL, miny = NULL, maxy = NULL, minz = NULL, maxz = NULL, niter, sigma, initemp, coolexp, start ) with_kk(...)"},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"graph input graph. Edge directions ignored. coords NULL, starting coordinates given , two three column matrix, depending dim argument. dim Integer scalar, 2 3, dimension layout. Two dimensional layouts places plane, three dimensional ones 3d space. maxiter maximum number iterations perform. algorithm might terminate earlier, see epsilon argument. epsilon Numeric scalar, algorithm terminates, maximal delta less . (See reference delta means.) set zero, function always performs maxiter iterations. kkconst Numeric scalar, Kamada-Kawai vertex attraction constant. Typical (default) value number vertices. weights Edge weights, larger values result longer edges. Note opposite layout_with_fr(). Weights must positive. minx NULL, must numeric vector gives lower boundaries ‘x’ coordinates vertices. length vector must match number vertices graph. maxx Similar minx, gives upper boundaries. miny Similar minx, gives lower boundaries ‘y’ coordinates. maxy Similar minx, gives upper boundaries ‘y’ coordinates. minz Similar minx, gives lower boundaries ‘z’ coordinates. maxz Similar minx, gives upper boundaries ‘z’ coordinates. niter, sigma, initemp, coolexp arguments supported igraph version 0.8.0 ignored (warning). start Deprecated synonym coords, compatibility. ... Passed layout_with_kk().","code":""},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"numeric matrix two (dim=2) three (dim=3) columns, many rows number vertices, x, y potentially z coordinates vertices.","code":""},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"See referenced paper details algorithm. function rewritten scratch igraph version 0.8.0 follows truthfully original publication Kamada Kawai now.","code":""},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"Kamada, T. Kawai, S.: Algorithm Drawing General Undirected Graphs. Information Processing Letters, 31/1, 7–15, 1989.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_kk.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Kamada-Kawai layout algorithm — layout_with_kk","text":"","code":"g <- make_ring(10) E(g)$weight <- rep(1:2, length.out = ecount(g)) plot(g, layout = layout_with_kk, edge.label = E(g)$weight)"},{"path":"https://r.igraph.org/reference/layout_with_lgl.html","id":null,"dir":"Reference","previous_headings":"","what":"Large Graph Layout — layout_with_lgl","title":"Large Graph Layout — layout_with_lgl","text":"layout generator larger graphs.","code":""},{"path":"https://r.igraph.org/reference/layout_with_lgl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Large Graph Layout — layout_with_lgl","text":"","code":"layout_with_lgl( graph, maxiter = 150, maxdelta = vcount(graph), area = vcount(graph)^2, coolexp = 1.5, repulserad = area * vcount(graph), cellsize = sqrt(sqrt(area)), root = NULL ) with_lgl(...)"},{"path":"https://r.igraph.org/reference/layout_with_lgl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Large Graph Layout — layout_with_lgl","text":"graph input graph maxiter maximum number iterations perform (150). maxdelta maximum change vertex iteration (number vertices). area area surface vertices placed (square number vertices). coolexp cooling exponent simulated annealing (1.5). repulserad Cancellation radius repulsion (area times number vertices). cellsize size cells grid. calculating repulsion forces vertices vertices neighboring grid cells taken account (fourth root number area. root id vertex place middle layout. default value -1 means random vertex selected. ... Passed layout_with_lgl().","code":""},{"path":"https://r.igraph.org/reference/layout_with_lgl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Large Graph Layout — layout_with_lgl","text":"numeric matrix two columns many rows vertices.","code":""},{"path":"https://r.igraph.org/reference/layout_with_lgl.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Large Graph Layout — layout_with_lgl","text":"layout_with_lgl() large connected graphs, similar layout generator Large Graph Layout software (https://lgl.sourceforge.net/).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_lgl.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Large Graph Layout — layout_with_lgl","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph layout by multidimensional scaling — layout_with_mds","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"Multidimensional scaling distance matrix defined vertices graph.","code":""},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"","code":"layout_with_mds(graph, dist = NULL, dim = 2, options = arpack_defaults()) with_mds(...)"},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"graph input graph. dist distance matrix multidimensional scaling. NULL (default), unweighted shortest path matrix used. dim layout_with_mds() supports dimensions number nodes minus one, graph connected; unconnected graphs, possible value 2. merge_coords() works 2D. options currently ignored, ARPACK used solving eigenproblem ... Passed layout_with_mds().","code":""},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"numeric matrix dim columns.","code":""},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"layout_with_mds() uses classical multidimensional scaling (Torgerson scaling) generating coordinates. Multidimensional scaling aims place points higher dimensional space (typically) 2 dimensional plane, distances points kept much possible. default igraph uses shortest path matrix distances nodes, user can override via dist argument. Warning: graph symmetric exchange two vertices (case leaves tree connecting parent), classical multidimensional scaling may assign coordinates vertices. function generates layout separately graph component merges via merge_coords().","code":""},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"Cox, T. F. Cox, M. . . (2001) Multidimensional Scaling. Second edition. Chapman Hall.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_mds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph layout by multidimensional scaling — layout_with_mds","text":"","code":"g <- sample_gnp(100, 2 / 100) l <- layout_with_mds(g) plot(g, layout = l, vertex.label = NA, vertex.size = 3)"},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":null,"dir":"Reference","previous_headings":"","what":"The Sugiyama graph layout generator — layout_with_sugiyama","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"Sugiyama layout algorithm layered directed acyclic graphs. algorithm minimized edge crossings.","code":""},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"","code":"layout_with_sugiyama( graph, layers = NULL, hgap = 1, vgap = 1, maxiter = 100, weights = NULL, attributes = c(\"default\", \"all\", \"none\") ) with_sugiyama(...)"},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"graph input graph. layers numeric vector NULL. NULL, specify layer index vertices. Layers numbered one. NULL, igraph calculates layers automatically. hgap Real scalar, minimum horizontal gap vertices layer. vgap Real scalar, distance layers. maxiter Integer scalar, maximum number iterations crossing minimization stage. 100 reasonable default; feel many edge crossings, increase . weights Optional edge weight vector. NULL, 'weight' edge attribute used, one. Supply NA igraph ignores edge weights. used graph contains cycles; igraph tend reverse edges smaller weights breaking cycles. attributes graph/vertex/edge attributes keep extended graph. ‘default’ keeps ‘size’, ‘size2’, ‘shape’, ‘label’ ‘color’ vertex attributes ‘arrow.mode’ ‘arrow.size’ edge attributes. ‘’ keep graph, vertex edge attributes, ‘none’ keeps none . ... Passed layout_with_sugiyama().","code":""},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"list components: layout layout, two-column matrix, original graph vertices. layout.dummy layout dummy vertices, two column matrix. extd_graph original graph, extended dummy vertices. ‘dummy’ vertex attribute set graph, logical attributes, tells whether vertex dummy vertex. ‘layout’ graph attribute also set, layout matrix (original dummy) vertices.","code":""},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"layout algorithm designed directed acyclic graphs vertex assigned layer. Layers indexed zero, vertices layer placed horizontal line. X coordinates vertices within layer decided heuristic proposed Sugiyama et al. minimize edge crossings. can also try lay undirected graphs, graphs containing cycles, graphs without priori layered assignment algorithm. igraph try eliminate cycles assign vertices layers, guarantee quality layout cases. Sugiyama layout may introduce “bends” edges order obtain visually pleasing layout. achieved adding dummy nodes edges spanning one layer. resulting layout assigns coordinates nodes original graph also dummy nodes. layout algorithm also return extended graph dummy nodes. details, see reference .","code":""},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"K. Sugiyama, S. Tagawa M. Toda, \"Methods Visual Understanding Hierarchical Systems\". IEEE Transactions Systems, Man Cybernetics 11(2):109-125, 1981.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/layout_with_sugiyama.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Sugiyama graph layout generator — layout_with_sugiyama","text":"","code":"## Data taken from http://tehnick-8.narod.ru/dc_clients/ DC <- graph_from_literal( \"DC++\" -+ \"LinuxDC++\":\"BCDC++\":\"EiskaltDC++\":\"StrongDC++\":\"DiCe!++\", \"LinuxDC++\" -+ \"FreeDC++\", \"BCDC++\" -+ \"StrongDC++\", \"FreeDC++\" -+ \"BMDC++\":\"EiskaltDC++\", \"StrongDC++\" -+ \"AirDC++\":\"zK++\":\"ApexDC++\":\"TkDC++\", \"StrongDC++\" -+ \"StrongDC++ SQLite\":\"RSX++\", \"ApexDC++\" -+ \"FlylinkDC++ ver <= 4xx\", \"ApexDC++\" -+ \"ApexDC++ Speed-Mod\":\"DiCe!++\", \"StrongDC++ SQLite\" -+ \"FlylinkDC++ ver >= 5xx\", \"ApexDC++ Speed-Mod\" -+ \"FlylinkDC++ ver <= 4xx\", \"ApexDC++ Speed-Mod\" -+ \"GreylinkDC++\", \"FlylinkDC++ ver <= 4xx\" -+ \"FlylinkDC++ ver >= 5xx\", \"FlylinkDC++ ver <= 4xx\" -+ AvaLink, \"GreylinkDC++\" -+ AvaLink:\"RayLinkDC++\":\"SparkDC++\":PeLink ) ## Use edge types E(DC)$lty <- 1 E(DC)[\"BCDC++\" %->% \"StrongDC++\"]$lty <- 2 E(DC)[\"FreeDC++\" %->% \"EiskaltDC++\"]$lty <- 2 E(DC)[\"ApexDC++\" %->% \"FlylinkDC++ ver <= 4xx\"]$lty <- 2 E(DC)[\"ApexDC++\" %->% \"DiCe!++\"]$lty <- 2 E(DC)[\"StrongDC++ SQLite\" %->% \"FlylinkDC++ ver >= 5xx\"]$lty <- 2 E(DC)[\"GreylinkDC++\" %->% \"AvaLink\"]$lty <- 2 ## Layers, as on the plot layers <- list( c(\"DC++\"), c(\"LinuxDC++\", \"BCDC++\"), c(\"FreeDC++\", \"StrongDC++\"), c( \"BMDC++\", \"EiskaltDC++\", \"AirDC++\", \"zK++\", \"ApexDC++\", \"TkDC++\", \"RSX++\" ), c(\"StrongDC++ SQLite\", \"ApexDC++ Speed-Mod\", \"DiCe!++\"), c(\"FlylinkDC++ ver <= 4xx\", \"GreylinkDC++\"), c( \"FlylinkDC++ ver >= 5xx\", \"AvaLink\", \"RayLinkDC++\", \"SparkDC++\", \"PeLink\" ) ) ## Check that we have all nodes all(sort(unlist(layers)) == sort(V(DC)$name)) #> [1] TRUE ## Add some graphical parameters V(DC)$color <- \"white\" V(DC)$shape <- \"rectangle\" V(DC)$size <- 20 V(DC)$size2 <- 10 V(DC)$label <- lapply(V(DC)$name, function(x) { paste(strwrap(x, 12), collapse = \"\\n\") }) E(DC)$arrow.size <- 0.5 ## Create a similar layout using the predefined layers lay1 <- layout_with_sugiyama(DC, layers = apply(sapply( layers, function(x) V(DC)$name %in% x ), 1, which)) ## Simple plot, not very nice par(mar = rep(.1, 4)) plot(DC, layout = lay1$layout, vertex.label.cex = 0.5) ## Sugiyama plot plot(lay1$extd_graph, vertex.label.cex = 0.5) ## The same with automatic layer calculation ## Keep vertex/edge attributes in the extended graph lay2 <- layout_with_sugiyama(DC, attributes = \"all\") plot(lay2$extd_graph, vertex.label.cex = 0.5) ## Another example, from the following paper: ## Markus Eiglsperger, Martin Siebenhaller, Michael Kaufmann: ## An Efficient Implementation of Sugiyama's Algorithm for ## Layered Graph Drawing, Journal of Graph Algorithms and ## Applications 9, 305--325 (2005). ex <- graph_from_literal( 0 -+ 29:6:5:20:4, 1 -+ 12, 2 -+ 23:8, 3 -+ 4, 4, 5 -+ 2:10:14:26:4:3, 6 -+ 9:29:25:21:13, 7, 8 -+ 20:16, 9 -+ 28:4, 10 -+ 27, 11 -+ 9:16, 12 -+ 9:19, 13 -+ 20, 14 -+ 10, 15 -+ 16:27, 16 -+ 27, 17 -+ 3, 18 -+ 13, 19 -+ 9, 20 -+ 4, 21 -+ 22, 22 -+ 8:9, 23 -+ 9:24, 24 -+ 12:15:28, 25 -+ 11, 26 -+ 18, 27 -+ 13:19, 28 -+ 7, 29 -+ 25 ) layers <- list( 0, c(5, 17), c(2, 14, 26, 3), c(23, 10, 18), c(1, 24), 12, 6, c(29, 21), c(25, 22), c(11, 8, 15), 16, 27, c(13, 19), c(9, 20), c(4, 28), 7 ) layex <- layout_with_sugiyama(ex, layers = apply( sapply( layers, function(x) V(ex)$name %in% as.character(x) ), 1, which )) origvert <- c(rep(TRUE, vcount(ex)), rep(FALSE, nrow(layex$layout.dummy))) realedge <- as_edgelist(layex$extd_graph)[, 2] <= vcount(ex) plot(layex$extd_graph, vertex.label.cex = 0.5, edge.arrow.size = .5, vertex.size = ifelse(origvert, 5, 0), vertex.shape = ifelse(origvert, \"square\", \"none\"), vertex.label = ifelse(origvert, V(ex)$name, \"\"), edge.arrow.mode = ifelse(realedge, 2, 0) )"},{"path":"https://r.igraph.org/reference/leading.eigenvector.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure detecting based on the leading eigenvector of the community matrix — leading.eigenvector.community","title":"Community structure detecting based on the leading eigenvector of the community matrix — leading.eigenvector.community","text":"leading.eigenvector.community() renamed cluster_leading_eigen() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/leading.eigenvector.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure detecting based on the leading eigenvector of the community matrix — leading.eigenvector.community","text":"","code":"leading.eigenvector.community( graph, steps = -1, weights = NULL, start = NULL, options = arpack_defaults(), callback = NULL, extra = NULL, env = parent.frame() )"},{"path":"https://r.igraph.org/reference/leading.eigenvector.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure detecting based on the leading eigenvector of the community matrix — leading.eigenvector.community","text":"graph input graph. undirected method needs symmetric matrix. steps number steps take, actually number tries make step. particularly useful parameter. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. start NULL, numeric membership vector, giving start configuration algorithm. options named list override ARPACK options. callback NULL, must callback function. called iteration, calculating leading eigenvector modularity matrix. See details . extra Additional argument supply callback function. env environment callback function evaluated.","code":""},{"path":"https://r.igraph.org/reference/list.edge.attributes.html","id":null,"dir":"Reference","previous_headings":"","what":"List names of edge attributes — list.edge.attributes","title":"List names of edge attributes — list.edge.attributes","text":"list.edge.attributes() renamed edge_attr_names() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/list.edge.attributes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List names of edge attributes — list.edge.attributes","text":"","code":"list.edge.attributes(graph)"},{"path":"https://r.igraph.org/reference/list.edge.attributes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List names of edge attributes — list.edge.attributes","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/list.graph.attributes.html","id":null,"dir":"Reference","previous_headings":"","what":"List names of graph attributes — list.graph.attributes","title":"List names of graph attributes — list.graph.attributes","text":"list.graph.attributes() renamed graph_attr_names() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/list.graph.attributes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List names of graph attributes — list.graph.attributes","text":"","code":"list.graph.attributes(graph)"},{"path":"https://r.igraph.org/reference/list.graph.attributes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List names of graph attributes — list.graph.attributes","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/list.vertex.attributes.html","id":null,"dir":"Reference","previous_headings":"","what":"List names of vertex attributes — list.vertex.attributes","title":"List names of vertex attributes — list.vertex.attributes","text":"list.vertex.attributes() renamed vertex_attr_names() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/list.vertex.attributes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List names of vertex attributes — list.vertex.attributes","text":"","code":"list.vertex.attributes(graph)"},{"path":"https://r.igraph.org/reference/list.vertex.attributes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List names of vertex attributes — list.vertex.attributes","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/local_scan.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute local scan statistics on graphs — local_scan","title":"Compute local scan statistics on graphs — local_scan","text":"scan statistic summary locality statistics computed local neighborhood vertex. local_scan() function computes local statistics vertex given neighborhood size statistic function.","code":""},{"path":"https://r.igraph.org/reference/local_scan.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute local scan statistics on graphs — local_scan","text":"","code":"local_scan( graph.us, graph.them = NULL, k = 1, FUN = NULL, weighted = FALSE, mode = c(\"out\", \"in\", \"all\"), neighborhoods = NULL, ... )"},{"path":"https://r.igraph.org/reference/local_scan.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute local scan statistics on graphs — local_scan","text":"graph.us, graph igraph object, graph scan statistics computed graph.igraph object NULL, NULL, ‘’ statistics computed, .e. neighborhoods calculated graph.us evaluated graph.. k integer scalar, size local neighborhood vertex. non-negative. FUN Character, function name, function object , computing local statistic neighborhood. NULL(default value), ecount() used unweighted graphs (weighted=FALSE) function computes sum edge weights used weighted graphs (weighted=TRUE). argument ignored k zero. weighted Logical scalar, TRUE edge weights used computation scan statistic. TRUE, graph weighted. Note argument ignored FUN NULL, \"ecount\" \"sumweights\". mode Character scalar, kind neighborhoods use calculation. One ‘’, ‘’, ‘’ ‘total’. argument ignored undirected graphs. neighborhoods list neighborhoods, one vertex, NULL. NULL, function evaluated induced subgraphs specified neighborhoods. theory useful graph.us graph used multiple graph.arguments. neighborhoods can calculated graph.us used multiple graphs. practice, currently slower simply using graph.multiple times. ... Arguments passed FUN, function computes local statistics.","code":""},{"path":"https://r.igraph.org/reference/local_scan.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute local scan statistics on graphs — local_scan","text":"local_scan() typically numeric vector containing computed local statistics vertex. general list vector objects, returned FUN.","code":""},{"path":"https://r.igraph.org/reference/local_scan.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute local scan statistics on graphs — local_scan","text":"See given reference details local scan statistics. local_scan() calculates exact local scan statistics. graph.NULL, local_scan() computes ‘us’ variant scan statistics. Otherwise, graph.igraph object ‘’ variant computed using graph.us extract neighborhood information, applying FUN neighborhoods graph..","code":""},{"path":"https://r.igraph.org/reference/local_scan.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compute local scan statistics on graphs — local_scan","text":"Priebe, C. E., Conroy, J. M., Marchette, D. J., Park, Y. (2005). Scan Statistics Enron Graphs. Computational Mathematical Organization Theory.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/local_scan.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute local scan statistics on graphs — local_scan","text":"","code":"pair <- sample_correlated_gnp_pair(n = 10^3, corr = 0.8, p = 0.1) local_0_us <- local_scan(graph.us = pair$graph1, k = 0) local_1_us <- local_scan(graph.us = pair$graph1, k = 1) local_0_them <- local_scan( graph.us = pair$graph1, graph.them = pair$graph2, k = 0 ) local_1_them <- local_scan( graph.us = pair$graph1, graph.them = pair$graph2, k = 1 ) Neigh_1 <- neighborhood(pair$graph1, order = 1) local_1_them_nhood <- local_scan( graph.us = pair$graph1, graph.them = pair$graph2, neighborhoods = Neigh_1 )"},{"path":"https://r.igraph.org/reference/make_.html","id":null,"dir":"Reference","previous_headings":"","what":"Make a new graph — make_","title":"Make a new graph — make_","text":"generic function creating graphs.","code":""},{"path":"https://r.igraph.org/reference/make_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make a new graph — make_","text":"","code":"make_(...)"},{"path":"https://r.igraph.org/reference/make_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make a new graph — make_","text":"... Parameters, see details .","code":""},{"path":"https://r.igraph.org/reference/make_.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Make a new graph — make_","text":"make_() generic function creating graphs. every graph constructor igraph make_ prefix, corresponding function without prefix: e.g. make_ring() also ring(), etc. true random graph samplers, .e. constructor sample_ prefix, corresponding function without prefix. shorter forms can used together make_(). advantage form user can specify constructor modifiers work constructors. E.g. with_vertex_() modifier adds vertex attributes newly created graphs. See examples various constructor modifiers .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make a new graph — make_","text":"","code":"r <- make_(ring(10)) l <- make_(lattice(c(3, 3, 3))) r2 <- make_(ring(10), with_vertex_(color = \"red\", name = LETTERS[1:10])) l2 <- make_(lattice(c(3, 3, 3)), with_edge_(weight = 2)) ran <- sample_(degseq(c(3, 3, 3, 3, 3, 3), method = \"simple\"), simplified()) degree(ran) #> [1] 3 3 3 1 3 3 is_simple(ran) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a bipartite graph — make_bipartite_graph","title":"Create a bipartite graph — make_bipartite_graph","text":"bipartite graph two kinds vertices connections allowed different kinds.","code":""},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a bipartite graph — make_bipartite_graph","text":"","code":"make_bipartite_graph(types, edges, directed = FALSE) bipartite_graph(...)"},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a bipartite graph — make_bipartite_graph","text":"types vector giving vertex types. coerced boolean. length vector gives number vertices graph. vector named vector, names attached graph name vertex attribute. edges vector giving edges graph, way regular graph() function. checked edges indeed connect vertices different kind, according supplied types vector. vector may string vector types named vector. directed Whether create directed graph, boolean constant. Note default undirected graphs created, common bipartite graphs. ... Passed make_bipartite_graph().","code":""},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a bipartite graph — make_bipartite_graph","text":"make_bipartite_graph() returns bipartite igraph graph. words, igraph graph vertex attribute named type. is_bipartite() returns logical scalar.","code":""},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a bipartite graph — make_bipartite_graph","text":"Bipartite graphs type vertex attribute igraph, boolean FALSE vertices first kind TRUE vertices second kind. make_bipartite_graph() basically three things. First checks edges vector vertex types. creates graph using edges vector finally adds types vector vertex attribute called type. edges may contain strings vertex names; case, types must named vector specifies type vertex name occurs edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a bipartite graph — make_bipartite_graph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/make_bipartite_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a bipartite graph — make_bipartite_graph","text":"","code":"g <- make_bipartite_graph(rep(0:1, length.out = 10), c(1:10)) print(g, v = TRUE) #> IGRAPH c8ed103 U--B 10 5 -- #> + attr: type (v/l) #> + edges from c8ed103: #> [1] 1-- 2 3-- 4 5-- 6 7-- 8 9--10"},{"path":"https://r.igraph.org/reference/make_chordal_ring.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an extended chordal ring graph — make_chordal_ring","title":"Create an extended chordal ring graph — make_chordal_ring","text":"make_chordal_ring() creates extended chordal ring. extended chordal ring regular graph, node degree. can obtained simple ring adding extra edges specified matrix. Let p denote number columns ‘W’ matrix. extra edges vertex added according column mod p ‘W’. number extra edges number rows ‘W’: row j edge ->+w[ij] added +w[ij] less number total nodes. See also Kotsis, G: Interconnection Topologies Parallel Processing Systems, PARS Mitteilungen 11, 1-6, 1993.","code":""},{"path":"https://r.igraph.org/reference/make_chordal_ring.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an extended chordal ring graph — make_chordal_ring","text":"","code":"make_chordal_ring(n, w, directed = FALSE) chordal_ring(...)"},{"path":"https://r.igraph.org/reference/make_chordal_ring.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an extended chordal ring graph — make_chordal_ring","text":"n number vertices. w matrix specifies extended chordal ring. See details . directed Logical scalar, whether create directed graph. ... Passed make_chordal_ring().","code":""},{"path":"https://r.igraph.org/reference/make_chordal_ring.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an extended chordal ring graph — make_chordal_ring","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_chordal_ring.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create an extended chordal ring graph — make_chordal_ring","text":"","code":"chord <- make_chordal_ring( 15, matrix(c(3, 12, 4, 7, 8, 11), nr = 2) )"},{"path":"https://r.igraph.org/reference/make_clusters.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a communities object. — make_clusters","title":"Creates a communities object. — make_clusters","text":"useful integrate results community finding algorithms included igraph.","code":""},{"path":"https://r.igraph.org/reference/make_clusters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a communities object. — make_clusters","text":"","code":"make_clusters( graph, membership = NULL, algorithm = NULL, merges = NULL, modularity = TRUE )"},{"path":"https://r.igraph.org/reference/make_clusters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a communities object. — make_clusters","text":"graph graph community structure. membership membership vector community structure, numeric vector denoting id community vertex. might NULL hierarchical community structures. algorithm Character string, algorithm generated community structure, can arbitrary. merges merge matrix, hierarchical community structures (NULL otherwise. modularity Modularity value community structure. TRUE membership vector available, modularity values calculated automatically.","code":""},{"path":"https://r.igraph.org/reference/make_clusters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a communities object. — make_clusters","text":"communities object.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"De Bruijn graphs — make_de_bruijn_graph","title":"De Bruijn graphs — make_de_bruijn_graph","text":"De Bruijn graphs labeled graphs representing overlap strings.","code":""},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"De Bruijn graphs — make_de_bruijn_graph","text":"","code":"make_de_bruijn_graph(m, n) de_bruijn_graph(...)"},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"De Bruijn graphs — make_de_bruijn_graph","text":"m Integer scalar, size alphabet. See details . n Integer scalar, length labels. See details . ... Passed make_de_bruijn_graph().","code":""},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"De Bruijn graphs — make_de_bruijn_graph","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"De Bruijn graphs — make_de_bruijn_graph","text":"de Bruijn graph represents relationships strings. alphabet m letters used strings length n considered. vertex corresponds every possible string directed edge vertex v vertex w string v can transformed string w removing first letter appending letter . Please note graph m power n vertices even edges, probably want supply big numbers m n. De Bruijn graphs interesting properties, please see another source, e.g. Wikipedia details.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"De Bruijn graphs — make_de_bruijn_graph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/make_de_bruijn_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"De Bruijn graphs — make_de_bruijn_graph","text":"","code":"# de Bruijn graphs can be created recursively by line graphs as well g <- make_de_bruijn_graph(2, 1) make_de_bruijn_graph(2, 2) #> IGRAPH 72b7ebe D--- 4 8 -- De-Bruijn graph 2-2 #> + attr: name (g/c), m (g/n), n (g/n) #> + edges from 72b7ebe: #> [1] 1->1 1->2 2->3 2->4 3->1 3->2 4->3 4->4 make_line_graph(g) #> IGRAPH b6b730b D--- 4 8 -- Line graph #> + attr: name (g/c) #> + edges from b6b730b: #> [1] 1->1 3->1 1->2 3->2 2->3 4->3 2->4 4->4"},{"path":"https://r.igraph.org/reference/make_empty_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"A graph with no edges — make_empty_graph","title":"A graph with no edges — make_empty_graph","text":"graph edges","code":""},{"path":"https://r.igraph.org/reference/make_empty_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A graph with no edges — make_empty_graph","text":"","code":"make_empty_graph(n = 0, directed = TRUE) empty_graph(...)"},{"path":"https://r.igraph.org/reference/make_empty_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A graph with no edges — make_empty_graph","text":"n Number vertices. directed Whether create directed graph. ... Passed make_graph_empty.","code":""},{"path":"https://r.igraph.org/reference/make_empty_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A graph with no edges — make_empty_graph","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_empty_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A graph with no edges — make_empty_graph","text":"","code":"make_empty_graph(n = 10) #> IGRAPH 7ee0ae4 D--- 10 0 -- #> + edges from 7ee0ae4: make_empty_graph(n = 5, directed = FALSE) #> IGRAPH 5ccdd40 U--- 5 0 -- #> + edges from 5ccdd40:"},{"path":"https://r.igraph.org/reference/make_from_prufer.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","title":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","text":"make_from_prufer() creates undirected tree graph Prüfer sequence.","code":""},{"path":"https://r.igraph.org/reference/make_from_prufer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","text":"","code":"make_from_prufer(prufer) from_prufer(...)"},{"path":"https://r.igraph.org/reference/make_from_prufer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","text":"prufer Prüfer sequence convert graph ... Passed make_from_prufer()","code":""},{"path":"https://r.igraph.org/reference/make_from_prufer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/make_from_prufer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","text":"Prüfer sequence tree graph n labeled vertices sequence n-2 numbers, constructed follows. graph two vertices, find vertex degree one, remove tree add label vertex connected sequence. Repeat two vertices remaining graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_from_prufer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create an undirected tree graph from its Prüfer sequence — make_from_prufer","text":"","code":"g <- make_tree(13, 3) to_prufer(g) #> [1] 2 2 2 1 3 3 3 1 4 4 4"},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a full bipartite graph — make_full_bipartite_graph","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"Bipartite graphs also called two-mode . function creates bipartite graph every possible edge present.","code":""},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"","code":"make_full_bipartite_graph( n1, n2, directed = FALSE, mode = c(\"all\", \"out\", \"in\") ) full_bipartite_graph(...)"},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"n1 number vertices first kind. n2 number vertices second kind. directed Logical scalar, whether graphs directed. mode Scalar giving kind edges create directed graphs. ‘’ vertices first kind connected others; ‘’ specifies opposite direction; ‘’ creates mutual edges. argument ignored undirected graphs.x ... Passed make_full_bipartite_graph().","code":""},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"igraph graph, ‘type’ vertex attribute set.","code":""},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"Bipartite graphs ‘type’ vertex attribute igraph, boolean FALSE vertices first kind TRUE vertices second kind.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/make_full_bipartite_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a full bipartite graph — make_full_bipartite_graph","text":"","code":"g <- make_full_bipartite_graph(2, 3) g2 <- make_full_bipartite_graph(2, 3, directed = TRUE) g3 <- make_full_bipartite_graph(2, 3, directed = TRUE, mode = \"in\") g4 <- make_full_bipartite_graph(2, 3, directed = TRUE, mode = \"all\")"},{"path":"https://r.igraph.org/reference/make_full_citation_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a complete (full) citation graph — make_full_citation_graph","title":"Create a complete (full) citation graph — make_full_citation_graph","text":"make_full_citation_graph() creates full citation graph. directed graph, every ->j edge present \\(j<\\). directed=FALSE graph just full graph.","code":""},{"path":"https://r.igraph.org/reference/make_full_citation_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a complete (full) citation graph — make_full_citation_graph","text":"","code":"make_full_citation_graph(n, directed = TRUE) full_citation_graph(...)"},{"path":"https://r.igraph.org/reference/make_full_citation_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a complete (full) citation graph — make_full_citation_graph","text":"n number vertices. directed Whether create directed graph. ... Passed make_full_citation_graph().","code":""},{"path":"https://r.igraph.org/reference/make_full_citation_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a complete (full) citation graph — make_full_citation_graph","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_full_citation_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a complete (full) citation graph — make_full_citation_graph","text":"","code":"print_all(make_full_citation_graph(10)) #> IGRAPH c7bc12e D--- 10 45 -- Full citation graph #> + attr: name (g/c) #> + graph attributes: #> | + name: #> | [1] \"Full citation graph\" #> + edges: #> 1 -> 2 -> 1 3 -> 1 2 #> 4 -> 1 2 3 5 -> 1 2 3 4 6 -> 1 2 3 4 5 #> 7 -> 1 2 3 4 5 6 8 -> 1 2 3 4 5 6 7 9 -> 1 2 3 4 5 6 7 8 #> 10 -> 1 2 3 4 5 6 7 8 9"},{"path":"https://r.igraph.org/reference/make_full_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a full graph — make_full_graph","title":"Create a full graph — make_full_graph","text":"Create full graph","code":""},{"path":"https://r.igraph.org/reference/make_full_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a full graph — make_full_graph","text":"","code":"make_full_graph(n, directed = FALSE, loops = FALSE) full_graph(...)"},{"path":"https://r.igraph.org/reference/make_full_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a full graph — make_full_graph","text":"n Number vertices. directed Whether create directed graph. loops Whether add self-loops graph. ... Passed make_full_graph().","code":""},{"path":"https://r.igraph.org/reference/make_full_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a full graph — make_full_graph","text":"igraph graph","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_full_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a full graph — make_full_graph","text":"","code":"make_full_graph(5) #> IGRAPH 2a1c5f6 U--- 5 10 -- Full graph #> + attr: name (g/c), loops (g/l) #> + edges from 2a1c5f6: #> [1] 1--2 1--3 1--4 1--5 2--3 2--4 2--5 3--4 3--5 4--5 print_all(make_full_graph(4, directed = TRUE)) #> IGRAPH 6a0488d D--- 4 12 -- Full graph #> + attr: name (g/c), loops (g/l) #> + graph attributes: #> | + name: #> | [1] \"Full graph\" #> | + loops: #> | [1] FALSE #> + edges: #> 1 -> 2 3 4 2 -> 1 3 4 3 -> 1 2 4 4 -> 1 2 3"},{"path":"https://r.igraph.org/reference/make_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an igraph graph from a list of edges, or a notable graph — make_graph","title":"Create an igraph graph from a list of edges, or a notable graph — make_graph","text":"Create igraph graph list edges, notable graph","code":""},{"path":"https://r.igraph.org/reference/make_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an igraph graph from a list of edges, or a notable graph — make_graph","text":"","code":"make_graph( edges, ..., n = max(edges), isolates = NULL, directed = TRUE, dir = directed, simplify = TRUE ) make_directed_graph(edges, n = max(edges)) make_undirected_graph(edges, n = max(edges)) directed_graph(...) undirected_graph(...)"},{"path":"https://r.igraph.org/reference/make_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an igraph graph from a list of edges, or a notable graph — make_graph","text":"edges vector defining edges, first edge points first element second, second edge third fourth, etc. numeric vector, interpreted internal vertex ids. character vectors, interpreted vertex names. Alternatively, can character scalar, name notable graph. See Notable graphs . name case insensitive. Starting igraph 0.8.0, can also include literals , via igraph's formula notation (see graph_from_literal()). case, first term formula start ‘~’ character, just like regular formulae R. See examples . ... make_graph(): extra arguments case graph given via literal, see graph_from_literal(). directed_graph() undirected_graph(): Passed make_directed_graph() make_undirected_graph(). n number vertices graph. argument ignored (warning) edges symbolic vertex names. also ignored bigger vertex id edges. means function safe supply zero vertex largest id isolate. isolates Character vector, names isolate vertices, symbolic edge lists. ignored numeric edge lists. directed Whether create directed graph. dir directed, compatibility. give . simplify graph literals, whether simplify graph.","code":""},{"path":"https://r.igraph.org/reference/make_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an igraph graph from a list of edges, or a notable graph — make_graph","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/make_graph.html","id":"notable-graphs","dir":"Reference","previous_headings":"","what":"Notable graphs","title":"Create an igraph graph from a list of edges, or a notable graph — make_graph","text":"make_graph() can create notable graphs. name graph (case insensitive), character scalar must supplied edges argument, arguments ignored. (warning given specified.) make_graph() knows following graphs: Bull bull graph, 5 vertices, 5 edges, resembles head bull drawn properly. Chvatal smallest triangle-free graph 4-chromatic 4-regular. According Grunbaum conjecture exists m-regular, m-chromatic graph n vertices every m>1 n>2. Chvatal graph example m=4 n=12. 24 edges. Coxeter non-Hamiltonian cubic symmetric graph 28 vertices 42 edges. Cubical Platonic graph cube. convex regular polyhedron 8 vertices 12 edges. Diamond graph 4 vertices 5 edges, resembles schematic diamond drawn properly. Dodecahedral, Dodecahedron Another Platonic solid 20 vertices 30 edges. Folkman semisymmetric graph minimum number vertices, 20 40 edges. semisymmetric graph regular, edge transitive vertex transitive. Franklin graph whose embedding Klein bottle can colored six colors, counterexample necessity Heawood conjecture Klein bottle. 12 vertices 18 edges. Frucht Frucht Graph smallest cubical graph whose automorphism group consists identity element. 12 vertices 18 edges. Grotzsch Groetzsch graph triangle-free graph 11 vertices, 20 edges, chromatic number 4. named German mathematician Herbert Groetzsch, existence demonstrates assumption planarity necessary Groetzsch's theorem every triangle-free planar graph 3-colorable. Heawood Heawood graph undirected graph 14 vertices 21 edges. graph cubic, cycles graph six edges. Every smaller cubic graph shorter cycles, graph 6-cage, smallest cubic graph girth 6. Herschel Herschel graph smallest nonhamiltonian polyhedral graph. unique graph 11 nodes, 18 edges. House house graph 5-vertex, 6-edge graph, schematic draw house drawn properly, basicly triangle top square. HouseX house graph X square. 5 vertices 8 edges. Icosahedral, Icosahedron Platonic solid 12 vertices 30 edges. Krackhardt kite social network 10 vertices 18 edges. Krackhardt, D. Assessing Political Landscape: Structure, Cognition, Power Organizations. Admin. Sci. Quart. 35, 342-369, 1990. Levi graph 4-arc transitive cubic graph, 30 vertices 45 edges. McGee McGee graph unique 3-regular 7-cage graph, 24 vertices 36 edges. Meredith Meredith graph quartic graph 70 nodes 140 edges counterexample conjecture every 4-regular 4-connected graph Hamiltonian. Noperfectmatching connected graph 16 vertices 27 edges containing perfect matching. matching graph set pairwise non-adjacent edges; , two edges share common vertex. perfect matching matching covers vertices graph. Nonline graph whose connected components 9 graphs whose presence vertex-induced subgraph graph makes nonline graph. 50 vertices 72 edges. Octahedral, Octahedron Platonic solid 6 vertices 12 edges. Petersen 3-regular graph 10 vertices 15 edges. smallest hypohamiltonian graph, .e. non-hamiltonian removing single vertex makes Hamiltonian. Robertson unique (4,5)-cage graph, .e. 4-regular graph girth 5. 19 vertices 38 edges. Smallestcyclicgroup smallest nontrivial graph whose automorphism group cyclic. 9 vertices 15 edges. Tetrahedral, Tetrahedron Platonic solid 4 vertices 6 edges. Thomassen smallest hypotraceable graph, 34 vertices 52 edges. hypotraceable graph contain Hamiltonian path removing single vertex remainder always contains Hamiltonian path. graph containing Hamiltonian path called traceable. Tutte Tait's Hamiltonian graph conjecture states every 3-connected 3-regular planar graph Hamiltonian. graph counterexample. 46 vertices 69 edges. Uniquely3colorable Returns 12-vertex, triangle-free graph chromatic number 3 uniquely 3-colorable. Walther identity graph 25 vertices 31 edges. identity graph single graph automorphism, trivial one. Zachary Social network friendships 34 members karate club US university 1970s. See W. W. Zachary, information flow model conflict fission small groups, Journal Anthropological Research 33, 452-473 (1977).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create an igraph graph from a list of edges, or a notable graph — make_graph","text":"","code":"make_graph(c(1, 2, 2, 3, 3, 4, 5, 6), directed = FALSE) #> IGRAPH 4abfbc4 U--- 6 4 -- #> + edges from 4abfbc4: #> [1] 1--2 2--3 3--4 5--6 make_graph(c(\"A\", \"B\", \"B\", \"C\", \"C\", \"D\"), directed = FALSE) #> IGRAPH 9c7ae4e UN-- 4 3 -- #> + attr: name (v/c) #> + edges from 9c7ae4e (vertex names): #> [1] A--B B--C C--D solids <- list( make_graph(\"Tetrahedron\"), make_graph(\"Cubical\"), make_graph(\"Octahedron\"), make_graph(\"Dodecahedron\"), make_graph(\"Icosahedron\") ) graph <- make_graph( ~ A - B - C - D - A, E - A:B:C:D, F - G - H - I - F, J - F:G:H:I, K - L - M - N - K, O - K:L:M:N, P - Q - R - S - P, T - P:Q:R:S, B - F, E - J, C - I, L - T, O - T, M - S, C - P, C - L, I - L, I - P )"},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Kautz graphs — make_kautz_graph","title":"Kautz graphs — make_kautz_graph","text":"Kautz graphs labeled graphs representing overlap strings.","code":""},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kautz graphs — make_kautz_graph","text":"","code":"make_kautz_graph(m, n) kautz_graph(...)"},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kautz graphs — make_kautz_graph","text":"m Integer scalar, size alphabet. See details . n Integer scalar, length labels. See details . ... Passed make_kautz_graph().","code":""},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Kautz graphs — make_kautz_graph","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Kautz graphs — make_kautz_graph","text":"Kautz graph labeled graph, vertices labeled strings length n+1 alphabet m+1 letters, restriction every two consecutive letters string must different. directed edge vertex v another vertex w possible transform string v string w removing first letter appending letter . Kautz graphs interesting properties, see e.g. Wikipedia details.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Kautz graphs — make_kautz_graph","text":"Gabor Csardi csardi.gabor@gmail.com, first version R written Vincent Matossian.","code":""},{"path":"https://r.igraph.org/reference/make_kautz_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kautz graphs — make_kautz_graph","text":"","code":"make_line_graph(make_kautz_graph(2, 1)) #> IGRAPH 0aaccfb D--- 12 24 -- Line graph #> + attr: name (g/c) #> + edges from 0aaccfb: #> [1] 5-> 1 9-> 1 5-> 2 9-> 2 6-> 3 10-> 3 6-> 4 10-> 4 1-> 5 11-> 5 #> [11] 1-> 6 11-> 6 2-> 7 12-> 7 2-> 8 12-> 8 3-> 9 7-> 9 3->10 7->10 #> [21] 4->11 8->11 4->12 8->12 make_kautz_graph(2, 2) #> IGRAPH b966284 D--- 12 24 -- Kautz graph 2-2 #> + attr: name (g/c), m (g/n), n (g/n) #> + edges from b966284: #> [1] 1-> 5 1-> 6 2-> 7 2-> 8 3-> 9 3->10 4->11 4->12 5-> 1 5-> 2 #> [11] 6-> 3 6-> 4 7-> 9 7->10 8->11 8->12 9-> 1 9-> 2 10-> 3 10-> 4 #> [21] 11-> 5 11-> 6 12-> 7 12-> 8"},{"path":"https://r.igraph.org/reference/make_lattice.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a lattice graph — make_lattice","title":"Create a lattice graph — make_lattice","text":"make_lattice() flexible function, can create lattices arbitrary dimensions, periodic aperiodic ones. two forms. first form supply dimvector, length dim. second form omit dimvector supply length dim.","code":""},{"path":"https://r.igraph.org/reference/make_lattice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a lattice graph — make_lattice","text":"","code":"make_lattice( dimvector = NULL, length = NULL, dim = NULL, nei = 1, directed = FALSE, mutual = FALSE, circular = FALSE ) lattice(...)"},{"path":"https://r.igraph.org/reference/make_lattice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a lattice graph — make_lattice","text":"dimvector vector giving size lattice dimension. length Integer constant, regular lattices, size lattice dimension. dim Integer constant, dimension lattice. nei distance within (inclusive) neighbors lattice connected. parameter used right now. directed Whether create directed lattice. mutual Logical, TRUE directed lattices mutually connected. circular Logical, TRUE lattice ring circular. ... Passed make_lattice().","code":""},{"path":"https://r.igraph.org/reference/make_lattice.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a lattice graph — make_lattice","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_lattice.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a lattice graph — make_lattice","text":"","code":"make_lattice(c(5, 5, 5)) #> IGRAPH 9604b91 U--- 125 300 -- Lattice graph #> + attr: name (g/c), dimvector (g/n), nei (g/n), mutual (g/l), circular #> | (g/l) #> + edges from 9604b91: #> [1] 1-- 2 1-- 6 1--26 2-- 3 2-- 7 2--27 3-- 4 3-- 8 3--28 4-- 5 #> [11] 4-- 9 4--29 5--10 5--30 6-- 7 6--11 6--31 7-- 8 7--12 7--32 #> [21] 8-- 9 8--13 8--33 9--10 9--14 9--34 10--15 10--35 11--12 11--16 #> [31] 11--36 12--13 12--17 12--37 13--14 13--18 13--38 14--15 14--19 14--39 #> [41] 15--20 15--40 16--17 16--21 16--41 17--18 17--22 17--42 18--19 18--23 #> [51] 18--43 19--20 19--24 19--44 20--25 20--45 21--22 21--46 22--23 22--47 #> [61] 23--24 23--48 24--25 24--49 25--50 26--27 26--31 26--51 27--28 27--32 #> + ... omitted several edges make_lattice(length = 5, dim = 3) #> IGRAPH 6cbd522 U--- 125 300 -- Lattice graph #> + attr: name (g/c), dimvector (g/n), nei (g/n), mutual (g/l), circular #> | (g/l) #> + edges from 6cbd522: #> [1] 1-- 2 1-- 6 1--26 2-- 3 2-- 7 2--27 3-- 4 3-- 8 3--28 4-- 5 #> [11] 4-- 9 4--29 5--10 5--30 6-- 7 6--11 6--31 7-- 8 7--12 7--32 #> [21] 8-- 9 8--13 8--33 9--10 9--14 9--34 10--15 10--35 11--12 11--16 #> [31] 11--36 12--13 12--17 12--37 13--14 13--18 13--38 14--15 14--19 14--39 #> [41] 15--20 15--40 16--17 16--21 16--41 17--18 17--22 17--42 18--19 18--23 #> [51] 18--43 19--20 19--24 19--44 20--25 20--45 21--22 21--46 22--23 22--47 #> [61] 23--24 23--48 24--25 24--49 25--50 26--27 26--31 26--51 27--28 27--32 #> + ... omitted several edges"},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Line graph of a graph — make_line_graph","title":"Line graph of a graph — make_line_graph","text":"function calculates line graph another graph.","code":""},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Line graph of a graph — make_line_graph","text":"","code":"make_line_graph(graph) line_graph(...)"},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Line graph of a graph — make_line_graph","text":"graph input graph, can directed undirected. ... Passed make_line_graph().","code":""},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Line graph of a graph — make_line_graph","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Line graph of a graph — make_line_graph","text":"line graph L(G) G undirected graph defined follows. L(G) one vertex edge G two vertices L(G) connected edge corresponding edges share end point. line graph L(G) G directed graph slightly different, L(G) one vertex edge G two vertices L(G) connected directed edge target first vertex's corresponding edge source second vertex's corresponding edge.","code":""},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Line graph of a graph — make_line_graph","text":"Gabor Csardi csardi.gabor@gmail.com, first version C code written Vincent Matossian.","code":""},{"path":"https://r.igraph.org/reference/make_line_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Line graph of a graph — make_line_graph","text":"","code":"# generate the first De-Bruijn graphs g <- make_full_graph(2, directed = TRUE, loops = TRUE) make_line_graph(g) #> IGRAPH 5bb51dc D--- 4 8 -- Line graph #> + attr: name (g/c) #> + edges from 5bb51dc: #> [1] 1->1 3->1 1->2 3->2 2->3 4->3 2->4 4->4 make_line_graph(make_line_graph(g)) #> IGRAPH 26844d4 D--- 8 16 -- Line graph #> + attr: name (g/c) #> + edges from 26844d4: #> [1] 1->1 2->1 5->2 6->2 1->3 2->3 5->4 6->4 3->5 4->5 7->6 8->6 3->7 4->7 7->8 #> [16] 8->8 make_line_graph(make_line_graph(make_line_graph(g))) #> IGRAPH 5da5153 D--- 16 32 -- Line graph #> + attr: name (g/c) #> + edges from 5da5153: #> [1] 1-> 1 2-> 1 3-> 2 4-> 2 9-> 3 10-> 3 11-> 4 12-> 4 1-> 5 2-> 5 #> [11] 3-> 6 4-> 6 9-> 7 10-> 7 11-> 8 12-> 8 5-> 9 6-> 9 7->10 8->10 #> [21] 13->11 14->11 15->12 16->12 5->13 6->13 7->14 8->14 13->15 14->15 #> [31] 15->16 16->16"},{"path":"https://r.igraph.org/reference/make_ring.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a ring graph — make_ring","title":"Create a ring graph — make_ring","text":"ring one-dimensional lattice function special case make_lattice().","code":""},{"path":"https://r.igraph.org/reference/make_ring.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a ring graph — make_ring","text":"","code":"make_ring(n, directed = FALSE, mutual = FALSE, circular = TRUE) ring(...)"},{"path":"https://r.igraph.org/reference/make_ring.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a ring graph — make_ring","text":"n Number vertices. directed Whether graph directed. mutual Whether directed edges mutual. ignored undirected graphs. circular Whether create circular ring. non-circular ring essentially “line”: tree every non-leaf vertex one child. ... Passed make_ring().","code":""},{"path":"https://r.igraph.org/reference/make_ring.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a ring graph — make_ring","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_ring.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a ring graph — make_ring","text":"","code":"print_all(make_ring(10)) #> IGRAPH 20b6cde U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + graph attributes: #> | + name: #> | [1] \"Ring graph\" #> | + mutual: #> | [1] FALSE #> | + circular: #> | [1] TRUE #> + edges from 20b6cde: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 print_all(make_ring(10, directed = TRUE, mutual = TRUE)) #> IGRAPH 2d1f375 D--- 10 20 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + graph attributes: #> | + name: #> | [1] \"Ring graph\" #> | + mutual: #> | [1] TRUE #> | + circular: #> | [1] TRUE #> + edges from 2d1f375: #> [1] 1-> 2 2-> 1 2-> 3 3-> 2 3-> 4 4-> 3 4-> 5 5-> 4 5-> 6 6-> 5 #> [11] 6-> 7 7-> 6 7-> 8 8-> 7 8-> 9 9-> 8 9->10 10-> 9 10-> 1 1->10"},{"path":"https://r.igraph.org/reference/make_star.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a star graph, a tree with n vertices and n - 1 leaves — make_star","title":"Create a star graph, a tree with n vertices and n - 1 leaves — make_star","text":"star() creates star graph, every single vertex connected center vertex nobody else.","code":""},{"path":"https://r.igraph.org/reference/make_star.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a star graph, a tree with n vertices and n - 1 leaves — make_star","text":"","code":"make_star(n, mode = c(\"in\", \"out\", \"mutual\", \"undirected\"), center = 1) star(...)"},{"path":"https://r.igraph.org/reference/make_star.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a star graph, a tree with n vertices and n - 1 leaves — make_star","text":"n Number vertices. mode defines direction edges, : edges point center, : edges point center, mutual: directed star created mutual edges, undirected: edges undirected. center ID center vertex. ... Passed make_star().","code":""},{"path":"https://r.igraph.org/reference/make_star.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a star graph, a tree with n vertices and n - 1 leaves — make_star","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_star.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a star graph, a tree with n vertices and n - 1 leaves — make_star","text":"","code":"make_star(10, mode = \"out\") #> IGRAPH 0c76faa D--- 10 9 -- Out-star #> + attr: name (g/c), mode (g/c), center (g/n) #> + edges from 0c76faa: #> [1] 1-> 2 1-> 3 1-> 4 1-> 5 1-> 6 1-> 7 1-> 8 1-> 9 1->10 make_star(5, mode = \"undirected\") #> IGRAPH 3214b27 U--- 5 4 -- Star #> + attr: name (g/c), mode (g/c), center (g/n) #> + edges from 3214b27: #> [1] 1--2 1--3 1--4 1--5"},{"path":"https://r.igraph.org/reference/make_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Create tree graphs — make_tree","title":"Create tree graphs — make_tree","text":"Create k-ary tree graph, almost vertices leaves number children.","code":""},{"path":"https://r.igraph.org/reference/make_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create tree graphs — make_tree","text":"","code":"make_tree(n, children = 2, mode = c(\"out\", \"in\", \"undirected\")) tree(...)"},{"path":"https://r.igraph.org/reference/make_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create tree graphs — make_tree","text":"n Number vertices. children Integer scalar, number children vertex (except leafs) mode Defines direction edges. indicates edges point parent children, indicates point children parents, undirected creates undirected graph. ... Passed make_tree() sample_tree().","code":""},{"path":"https://r.igraph.org/reference/make_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create tree graphs — make_tree","text":"igraph graph","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/make_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create tree graphs — make_tree","text":"","code":"make_tree(10, 2) #> IGRAPH 2f340c1 D--- 10 9 -- Tree #> + attr: name (g/c), children (g/n), mode (g/c) #> + edges from 2f340c1: #> [1] 1-> 2 1-> 3 2-> 4 2-> 5 3-> 6 3-> 7 4-> 8 4-> 9 5->10 make_tree(10, 3, mode = \"undirected\") #> IGRAPH b694a31 U--- 10 9 -- Tree #> + attr: name (g/c), children (g/n), mode (g/c) #> + edges from b694a31: #> [1] 1-- 2 1-- 3 1-- 4 2-- 5 2-- 6 2-- 7 3-- 8 3-- 9 3--10"},{"path":"https://r.igraph.org/reference/match_vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Match Graphs given a seeding of vertex correspondences — match_vertices","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"Given two adjacency matrices B size, match two graphs help m seed vertex pairs correspond first m rows (columns) adjacency matrices.","code":""},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"","code":"match_vertices(A, B, m, start, iteration)"},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"numeric matrix, adjacency matrix first graph B numeric matrix, adjacency matrix second graph m number seeds. first m vertices graphs matched. start numeric matrix, permutation matrix estimate initialized start iteration number iterations Frank-Wolfe algorithm","code":""},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"numeric matrix permutation matrix determines bijection graphs B","code":""},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"approximate graph matching problem find bijection vertices two graphs , number edge disagreements corresponding vertex pairs minimized. seeded graph matching, part bijection consist known correspondences (seeds) known problem task complete bijection estimating permutation matrix permutes rows columns adjacency matrix second graph. assumed two supplied adjacency matrices B, size \\(n\\times n\\), first \\(m\\) rows(columns) B correspond vertices graphs. , \\(n \\times n\\) permutation matrix defines bijection \\(I_{m} \\bigoplus P\\) \\((n-m)\\times (n-m)\\) permutation matrix \\(P\\) \\(m\\) times \\(m\\) identity matrix \\(I_{m}\\). function match_vertices() estimates permutation matrix \\(P\\) via optimization algorithm based Frank-Wolfe algorithm. See references details.","code":""},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"Vogelstein, J. T., Conroy, J. M., Podrazik, L. J., Kratzer, S. G., Harley, E. T., Fishkind, D. E.,Vogelstein, R. J., Priebe, C. E. (2011). Fast Approximate Quadratic Programming Large (Brain) Graph Matching. Online: https://arxiv.org/abs/1112.5507 Fishkind, D. E., Adali, S., Priebe, C. E. (2012). Seeded Graph Matching Online: https://arxiv.org/abs/1209.0367","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"Vince Lyzinski https://www.ams.jhu.edu/~lyzinski/","code":""},{"path":"https://r.igraph.org/reference/match_vertices.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Match Graphs given a seeding of vertex correspondences — match_vertices","text":"","code":"# require(Matrix) g1 <- sample_gnp(10, 0.1) randperm <- c(1:3, 3 + sample(7)) g2 <- sample_correlated_gnp(g1, corr = 1, p = g1$p, permutation = randperm) A <- as_adjacency_matrix(g1) B <- as_adjacency_matrix(g2) P <- match_vertices(A, B, m = 3, start = diag(rep(1, nrow(A) - 3)), 20) P #> $corr #> [,1] [,2] #> [1,] 4 4 #> [2,] 5 5 #> [3,] 6 9 #> [4,] 7 6 #> [5,] 8 8 #> [6,] 9 7 #> [7,] 10 10 #> #> $P #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> [1,] 1 0 0 0 0 0 0 0 0 0 #> [2,] 0 1 0 0 0 0 0 0 0 0 #> [3,] 0 0 1 0 0 0 0 0 0 0 #> [4,] 0 0 0 1 0 0 0 0 0 0 #> [5,] 0 0 0 0 1 0 0 0 0 0 #> [6,] 0 0 0 0 0 0 0 0 1 0 #> [7,] 0 0 0 0 0 1 0 0 0 0 #> [8,] 0 0 0 0 0 0 0 1 0 0 #> [9,] 0 0 0 0 0 0 1 0 0 0 #> [10,] 0 0 0 0 0 0 0 0 0 1 #> #> $D #> 7 x 7 sparse Matrix of class \"dgCMatrix\" #> #> [1,] 1 . . . . . . #> [2,] . 1 . . . . . #> [3,] . . . . . 1 . #> [4,] . . 1 . . . . #> [5,] . . . . 1 . . #> [6,] . . . 1 . . . #> [7,] . . . . . . 1 #>"},{"path":"https://r.igraph.org/reference/matching.html","id":null,"dir":"Reference","previous_headings":"","what":"Matching — is_matching","title":"Matching — is_matching","text":"matching graph means selection set edges pairwise non-adjacent, .e. common incident vertices. matching maximal proper subset matching.","code":""},{"path":"https://r.igraph.org/reference/matching.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Matching — is_matching","text":"","code":"is_matching(graph, matching, types = NULL) is_max_matching(graph, matching, types = NULL) max_bipartite_match( graph, types = NULL, weights = NULL, eps = .Machine$double.eps )"},{"path":"https://r.igraph.org/reference/matching.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Matching — is_matching","text":"graph input graph. might directed, edge directions ignored. matching potential matching. integer vector gives pair matching vertex. vertices without pair, supply NA . types Vertex types, graph bipartite. default taken ‘type’ vertex attribute, present. weights Potential edge weights. graph edge attribute called ‘weight’, argument NULL, edge attribute used automatically. weighted matching, weights edges must match much possible. eps small real number used equality tests weighted bipartite matching algorithm. Two real numbers considered equal algorithm difference smaller eps. required avoid accumulation numerical errors. default set smallest \\(x\\), \\(1+x \\ne 1\\) holds. running algorithm weights, argument ignored.","code":""},{"path":"https://r.igraph.org/reference/matching.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Matching — is_matching","text":"is_matching() is_max_matching() return logical scalar. max_bipartite_match() returns list components: matching_size size matching, .e. number edges connecting matched vertices. matching_weight weights matching, graph weighted. unweighted graphs size matching. matching matching . Numeric vertex id, vertex names graph named. Non-matched vertices denoted NA.","code":""},{"path":"https://r.igraph.org/reference/matching.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Matching — is_matching","text":"is_matching() checks matching vector verifies whether length matches number vertices given graph, values zero (inclusive) number vertices (inclusive), whether exists corresponding edge graph every matched vertex pair. bipartite graphs, also verifies whether matched vertices different parts graph. is_max_matching() checks whether matching maximal. matching maximal exists unmatched vertex graph one neighbors also unmatched. max_bipartite_match() calculates maximum matching bipartite graph. matching bipartite graph partial assignment vertices first kind vertices second kind vertex first kind matched one vertex second kind vice versa, matched vertices must connected edge graph. size (cardinality) matching number edges. matching maximum matching exists matching larger cardinality. weighted graphs, maximum matching matching whose edges largest possible total weight among possible matchings. Maximum matchings bipartite graphs found push-relabel algorithm greedy initialization global relabeling every \\(n/2\\) steps \\(n\\) number vertices graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/matching.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Matching — is_matching","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/matching.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Matching — is_matching","text":"","code":"g <- graph_from_literal(a - b - c - d - e - f) m1 <- c(\"b\", \"a\", \"d\", \"c\", \"f\", \"e\") # maximal matching m2 <- c(\"b\", \"a\", \"d\", \"c\", NA, NA) # non-maximal matching m3 <- c(\"b\", \"c\", \"d\", \"c\", NA, NA) # not a matching is_matching(g, m1) #> [1] TRUE is_matching(g, m2) #> [1] TRUE is_matching(g, m3) #> [1] FALSE is_max_matching(g, m1) #> [1] TRUE is_max_matching(g, m2) #> [1] FALSE is_max_matching(g, m3) #> [1] FALSE V(g)$type <- rep(c(FALSE, TRUE), 3) print_all(g, v = TRUE) #> IGRAPH fecb026 UN-B 6 5 -- #> + attr: name (v/c), type (v/l) #> + vertex attributes: #> | name type #> | [1] a FALSE #> | [2] b TRUE #> | [3] c FALSE #> | [4] d TRUE #> | [5] e FALSE #> | [6] f TRUE #> + edges from fecb026 (vertex names): #> [1] a--b b--c c--d d--e e--f max_bipartite_match(g) #> $matching_size #> [1] 3 #> #> $matching_weight #> [1] 3 #> #> $matching #> a b c d e f #> \"b\" \"a\" \"d\" \"c\" \"f\" \"e\" #> g2 <- graph_from_literal(a - b - c - d - e - f - g) V(g2)$type <- rep(c(FALSE, TRUE), length.out = vcount(g2)) print_all(g2, v = TRUE) #> IGRAPH 387ec89 UN-B 7 6 -- #> + attr: name (v/c), type (v/l) #> + vertex attributes: #> | name type #> | [1] a FALSE #> | [2] b TRUE #> | [3] c FALSE #> | [4] d TRUE #> | [5] e FALSE #> | [6] f TRUE #> | [7] g FALSE #> + edges from 387ec89 (vertex names): #> [1] a--b b--c c--d d--e e--f f--g max_bipartite_match(g2) #> $matching_size #> [1] 3 #> #> $matching_weight #> [1] 3 #> #> $matching #> a b c d e f g #> \"b\" \"a\" \"d\" \"c\" \"f\" \"e\" NA #> #' @keywords graphs"},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":null,"dir":"Reference","previous_headings":"","what":"Maximum cardinality search — max_cardinality","title":"Maximum cardinality search — max_cardinality","text":"Maximum cardinality search simple ordering vertices useful determining chordality graph.","code":""},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Maximum cardinality search — max_cardinality","text":"","code":"max_cardinality(graph)"},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Maximum cardinality search — max_cardinality","text":"graph input graph. may directed, edge directions ignored, algorithm defined undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Maximum cardinality search — max_cardinality","text":"list two components: alpha Numeric vector. 1-based rank vertex graph vertex rank 1 visited first, vertex rank 2 visited second . alpham1 Numeric vector. inverse alpha. words, elements vector vertices reverse maximum cardinality search order.","code":""},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Maximum cardinality search — max_cardinality","text":"Maximum cardinality search visits vertices order every time vertex already visited neighbors visited. Ties broken randomly. algorithm provides simple basis deciding whether graph chordal, see References , also is_chordal().","code":""},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Maximum cardinality search — max_cardinality","text":"Robert E Tarjan Mihalis Yannakakis. (1984). Simple linear-time algorithms test chordality graphs, test acyclicity hypergraphs, selectively reduce acyclic hypergraphs. SIAM Journal Computation 13, 566–579.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Maximum cardinality search — max_cardinality","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/max_cardinality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Maximum cardinality search — max_cardinality","text":"","code":"## The examples from the Tarjan-Yannakakis paper g1 <- graph_from_literal( A - B:C:I, B - A:C:D, C - A:B:E:H, D - B:E:F, E - C:D:F:H, F - D:E:G, G - F:H, H - C:E:G:I, I - A:H ) max_cardinality(g1) #> $alpha #> [1] 9 4 6 8 3 5 7 2 1 #> #> $alpham1 #> + 9/9 vertices, named, from 89e53dc: #> [1] G F D B E C H I A #> is_chordal(g1, fillin = TRUE) #> $chordal #> [1] FALSE #> #> $fillin #> [1] 2 6 8 7 5 7 2 7 6 1 7 1 #> #> $newgraph #> NULL #> g2 <- graph_from_literal( A - B:E, B - A:E:F:D, C - E:D:G, D - B:F:E:C:G, E - A:B:C:D:F, F - B:D:E, G - C:D:H:I, H - G:I:J, I - G:H:J, J - H:I ) max_cardinality(g2) #> $alpha #> [1] 10 8 9 6 7 5 4 2 3 1 #> #> $alpham1 #> + 10/10 vertices, named, from bdf7844: #> [1] J H I G C F D B E A #> is_chordal(g2, fillin = TRUE) #> $chordal #> [1] TRUE #> #> $fillin #> numeric(0) #> #> $newgraph #> NULL #>"},{"path":"https://r.igraph.org/reference/max_flow.html","id":null,"dir":"Reference","previous_headings":"","what":"Maximum flow in a graph — max_flow","title":"Maximum flow in a graph — max_flow","text":"graph edge given flow capacity maximal flow two vertices calculated.","code":""},{"path":"https://r.igraph.org/reference/max_flow.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Maximum flow in a graph — max_flow","text":"","code":"max_flow(graph, source, target, capacity = NULL)"},{"path":"https://r.igraph.org/reference/max_flow.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Maximum flow in a graph — max_flow","text":"graph input graph. source id source vertex. target id target vertex (sometimes also called sink). capacity Vector giving capacity edges. NULL (default) capacity edge attribute used. Note weight edge attribute used function.","code":""},{"path":"https://r.igraph.org/reference/max_flow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Maximum flow in a graph — max_flow","text":"named list components: value numeric scalar, value maximum flow. flow numeric vector, flow , one entry edge. undirected graphs entry bit trickier, since flow direction predetermined edge direction. graphs elements vector can negative, means flow goes bigger vertex id smaller one. Positive values mean flow goes smaller vertex id bigger one. cut numeric vector edge ids, minimum cut corresponding maximum flow. partition1 numeric vector vertex ids, vertices first partition minimum cut corresponding maximum flow. partition2 numeric vector vertex ids, vertices second partition minimum cut corresponding maximum flow. stats list statistics push-relabel algorithm. Five integer values currently: nopush number push operations, norelabel number relabelings, nogap number times gap heuristics used, nogapnodes total number gap nodes omitted gap heuristics nobfs number times global breadth-first-search update performed assign better height (=distance) values vertices.","code":""},{"path":"https://r.igraph.org/reference/max_flow.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Maximum flow in a graph — max_flow","text":"max_flow() calculates maximum flow two vertices weighted (.e. valued) graph. flow source target assignment non-negative real numbers edges graph, satisfying two properties: (1) edge flow (.e. assigned number) capacity edge (capacity parameter edge attribute), (2) every vertex, except source target incoming flow outgoing flow. value flow incoming flow target vertex. maximum flow flow maximum value.","code":""},{"path":"https://r.igraph.org/reference/max_flow.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Maximum flow in a graph — max_flow","text":". V. Goldberg R. E. Tarjan: New Approach Maximum Flow Problem Journal ACM 35:921-940, 1988.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/max_flow.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Maximum flow in a graph — max_flow","text":"","code":"E <- rbind(c(1, 3, 3), c(3, 4, 1), c(4, 2, 2), c(1, 5, 1), c(5, 6, 2), c(6, 2, 10)) colnames(E) <- c(\"from\", \"to\", \"capacity\") g1 <- graph_from_data_frame(as.data.frame(E)) max_flow(g1, source = V(g1)[\"1\"], target = V(g1)[\"2\"]) #> $value #> [1] 2 #> #> $flow #> [1] 1 1 1 1 1 1 #> #> $cut #> + 2/6 edges from b1402b2 (vertex names): #> [1] 3->4 1->5 #> #> $partition1 #> + 2/6 vertices, named, from b1402b2: #> [1] 1 3 #> #> $partition2 #> + 4/6 vertices, named, from b1402b2: #> [1] 4 5 6 2 #> #> $stats #> $stats$nopush #> [1] 4 #> #> $stats$norelabel #> [1] 1 #> #> $stats$nogap #> [1] 0 #> #> $stats$nogapnodes #> [1] 0 #> #> $stats$nobfs #> [1] 1 #> #>"},{"path":"https://r.igraph.org/reference/maxcohesion.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Cohesive Blocks — maxcohesion","title":"Calculate Cohesive Blocks — maxcohesion","text":"maxcohesion() renamed max_cohesion() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/maxcohesion.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Cohesive Blocks — maxcohesion","text":"","code":"maxcohesion(blocks)"},{"path":"https://r.igraph.org/reference/maximal.cliques.count.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques.count","title":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques.count","text":"maximal.cliques.count() renamed count_max_cliques() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/maximal.cliques.count.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques.count","text":"","code":"maximal.cliques.count(graph, min = NULL, max = NULL, subset = NULL)"},{"path":"https://r.igraph.org/reference/maximal.cliques.count.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques.count","text":"graph input graph, directed graphs considered undirected ones, multiple edges loops ignored. min Numeric constant, lower limit size cliques find. NULL means limit, .e. 0. max Numeric constant, upper limit size cliques find. NULL means limit. subset NULL, must vector vertex ids, numeric symbolic graph named. algorithm run vertices , subset maximal cliques returned. See Eppstein paper details. argument makes possible easily parallelize finding maximal cliques.","code":""},{"path":"https://r.igraph.org/reference/maximal.cliques.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques","title":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques","text":"maximal.cliques() renamed max_cliques() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/maximal.cliques.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques","text":"","code":"maximal.cliques(graph, min = NULL, max = NULL, subset = NULL, file = NULL)"},{"path":"https://r.igraph.org/reference/maximal.cliques.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to find cliques, i.e. complete subgraphs in a graph — maximal.cliques","text":"graph input graph, directed graphs considered undirected ones, multiple edges loops ignored. min Numeric constant, lower limit size cliques find. NULL means limit, .e. 0. max Numeric constant, upper limit size cliques find. NULL means limit. subset NULL, must vector vertex ids, numeric symbolic graph named. algorithm run vertices , subset maximal cliques returned. See Eppstein paper details. argument makes possible easily parallelize finding maximal cliques. file NULL, must file name, .e. character scalar. output algorithm written file. (exists, overwritten.) clique separate line file, given numeric ids vertices, separated whitespace.","code":""},{"path":"https://r.igraph.org/reference/maximal.independent.vertex.sets.html","id":null,"dir":"Reference","previous_headings":"","what":"Independent vertex sets — maximal.independent.vertex.sets","title":"Independent vertex sets — maximal.independent.vertex.sets","text":"maximal.independent.vertex.sets() renamed maximal_ivs() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/maximal.independent.vertex.sets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Independent vertex sets — maximal.independent.vertex.sets","text":"","code":"maximal.independent.vertex.sets(graph)"},{"path":"https://r.igraph.org/reference/maximal.independent.vertex.sets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Independent vertex sets — maximal.independent.vertex.sets","text":"graph input graph, directed graphs considered undirected, loop edges multiple edges ignored.","code":""},{"path":"https://r.igraph.org/reference/maximum.bipartite.matching.html","id":null,"dir":"Reference","previous_headings":"","what":"Matching — maximum.bipartite.matching","title":"Matching — maximum.bipartite.matching","text":"maximum.bipartite.matching() renamed max_bipartite_match() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/maximum.bipartite.matching.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Matching — maximum.bipartite.matching","text":"","code":"maximum.bipartite.matching( graph, types = NULL, weights = NULL, eps = .Machine$double.eps )"},{"path":"https://r.igraph.org/reference/maximum.bipartite.matching.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Matching — maximum.bipartite.matching","text":"graph input graph. might directed, edge directions ignored. types Vertex types, graph bipartite. default taken ‘type’ vertex attribute, present. weights Potential edge weights. graph edge attribute called ‘weight’, argument NULL, edge attribute used automatically. weighted matching, weights edges must match much possible. eps small real number used equality tests weighted bipartite matching algorithm. Two real numbers considered equal algorithm difference smaller eps. required avoid accumulation numerical errors. default set smallest \\(x\\), \\(1+x \\ne 1\\) holds. running algorithm weights, argument ignored.","code":""},{"path":"https://r.igraph.org/reference/maximum.cardinality.search.html","id":null,"dir":"Reference","previous_headings":"","what":"Maximum cardinality search — maximum.cardinality.search","title":"Maximum cardinality search — maximum.cardinality.search","text":"maximum.cardinality.search() renamed max_cardinality() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/maximum.cardinality.search.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Maximum cardinality search — maximum.cardinality.search","text":"","code":"maximum.cardinality.search(graph)"},{"path":"https://r.igraph.org/reference/maximum.cardinality.search.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Maximum cardinality search — maximum.cardinality.search","text":"graph input graph. may directed, edge directions ignored, algorithm defined undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/merge_coords.html","id":null,"dir":"Reference","previous_headings":"","what":"Merging graph layouts — merge_coords","title":"Merging graph layouts — merge_coords","text":"Place several graphs layout","code":""},{"path":"https://r.igraph.org/reference/merge_coords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merging graph layouts — merge_coords","text":"","code":"merge_coords(graphs, layouts, method = \"dla\") layout_components(graph, layout = layout_with_kk, ...)"},{"path":"https://r.igraph.org/reference/merge_coords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merging graph layouts — merge_coords","text":"graphs list graph objects. layouts list two-column matrices. method Character constant giving method use. Right now dla implemented. graph input graph. layout function object, layout function use. ... Additional arguments pass layout layout function.","code":""},{"path":"https://r.igraph.org/reference/merge_coords.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Merging graph layouts — merge_coords","text":"matrix two columns many lines total number vertices graphs.","code":""},{"path":"https://r.igraph.org/reference/merge_coords.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Merging graph layouts — merge_coords","text":"merge_coords() takes list graphs list coordinates places graphs common layout. method use chosen via method parameter, although right now dla method implemented. dla method covers graph circles. sorts graphs based number vertices first places largest graph center layout. graphs placed decreasing order via DLA (diffision limited aggregation) algorithm: graph placed randomly circle far away center random walk conducted graph walks larger graphs already placed walks far center layout. layout_components() function disassembles graph first maximal connected components calls supplied layout function component separately. Finally merges layouts via calling merge_coords().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/merge_coords.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Merging graph layouts — merge_coords","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/merge_coords.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Merging graph layouts — merge_coords","text":"","code":"# create 20 scale-free graphs and place them in a common layout graphs <- lapply(sample(5:20, 20, replace = TRUE), barabasi.game, directed = FALSE ) layouts <- lapply(graphs, layout_with_kk) lay <- merge_coords(graphs, layouts) g <- disjoint_union(graphs) plot(g, layout = lay, vertex.size = 3, labels = NA, edge.color = \"black\")"},{"path":"https://r.igraph.org/reference/min_cut.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum cut in a graph — min_cut","title":"Minimum cut in a graph — min_cut","text":"min_cut() calculates minimum st-cut two vertices graph (source target arguments given) minimum cut graph (source target NULL).","code":""},{"path":"https://r.igraph.org/reference/min_cut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum cut in a graph — min_cut","text":"","code":"min_cut( graph, source = NULL, target = NULL, capacity = NULL, value.only = TRUE )"},{"path":"https://r.igraph.org/reference/min_cut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum cut in a graph — min_cut","text":"graph input graph. source id source vertex. target id target vertex (sometimes also called sink). capacity Vector giving capacity edges. NULL (default) capacity edge attribute used. value.Logical scalar, TRUE minimum cut value returned, FALSE edges cut two () partitions also returned.","code":""},{"path":"https://r.igraph.org/reference/min_cut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimum cut in a graph — min_cut","text":"min_cut() nuieric constant, value minimum cut, except value.= FALSE. case named list components: value Numeric scalar, cut value. cut Numeric vector, edges cut. partition1 vertices first partition cut edges removed. Note vertices might actually different components (cut edges removed), graph may fall apart two components. partition2 vertices second partition cut edges removed. Note vertices might actually different components (cut edges removed), graph may fall apart two components.","code":""},{"path":"https://r.igraph.org/reference/min_cut.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minimum cut in a graph — min_cut","text":"minimum st-cut source target minimum total weight edges needed remove eliminate paths source target. minimum cut graph minimum total weight edges needed remove separate graph (least) two components. (make graph strongly connected directed case.) maximum flow two vertices graph minimum st-cut, max_flow() min_cut() essentially calculate quantity, difference min_cut() can invoked without giving source target arguments minimum possible minimum cuts calculated. undirected graphs Stoer-Wagner algorithm (see reference ) used calculate minimum cut.","code":""},{"path":"https://r.igraph.org/reference/min_cut.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Minimum cut in a graph — min_cut","text":"M. Stoer F. Wagner: simple min-cut algorithm, Journal ACM, 44 585-591, 1997.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/min_cut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimum cut in a graph — min_cut","text":"","code":"g <- make_ring(100) min_cut(g, capacity = rep(1, vcount(g))) #> [1] 2 min_cut(g, value.only = FALSE, capacity = rep(1, vcount(g))) #> $value #> [1] 2 #> #> $cut #> + 2/100 edges from a838704: #> [1] 1--2 2--3 #> #> $partition1 #> + 1/100 vertex, from a838704: #> [1] 2 #> #> $partition2 #> + 99/100 vertices, from a838704: #> [1] 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #> [20] 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 #> [39] 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 #> [58] 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 #> [77] 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 #> [96] 97 98 99 100 #> g2 <- make_graph(c(1, 2, 2, 3, 3, 4, 1, 6, 6, 5, 5, 4, 4, 1)) E(g2)$capacity <- c(3, 1, 2, 10, 1, 3, 2) min_cut(g2, value.only = FALSE) #> $value #> [1] 1 #> #> $cut #> + 1/7 edge from fae0a34: #> [1] 2->3 #> #> $partition1 #> + 1/6 vertex, from fae0a34: #> [1] 2 #> #> $partition2 #> + 5/6 vertices, from fae0a34: #> [1] 1 3 4 5 6 #>"},{"path":"https://r.igraph.org/reference/min_separators.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum size vertex separators — min_separators","title":"Minimum size vertex separators — min_separators","text":"Find vertex sets minimal size whose removal separates graph components","code":""},{"path":"https://r.igraph.org/reference/min_separators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum size vertex separators — min_separators","text":"","code":"min_separators(graph)"},{"path":"https://r.igraph.org/reference/min_separators.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum size vertex separators — min_separators","text":"graph input graph. may directed, edge directions ignored.","code":""},{"path":"https://r.igraph.org/reference/min_separators.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimum size vertex separators — min_separators","text":"list numeric vectors. numeric vector vertex separator.","code":""},{"path":"https://r.igraph.org/reference/min_separators.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minimum size vertex separators — min_separators","text":"function implements Kanevsky algorithm finding minimal-size vertex separators undirected graph. See reference details. special case fully connected input graph \\(n\\) vertices, subsets size \\(n-1\\) listed result.","code":""},{"path":"https://r.igraph.org/reference/min_separators.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Minimum size vertex separators — min_separators","text":"Arkady Kanevsky: Finding minimum-size separating vertex sets graph. Networks 23 533–541, 1993. JS Provan DR Shier: Paradigm listing (s,t)-cuts graphs, Algorithmica 15, 351–372, 1996. J. Moody D. R. White. Structural cohesion embeddedness: hierarchical concept social groups. American Sociological Review, 68 103–127, Feb 2003.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/min_separators.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimum size vertex separators — min_separators","text":"","code":"# The graph from the Moody-White paper mw <- graph_from_literal( 1 - 2:3:4:5:6, 2 - 3:4:5:7, 3 - 4:6:7, 4 - 5:6:7, 5 - 6:7:21, 6 - 7, 7 - 8:11:14:19, 8 - 9:11:14, 9 - 10, 10 - 12:13, 11 - 12:14, 12 - 16, 13 - 16, 14 - 15, 15 - 16, 17 - 18:19:20, 18 - 20:21, 19 - 20:22:23, 20 - 21, 21 - 22:23, 22 - 23 ) # Cohesive subgraphs mw1 <- induced_subgraph(mw, as.character(c(1:7, 17:23))) mw2 <- induced_subgraph(mw, as.character(7:16)) mw3 <- induced_subgraph(mw, as.character(17:23)) mw4 <- induced_subgraph(mw, as.character(c(7, 8, 11, 14))) mw5 <- induced_subgraph(mw, as.character(1:7)) min_separators(mw) #> [[1]] #> + 1/23 vertex, named, from 7717cbd: #> [1] 7 #> min_separators(mw1) #> [[1]] #> + 2/14 vertices, named, from a1c3485: #> [1] 5 19 #> #> [[2]] #> + 2/14 vertices, named, from a1c3485: #> [1] 5 7 #> #> [[3]] #> + 2/14 vertices, named, from a1c3485: #> [1] 7 21 #> #> [[4]] #> + 2/14 vertices, named, from a1c3485: #> [1] 21 19 #> min_separators(mw2) #> [[1]] #> + 2/10 vertices, named, from 975bbff: #> [1] 10 16 #> #> [[2]] #> + 2/10 vertices, named, from 975bbff: #> [1] 14 16 #> #> [[3]] #> + 2/10 vertices, named, from 975bbff: #> [1] 8 10 #> min_separators(mw3) #> [[1]] #> + 2/7 vertices, named, from 5ab0c2b: #> [1] 21 19 #> min_separators(mw4) #> [[1]] #> + 3/4 vertices, named, from 166dddc: #> [1] 8 11 14 #> #> [[2]] #> + 3/4 vertices, named, from 166dddc: #> [1] 7 11 14 #> #> [[3]] #> + 3/4 vertices, named, from 166dddc: #> [1] 7 8 14 #> #> [[4]] #> + 3/4 vertices, named, from 166dddc: #> [1] 7 8 11 #> min_separators(mw5) #> [[1]] #> + 5/7 vertices, named, from f41aca9: #> [1] 2 3 4 5 6 #> #> [[2]] #> + 5/7 vertices, named, from f41aca9: #> [1] 1 3 4 5 7 #> #> [[3]] #> + 5/7 vertices, named, from f41aca9: #> [1] 1 2 4 6 7 #> # Another example, the science camp network camp <- graph_from_literal( Harry:Steve:Don:Bert - Harry:Steve:Don:Bert, Pam:Brazey:Carol:Pat - Pam:Brazey:Carol:Pat, Holly - Carol:Pat:Pam:Jennie:Bill, Bill - Pauline:Michael:Lee:Holly, Pauline - Bill:Jennie:Ann, Jennie - Holly:Michael:Lee:Ann:Pauline, Michael - Bill:Jennie:Ann:Lee:John, Ann - Michael:Jennie:Pauline, Lee - Michael:Bill:Jennie, Gery - Pat:Steve:Russ:John, Russ - Steve:Bert:Gery:John, John - Gery:Russ:Michael ) min_separators(camp) #> [[1]] #> + 2/18 vertices, named, from b4fa222: #> [1] Pat Holly #> #> [[2]] #> + 2/18 vertices, named, from b4fa222: #> [1] Pat Michael #> #> [[3]] #> + 2/18 vertices, named, from b4fa222: #> [1] Pat John #> #> [[4]] #> + 2/18 vertices, named, from b4fa222: #> [1] Holly Gery #> #> [[5]] #> + 2/18 vertices, named, from b4fa222: #> [1] Michael Gery #> #> [[6]] #> + 2/18 vertices, named, from b4fa222: #> [1] John Gery #> #> [[7]] #> + 2/18 vertices, named, from b4fa222: #> [1] Gery Russ #> #> [[8]] #> + 2/18 vertices, named, from b4fa222: #> [1] Holly Michael #> #> [[9]] #> + 2/18 vertices, named, from b4fa222: #> [1] Holly John #> #> [[10]] #> + 2/18 vertices, named, from b4fa222: #> [1] Steve Bert #> #> [[11]] #> + 2/18 vertices, named, from b4fa222: #> [1] Steve Russ #>"},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum size vertex separators — min_st_separators","title":"Minimum size vertex separators — min_st_separators","text":"List vertex sets minimal \\((s,t)\\) separators \\(s\\) \\(t\\), undirected graph.","code":""},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum size vertex separators — min_st_separators","text":"","code":"min_st_separators(graph)"},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum size vertex separators — min_st_separators","text":"graph input graph. may directed, edge directions ignored.","code":""},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimum size vertex separators — min_st_separators","text":"list numeric vectors. vector contains vertex set (defined vertex ids), vector (s,t) separator input graph, \\(s\\) \\(t\\).","code":""},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minimum size vertex separators — min_st_separators","text":"\\((s,t)\\) vertex separator set vertices, removal graph, path \\(s\\) \\(t\\) graph. \\((s,t)\\) vertex separator minimal none proper subsets \\((s,t)\\) vertex separator \\(s\\) \\(t\\).","code":""},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Minimum size vertex separators — min_st_separators","text":"Note code returns {1, 3} despite subset {1} separator well. {1, 3} minimal respect separating vertices 2 4.","code":"g <- make_graph(~ 0-1-2-3-4-1) min_st_separators(g) #> [[1]] #> + 1/5 vertex, named: #> [1] 1 #> #> [[2]] #> + 2/5 vertices, named: #> [1] 2 4 #> #> [[3]] #> + 2/5 vertices, named: #> [1] 1 3"},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Minimum size vertex separators — min_st_separators","text":"Anne Berry, Jean-Paul Bordat Olivier Cogis: Generating Minimal Separators Graph, : Peter Widmayer, Gabriele Neyer Stephan Eidenbenz (editors): Graph-theoretic concepts computer science, 1665, 167–172, 1999. Springer.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Minimum size vertex separators — min_st_separators","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/min_st_separators.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimum size vertex separators — min_st_separators","text":"","code":"ring <- make_ring(4) min_st_separators(ring) #> [[1]] #> + 2/4 vertices, from b985be8: #> [1] 2 4 #> #> [[2]] #> + 2/4 vertices, from b985be8: #> [1] 1 3 #> chvatal <- make_graph(\"chvatal\") min_st_separators(chvatal) #> [[1]] #> + 4/12 vertices, from 1d14443: #> [1] 7 10 11 12 #> #> [[2]] #> + 4/12 vertices, from 1d14443: #> [1] 3 6 8 11 #> #> [[3]] #> + 4/12 vertices, from 1d14443: #> [1] 2 7 9 12 #> #> [[4]] #> + 4/12 vertices, from 1d14443: #> [1] 8 10 11 12 #> #> [[5]] #> + 4/12 vertices, from 1d14443: #> [1] 6 9 11 12 #> #> [[6]] #> + 4/12 vertices, from 1d14443: #> [1] 2 5 7 10 #> #> [[7]] #> + 4/12 vertices, from 1d14443: #> [1] 1 3 6 8 #> #> [[8]] #> + 4/12 vertices, from 1d14443: #> [1] 2 4 7 9 #> #> [[9]] #> + 4/12 vertices, from 1d14443: #> [1] 3 5 8 10 #> #> [[10]] #> + 4/12 vertices, from 1d14443: #> [1] 1 4 6 9 #> #> [[11]] #> + 4/12 vertices, from 1d14443: #> [1] 1 2 4 5 #> #> [[12]] #> + 4/12 vertices, from 1d14443: #> [1] 1 3 4 5 #> #> [[13]] #> + 6/12 vertices, from 1d14443: #> [1] 3 6 8 10 11 12 #> #> [[14]] #> + 6/12 vertices, from 1d14443: #> [1] 4 6 7 9 11 12 #> #> [[15]] #> + 6/12 vertices, from 1d14443: #> [1] 2 4 5 7 10 12 #> #> [[16]] #> + 6/12 vertices, from 1d14443: #> [1] 3 4 5 7 10 11 #> #> [[17]] #> + 6/12 vertices, from 1d14443: #> [1] 6 7 8 9 11 12 #> #> [[18]] #> + 6/12 vertices, from 1d14443: #> [1] 3 5 7 8 10 11 #> #> [[19]] #> + 6/12 vertices, from 1d14443: #> [1] 3 4 6 7 9 11 #> #> [[20]] #> + 6/12 vertices, from 1d14443: #> [1] 1 3 4 5 6 8 #> #> [[21]] #> + 6/12 vertices, from 1d14443: #> [1] 1 2 6 8 9 12 #> #> [[22]] #> + 6/12 vertices, from 1d14443: #> [1] 2 5 7 8 10 12 #> #> [[23]] #> + 6/12 vertices, from 1d14443: #> [1] 1 2 4 5 7 9 #> #> [[24]] #> + 6/12 vertices, from 1d14443: #> [1] 2 7 9 10 11 12 #> #> [[25]] #> + 6/12 vertices, from 1d14443: #> [1] 1 6 8 9 11 12 #> #> [[26]] #> + 6/12 vertices, from 1d14443: #> [1] 1 2 5 8 10 12 #> #> [[27]] #> + 6/12 vertices, from 1d14443: #> [1] 1 3 5 8 10 11 #> #> [[28]] #> + 6/12 vertices, from 1d14443: #> [1] 1 2 4 6 9 12 #> #> [[29]] #> + 6/12 vertices, from 1d14443: #> [1] 1 3 4 6 9 11 #> #> [[30]] #> + 6/12 vertices, from 1d14443: #> [1] 1 2 3 5 8 10 #> #> [[31]] #> + 6/12 vertices, from 1d14443: #> [1] 1 2 3 4 6 9 #> #> [[32]] #> + 6/12 vertices, from 1d14443: #> [1] 2 3 4 5 7 10 #> # https://github.com/r-lib/roxygen2/issues/1092"},{"path":"https://r.igraph.org/reference/minimal.st.separators.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum size vertex separators — minimal.st.separators","title":"Minimum size vertex separators — minimal.st.separators","text":"minimal.st.separators() renamed min_st_separators() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/minimal.st.separators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum size vertex separators — minimal.st.separators","text":"","code":"minimal.st.separators(graph)"},{"path":"https://r.igraph.org/reference/minimal.st.separators.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum size vertex separators — minimal.st.separators","text":"graph input graph. may directed, edge directions ignored.","code":""},{"path":"https://r.igraph.org/reference/minimum.size.separators.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum size vertex separators — minimum.size.separators","title":"Minimum size vertex separators — minimum.size.separators","text":"minimum.size.separators() renamed min_separators() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/minimum.size.separators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum size vertex separators — minimum.size.separators","text":"","code":"minimum.size.separators(graph)"},{"path":"https://r.igraph.org/reference/minimum.size.separators.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum size vertex separators — minimum.size.separators","text":"graph input graph. may directed, edge directions ignored.","code":""},{"path":"https://r.igraph.org/reference/minimum.spanning.tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum spanning tree — minimum.spanning.tree","title":"Minimum spanning tree — minimum.spanning.tree","text":"minimum.spanning.tree() renamed mst() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/minimum.spanning.tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum spanning tree — minimum.spanning.tree","text":"","code":"minimum.spanning.tree(graph, weights = NULL, algorithm = NULL, ...)"},{"path":"https://r.igraph.org/reference/minimum.spanning.tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum spanning tree — minimum.spanning.tree","text":"graph graph object analyze. weights Numeric vector giving weights edges graph. order determined edge ids. ignored unweighted algorithm chosen. Edge weights interpreted distances. algorithm algorithm use calculation. unweighted can used unweighted graphs, prim runs Prim's algorithm weighted graphs. NULL igraph select algorithm automatically: graph edge attribute called weight weights argument NULL Prim's algorithm chosen, otherwise unweighted algorithm used. ... Additional arguments, unused.","code":""},{"path":"https://r.igraph.org/reference/mod.matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Modularity of a community structure of a graph — mod.matrix","title":"Modularity of a community structure of a graph — mod.matrix","text":"mod.matrix() renamed modularity_matrix() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/mod.matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Modularity of a community structure of a graph — mod.matrix","text":"","code":"mod.matrix(graph, membership, weights = NULL, resolution = 1, directed = TRUE)"},{"path":"https://r.igraph.org/reference/mod.matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Modularity of a community structure of a graph — mod.matrix","text":"membership Numeric vector, one value vertex, membership vector community structure. weights NULL numeric vector giving edge weights. resolution resolution parameter. Must greater equal 0. Set 1 use classical definition modularity. directed Whether use directed undirected version modularity. Ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Modularity of a community structure of a graph — modularity.igraph","title":"Modularity of a community structure of a graph — modularity.igraph","text":"function calculates modular given division graph subgraphs.","code":""},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Modularity of a community structure of a graph — modularity.igraph","text":"","code":"# S3 method for class 'igraph' modularity(x, membership, weights = NULL, resolution = 1, directed = TRUE, ...) modularity_matrix( graph, membership, weights = NULL, resolution = 1, directed = TRUE )"},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Modularity of a community structure of a graph — modularity.igraph","text":"x, graph input graph. membership Numeric vector, one value vertex, membership vector community structure. weights NULL numeric vector giving edge weights. resolution resolution parameter. Must greater equal 0. Set 1 use classical definition modularity. directed Whether use directed undirected version modularity. Ignored undirected graphs. ... Additional arguments, none currently.","code":""},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Modularity of a community structure of a graph — modularity.igraph","text":"modularity() numeric scalar, modularity score given configuration. modularity_matrix() numeric square matrix, order number vertices graph.","code":""},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Modularity of a community structure of a graph — modularity.igraph","text":"modularity() calculates modularity graph respect given membership vector. modularity graph respect division (vertex types) measures good division , separated different vertex types . defined $$Q=\\frac{1}{2m} \\sum_{,j} (A_{ij}-\\gamma\\frac{k_i k_j}{2m})\\delta(c_i,c_j),$$ \\(m\\) number edges, \\(A_{ij}\\) element \\(\\) adjacency matrix row \\(\\) column \\(j\\), \\(k_i\\) degree \\(\\), \\(k_j\\) degree \\(j\\), \\(c_i\\) type (component) \\(\\), \\(c_j\\) \\(j\\), sum goes \\(\\) \\(j\\) pairs vertices, \\(\\delta(x,y)\\) 1 \\(x=y\\) 0 otherwise. directed graphs, defined $$Q = \\frac{1}{m} \\sum_{,j} (A_{ij}-\\gamma \\frac{k_i^{} k_j^{}}{m})\\delta(c_i,c_j).$$ resolution parameter \\(\\gamma\\) allows weighting random null model, might useful finding partitions high modularity. Maximizing modularity higher values resolution parameter typically results , smaller clusters finding partitions high modularity. Lower values typically results fewer, larger clusters. original definition modularity retrieved setting \\(\\gamma\\) 1. edge weights given, considered element \\(\\) adjacency matrix, \\(k_i\\) sum weights adjacent edges vertex \\(\\). modularity_matrix() calculates modularity matrix. dense matrix, defined difference adjacency matrix configuration model null model matrix. words element \\(M_{ij}\\) given \\(A_{ij}-d_i d_j/(2m)\\), \\(A_{ij}\\) (possibly weighted) adjacency matrix, \\(d_i\\) degree vertex \\(\\), \\(m\\) number edges (total weights graph, weighed).","code":""},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Modularity of a community structure of a graph — modularity.igraph","text":"Clauset, .; Newman, M. E. J. & Moore, C. Finding community structure large networks, Physical Review E 2004, 70, 066111","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Modularity of a community structure of a graph — modularity.igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/modularity.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Modularity of a community structure of a graph — modularity.igraph","text":"","code":"g <- make_full_graph(5) %du% make_full_graph(5) %du% make_full_graph(5) g <- add_edges(g, c(1, 6, 1, 11, 6, 11)) wtc <- cluster_walktrap(g) modularity(wtc) #> [1] 0.5757576 modularity(g, membership(wtc)) #> [1] 0.5757576"},{"path":"https://r.igraph.org/reference/motifs.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph motifs — motifs","title":"Graph motifs — motifs","text":"Graph motifs small connected induced subgraphs well-defined structure. functions search graph various motifs.","code":""},{"path":"https://r.igraph.org/reference/motifs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph motifs — motifs","text":"","code":"motifs(graph, size = 3, cut.prob = rep(0, size))"},{"path":"https://r.igraph.org/reference/motifs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph motifs — motifs","text":"graph Graph object, input graph. size size motif, currently sizes 3 4 supported directed graphs sizes 3-6 undirected graphs. cut.prob Numeric vector giving probabilities search graph cut certain level. length size motif (size argument). default cuts made.","code":""},{"path":"https://r.igraph.org/reference/motifs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph motifs — motifs","text":"motifs() returns numeric vector, number occurrences motif graph. motifs ordered isomorphism classes. Note unconnected subgraphs, considered motifs, result NA.","code":""},{"path":"https://r.igraph.org/reference/motifs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph motifs — motifs","text":"motifs() searches graph motifs given size returns numeric vector containing number different motifs. order motifs defined isomorphism class, see isomorphism_class().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/motifs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph motifs — motifs","text":"","code":"g <- sample_pa(100) motifs(g, 3) #> [1] NA NA 319 NA 80 0 0 0 0 0 0 0 0 0 0 0 count_motifs(g, 3) #> [1] 399 sample_motifs(g, 3) #> [1] 1220"},{"path":"https://r.igraph.org/reference/mst.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum spanning tree — mst","title":"Minimum spanning tree — mst","text":"spanning tree connected graph connected subgraph smallest number edges includes vertices graph. graph many spanning trees. Among , minimum spanning tree smallest sum edge weights.","code":""},{"path":"https://r.igraph.org/reference/mst.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum spanning tree — mst","text":"","code":"mst(graph, weights = NULL, algorithm = NULL, ...)"},{"path":"https://r.igraph.org/reference/mst.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum spanning tree — mst","text":"graph graph object analyze. weights Numeric vector giving weights edges graph. order determined edge ids. ignored unweighted algorithm chosen. Edge weights interpreted distances. algorithm algorithm use calculation. unweighted can used unweighted graphs, prim runs Prim's algorithm weighted graphs. NULL igraph select algorithm automatically: graph edge attribute called weight weights argument NULL Prim's algorithm chosen, otherwise unweighted algorithm used. ... Additional arguments, unused.","code":""},{"path":"https://r.igraph.org/reference/mst.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimum spanning tree — mst","text":"graph object minimum spanning forest. check whether tree, check number edges vcount(graph)-1. edge vertex attributes original graph preserved result.","code":""},{"path":"https://r.igraph.org/reference/mst.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minimum spanning tree — mst","text":"minimum spanning forest disconnected graph collection minimum spanning trees components. graph connected minimum spanning forest returned.","code":""},{"path":"https://r.igraph.org/reference/mst.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Minimum spanning tree — mst","text":"Prim, R.C. 1957. Shortest connection networks generalizations Bell System Technical Journal, 37 1389–1401.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/mst.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Minimum spanning tree — mst","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/mst.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimum spanning tree — mst","text":"","code":"g <- sample_gnp(100, 3 / 100) g_mst <- mst(g)"},{"path":"https://r.igraph.org/reference/multilevel.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding community structure by multi-level optimization of modularity — multilevel.community","title":"Finding community structure by multi-level optimization of modularity — multilevel.community","text":"multilevel.community() renamed cluster_louvain() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/multilevel.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding community structure by multi-level optimization of modularity — multilevel.community","text":"","code":"multilevel.community(graph, weights = NULL, resolution = 1)"},{"path":"https://r.igraph.org/reference/multilevel.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding community structure by multi-level optimization of modularity — multilevel.community","text":"graph input graph. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. resolution Optional resolution parameter allows user adjust resolution parameter modularity function algorithm uses internally. Lower values typically yield fewer, larger clusters. original definition modularity recovered resolution parameter set 1.","code":""},{"path":"https://r.igraph.org/reference/neighborhood.size.html","id":null,"dir":"Reference","previous_headings":"","what":"Neighborhood of graph vertices — neighborhood.size","title":"Neighborhood of graph vertices — neighborhood.size","text":"neighborhood.size() renamed ego_size() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/neighborhood.size.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neighborhood of graph vertices — neighborhood.size","text":"","code":"neighborhood.size( graph, order = 1, nodes = V(graph), mode = c(\"all\", \"out\", \"in\"), mindist = 0 )"},{"path":"https://r.igraph.org/reference/neighborhood.size.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neighborhood of graph vertices — neighborhood.size","text":"graph input graph. order Integer giving order neighborhood. nodes vertices calculation performed. mode Character constant, specifies use direction edges directed graph analyzed. ‘’ outgoing edges followed, vertices reachable source vertex order steps counted. ‘\"\"’ vertices source vertex reachable order steps counted. ‘\"\"’ ignores direction edges. argument ignored undirected graphs. mindist minimum distance include vertex result.","code":""},{"path":"https://r.igraph.org/reference/neighbors.html","id":null,"dir":"Reference","previous_headings":"","what":"Neighboring (adjacent) vertices in a graph — neighbors","title":"Neighboring (adjacent) vertices in a graph — neighbors","text":"vertex neighbor another one (words, two vertices adjacent), incident edge.","code":""},{"path":"https://r.igraph.org/reference/neighbors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neighboring (adjacent) vertices in a graph — neighbors","text":"","code":"neighbors(graph, v, mode = c(\"out\", \"in\", \"all\", \"total\"))"},{"path":"https://r.igraph.org/reference/neighbors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neighboring (adjacent) vertices in a graph — neighbors","text":"graph input graph. v vertex adjacent vertices queried. mode Whether query outgoing (‘’), incoming (‘’) edges, types (‘’). ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/neighbors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Neighboring (adjacent) vertices in a graph — neighbors","text":"vertex sequence containing neighbors input vertex.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/neighbors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neighboring (adjacent) vertices in a graph — neighbors","text":"","code":"g <- make_graph(\"Zachary\") n1 <- neighbors(g, 1) n34 <- neighbors(g, 34) intersection(n1, n34) #> + 4/34 vertices, from 60e12fe: #> [1] 9 14 20 32"},{"path":"https://r.igraph.org/reference/no.clusters.html","id":null,"dir":"Reference","previous_headings":"","what":"Connected components of a graph — no.clusters","title":"Connected components of a graph — no.clusters","text":".clusters() renamed count_components() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/no.clusters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connected components of a graph — no.clusters","text":"","code":"no.clusters(graph, mode = c(\"weak\", \"strong\"))"},{"path":"https://r.igraph.org/reference/no.clusters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connected components of a graph — no.clusters","text":"graph graph analyze. mode Character string, either “weak” “strong”. directed graphs “weak” implies weakly, “strong” strongly connected components search. ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/norm_coords.html","id":null,"dir":"Reference","previous_headings":"","what":"Normalize coordinates for plotting graphs — norm_coords","title":"Normalize coordinates for plotting graphs — norm_coords","text":"Rescale coordinates linearly within given bounds.","code":""},{"path":"https://r.igraph.org/reference/norm_coords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Normalize coordinates for plotting graphs — norm_coords","text":"","code":"norm_coords( layout, xmin = -1, xmax = 1, ymin = -1, ymax = 1, zmin = -1, zmax = 1 )"},{"path":"https://r.igraph.org/reference/norm_coords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Normalize coordinates for plotting graphs — norm_coords","text":"layout matrix two three columns, layout normalize. xmin, xmax limits first coordinate, one NULL normalization performed along direction. ymin, ymax limits second coordinate, one NULL normalization performed along direction. zmin, zmax limits third coordinate, one NULL normalization performed along direction.","code":""},{"path":"https://r.igraph.org/reference/norm_coords.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Normalize coordinates for plotting graphs — norm_coords","text":"numeric matrix dimension layout.","code":""},{"path":"https://r.igraph.org/reference/norm_coords.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Normalize coordinates for plotting graphs — norm_coords","text":"norm_coords() normalizes layout, linearly transforms coordinate separately fit given limits.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/norm_coords.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Normalize coordinates for plotting graphs — norm_coords","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/normalize.html","id":null,"dir":"Reference","previous_headings":"","what":"Normalize layout — normalize","title":"Normalize layout — normalize","text":"Scale coordinates layout.","code":""},{"path":"https://r.igraph.org/reference/normalize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Normalize layout — normalize","text":"","code":"normalize( xmin = -1, xmax = 1, ymin = xmin, ymax = xmax, zmin = xmin, zmax = xmax )"},{"path":"https://r.igraph.org/reference/normalize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Normalize layout — normalize","text":"xmin, xmax Minimum maximum x coordinates. ymin, ymax Minimum maximum y coordinates. zmin, zmax Minimum maximum z coordinates.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/normalize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Normalize layout — normalize","text":"","code":"layout_(make_ring(10), with_fr(), normalize()) #> [,1] [,2] #> [1,] -0.2892981 1.00000000 #> [2,] 0.3303621 0.97132133 #> [3,] 0.8216903 0.57441170 #> [4,] 1.0000000 -0.03662649 #> [5,] 0.7955814 -0.64123937 #> [6,] 0.2828226 -1.00000000 #> [7,] -0.3350831 -0.97135144 #> [8,] -0.8252331 -0.57114562 #> [9,] -1.0000000 0.04385973 #> [10,] -0.7963818 0.64580360"},{"path":"https://r.igraph.org/reference/optimal.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Optimal community structure — optimal.community","title":"Optimal community structure — optimal.community","text":"optimal.community() renamed cluster_optimal() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/optimal.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Optimal community structure — optimal.community","text":"","code":"optimal.community(graph, weights = NULL)"},{"path":"https://r.igraph.org/reference/optimal.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Optimal community structure — optimal.community","text":"graph input graph. Edge directions ignored directed graphs. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function.","code":""},{"path":"https://r.igraph.org/reference/page.rank.html","id":null,"dir":"Reference","previous_headings":"","what":"The Page Rank algorithm — page.rank","title":"The Page Rank algorithm — page.rank","text":"page.rank() renamed page_rank() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/page.rank.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Page Rank algorithm — page.rank","text":"","code":"page.rank( graph, algo = c(\"prpack\", \"arpack\"), vids = V(graph), directed = TRUE, damping = 0.85, personalized = NULL, weights = NULL, options = NULL )"},{"path":"https://r.igraph.org/reference/page.rank.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Page Rank algorithm — page.rank","text":"graph graph object. algo Character scalar, implementation use carry calculation. default \"prpack\", uses PRPACK library (https://github.com/dgleich/prpack) calculate PageRank scores solving set linear equations. new implementation igraph version 0.7, suggested one, stable fastest small graphs. \"arpack\" uses ARPACK library, default implementation igraph version 0.5 version 0.7. computes PageRank scores solving eingevalue problem. vids vertices interest. directed Logical, true directed paths considered directed graphs. ignored undirected graphs. damping damping factor (‘d’ original paper). personalized Optional vector giving probability distribution calculate personalized PageRank. personalized PageRank, probability jumping node abandoning random walk uniform, given vector. vector contains entry vertex rescaled sum one. weights numerical vector NULL. argument can used give edge weights calculating weighted PageRank vertices. NULL graph weight edge attribute used. weights numerical vector used, even graph weights edge attribute. NA, edge weights used (even graph weight edge attribute. function interprets edge weights connection strengths. random surfer model, edge larger weight likely selected surfer. options named list, override ARPACK options. See arpack() details. argument ignored PRPACK implementation used.","code":""},{"path":"https://r.igraph.org/reference/page_rank.html","id":null,"dir":"Reference","previous_headings":"","what":"The Page Rank algorithm — page_rank","title":"The Page Rank algorithm — page_rank","text":"Calculates Google PageRank specified vertices.","code":""},{"path":"https://r.igraph.org/reference/page_rank.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Page Rank algorithm — page_rank","text":"","code":"page_rank( graph, algo = c(\"prpack\", \"arpack\"), vids = V(graph), directed = TRUE, damping = 0.85, personalized = NULL, weights = NULL, options = NULL )"},{"path":"https://r.igraph.org/reference/page_rank.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Page Rank algorithm — page_rank","text":"graph graph object. algo Character scalar, implementation use carry calculation. default \"prpack\", uses PRPACK library (https://github.com/dgleich/prpack) calculate PageRank scores solving set linear equations. new implementation igraph version 0.7, suggested one, stable fastest small graphs. \"arpack\" uses ARPACK library, default implementation igraph version 0.5 version 0.7. computes PageRank scores solving eingevalue problem. vids vertices interest. directed Logical, true directed paths considered directed graphs. ignored undirected graphs. damping damping factor (‘d’ original paper). personalized Optional vector giving probability distribution calculate personalized PageRank. personalized PageRank, probability jumping node abandoning random walk uniform, given vector. vector contains entry vertex rescaled sum one. weights numerical vector NULL. argument can used give edge weights calculating weighted PageRank vertices. NULL graph weight edge attribute used. weights numerical vector used, even graph weights edge attribute. NA, edge weights used (even graph weight edge attribute. function interprets edge weights connection strengths. random surfer model, edge larger weight likely selected surfer. options named list, override ARPACK options. See arpack() details. argument ignored PRPACK implementation used.","code":""},{"path":"https://r.igraph.org/reference/page_rank.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Page Rank algorithm — page_rank","text":"named list entries: vector numeric vector PageRank scores. value using ARPACK method, eigenvalue corresponding eigenvector PageRank scores returned . expected exactly one, can used check ARPACK successfully converged expected eingevector. using PRPACK method, always set 1.0. options information underlying ARPACK calculation. See arpack() details. entry NULL ARPACK implementation used.","code":""},{"path":"https://r.igraph.org/reference/page_rank.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Page Rank algorithm — page_rank","text":"explanation PageRank algorithm, see following webpage: http://infolab.stanford.edu/~backrub/google.html, following reference: Sergey Brin Larry Page: Anatomy Large-Scale Hypertextual Web Search Engine. Proceedings 7th World-Wide Web Conference, Brisbane, Australia, April 1998. page_rank() function can use either PRPACK library ARPACK (see arpack()) perform calculation. Please note PageRank given vertex depends PageRank vertices, even want calculate PageRank vertices, must calculated. Requesting PageRank vertices result performance increase .","code":""},{"path":"https://r.igraph.org/reference/page_rank.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Page Rank algorithm — page_rank","text":"Sergey Brin Larry Page: Anatomy Large-Scale Hypertextual Web Search Engine. Proceedings 7th World-Wide Web Conference, Brisbane, Australia, April 1998.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/page_rank.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Page Rank algorithm — page_rank","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/page_rank.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Page Rank algorithm — page_rank","text":"","code":"g <- sample_gnp(20, 5 / 20, directed = TRUE) page_rank(g)$vector #> [1] 0.06671654 0.03465121 0.03191065 0.03795022 0.05203799 0.08640013 #> [7] 0.05432843 0.03246263 0.07131791 0.03808218 0.07507990 0.03825423 #> [13] 0.04067423 0.04913894 0.03305822 0.04230827 0.07675435 0.04823750 #> [19] 0.05124326 0.03939321 g2 <- make_star(10) page_rank(g2)$vector #> [1] 0.49008499 0.05665722 0.05665722 0.05665722 0.05665722 0.05665722 #> [7] 0.05665722 0.05665722 0.05665722 0.05665722 # Personalized PageRank g3 <- make_ring(10) page_rank(g3)$vector #> [1] 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 reset <- seq(vcount(g3)) page_rank(g3, personalized = reset)$vector #> [1] 0.08305627 0.07206568 0.07367581 0.08203783 0.09368592 0.10631408 #> [7] 0.11796217 0.12632419 0.12793432 0.11694373"},{"path":"https://r.igraph.org/reference/path.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper function to add or delete edges along a path — path","title":"Helper function to add or delete edges along a path — path","text":"function can used add delete edges form path.","code":""},{"path":"https://r.igraph.org/reference/path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper function to add or delete edges along a path — path","text":"","code":"path(...)"},{"path":"https://r.igraph.org/reference/path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper function to add or delete edges along a path — path","text":"... See details .","code":""},{"path":"https://r.igraph.org/reference/path.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper function to add or delete edges along a path — path","text":"special object can used together igraph graphs plus minus operators.","code":""},{"path":"https://r.igraph.org/reference/path.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Helper function to add or delete edges along a path — path","text":"adding edges via +, unnamed arguments concatenated, element final vector interpreted vertex graph. vector length \\(n+1\\), \\(n\\) edges added, vertex 1 vertex 2, vertex 2 vertex 3, etc. Named arguments used edge attributes new edges. deleting edges, attributes concatenated passed delete_edges().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/path.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper function to add or delete edges along a path — path","text":"","code":"# Create a (directed) wheel g <- make_star(11, center = 1) + path(2:11, 2) plot(g) g <- make_empty_graph(directed = FALSE, n = 10) %>% set_vertex_attr(\"name\", value = letters[1:10]) g2 <- g + path(\"a\", \"b\", \"c\", \"d\") plot(g2) g3 <- g2 + path(\"e\", \"f\", \"g\", weight = 1:2, color = \"red\") E(g3)[[]] #> + 5/5 edges from 83977f6 (vertex names): #> tail head tid hid weight color #> 1 a b 1 2 NA #> 2 b c 2 3 NA #> 3 c d 3 4 NA #> 4 e f 5 6 1 red #> 5 f g 6 7 2 red g4 <- g3 + path(c(\"f\", \"c\", \"j\", \"d\"), width = 1:3, color = \"green\") E(g4)[[]] #> + 8/8 edges from af713fd (vertex names): #> tail head tid hid weight color width #> 1 a b 1 2 NA NA #> 2 b c 2 3 NA NA #> 3 c d 3 4 NA NA #> 4 e f 5 6 1 red NA #> 5 f g 6 7 2 red NA #> 6 c f 3 6 NA green 1 #> 7 c j 3 10 NA green 2 #> 8 d j 4 10 NA green 3"},{"path":"https://r.igraph.org/reference/path.length.hist.html","id":null,"dir":"Reference","previous_headings":"","what":"Shortest (directed or undirected) paths between vertices — path.length.hist","title":"Shortest (directed or undirected) paths between vertices — path.length.hist","text":"path.length.hist() renamed distance_table() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/path.length.hist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shortest (directed or undirected) paths between vertices — path.length.hist","text":"","code":"path.length.hist(graph, directed = TRUE)"},{"path":"https://r.igraph.org/reference/path.length.hist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shortest (directed or undirected) paths between vertices — path.length.hist","text":"graph graph work . directed Whether consider directed paths directed graphs, argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/permute.html","id":null,"dir":"Reference","previous_headings":"","what":"Permute the vertices of a graph — permute","title":"Permute the vertices of a graph — permute","text":"Create new graph, permuting vertex ids.","code":""},{"path":"https://r.igraph.org/reference/permute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Permute the vertices of a graph — permute","text":"","code":"permute(graph, permutation)"},{"path":"https://r.igraph.org/reference/permute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Permute the vertices of a graph — permute","text":"graph input graph, can directed undirected. permutation numeric vector giving permutation apply. first element new id vertex 1, etc. Every number one vcount(graph) must appear exactly .","code":""},{"path":"https://r.igraph.org/reference/permute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Permute the vertices of a graph — permute","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/permute.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Permute the vertices of a graph — permute","text":"function creates new graph input graph permuting vertices according specified mapping. Call function output canonical_permutation() create canonical form graph. permute() keeps graph, vertex edge attributes graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/permute.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Permute the vertices of a graph — permute","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/permute.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Permute the vertices of a graph — permute","text":"","code":"# Random permutation of a random graph g <- sample_gnm(20, 50) g2 <- permute(g, sample(vcount(g))) graph.isomorphic(g, g2) #> [1] TRUE # Permutation keeps all attributes g$name <- \"Random graph, Gnm, 20, 50\" V(g)$name <- letters[1:vcount(g)] E(g)$weight <- sample(1:5, ecount(g), replace = TRUE) g2 <- permute(g, sample(vcount(g))) graph.isomorphic(g, g2) #> [1] TRUE g2$name #> [1] \"Random graph, Gnm, 20, 50\" V(g2)$name #> [1] \"i\" \"l\" \"b\" \"n\" \"t\" \"s\" \"f\" \"e\" \"k\" \"j\" \"q\" \"o\" \"d\" \"c\" \"p\" \"g\" \"m\" \"r\" \"a\" #> [20] \"h\" E(g2)$weight #> [1] 3 1 1 1 4 2 1 5 5 1 2 3 3 5 3 1 1 2 5 4 1 4 5 5 5 4 4 1 3 1 1 4 3 3 5 5 5 3 #> [39] 3 2 4 5 4 2 2 4 1 2 3 2 all(sort(E(g2)$weight) == sort(E(g)$weight)) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/permute.vertices.html","id":null,"dir":"Reference","previous_headings":"","what":"Permute the vertices of a graph — permute.vertices","title":"Permute the vertices of a graph — permute.vertices","text":"permute.vertices() renamed permute() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/permute.vertices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Permute the vertices of a graph — permute.vertices","text":"","code":"permute.vertices(graph, permutation)"},{"path":"https://r.igraph.org/reference/permute.vertices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Permute the vertices of a graph — permute.vertices","text":"graph input graph, can directed undirected. permutation numeric vector giving permutation apply. first element new id vertex 1, etc. Every number one vcount(graph) must appear exactly .","code":""},{"path":"https://r.igraph.org/reference/piecewise.layout.html","id":null,"dir":"Reference","previous_headings":"","what":"Merging graph layouts — piecewise.layout","title":"Merging graph layouts — piecewise.layout","text":"piecewise.layout() renamed layout_components() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/piecewise.layout.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merging graph layouts — piecewise.layout","text":"","code":"piecewise.layout(graph, layout = layout_with_kk, ...)"},{"path":"https://r.igraph.org/reference/piecewise.layout.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merging graph layouts — piecewise.layout","text":"graph input graph. layout function object, layout function use. ... Additional arguments pass layout layout function.","code":""},{"path":"https://r.igraph.org/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Magrittr's pipes — %>%","title":"Magrittr's pipes — %>%","text":"igraph re-exports %>% operator magrittr, find useful. Please see documentation magrittr package.","code":""},{"path":"https://r.igraph.org/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Magrittr's pipes — %>%","text":"lhs Left hand side pipe. rhs Right hand side pipe.","code":""},{"path":"https://r.igraph.org/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Magrittr's pipes — %>%","text":"Result applying right hand side result left hand side.","code":""},{"path":"https://r.igraph.org/reference/pipe.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Magrittr's pipes — %>%","text":"","code":"make_ring(10) %>% add_edges(c(1, 6)) %>% plot()"},{"path":"https://r.igraph.org/reference/plot.common.html","id":null,"dir":"Reference","previous_headings":"","what":"Drawing graphs — Drawing graphs","title":"Drawing graphs — Drawing graphs","text":"common bits three plotting functions plot.igraph, tkplot rglplot discussed manual page","code":""},{"path":"https://r.igraph.org/reference/plot.common.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Drawing graphs — Drawing graphs","text":"currently three different functions igraph package can draw graph various ways: plot.igraph simple non-interactive 2D plotting R devices. Actually implementation plot generic function, can write plot(graph) instead plot.igraph(graph). used standard R devices supports every output format R output device. list quite impressing: PostScript, PDF files, XFig files, SVG files, JPG, PNG course can plot screen well using default devices, good-looking anti-aliased Cairo device. See plot.igraph information. tkplot interactive 2D plotting using tcltk package. can handle graphs moderate size, thousand vertices probably already many. parameters plotted graph can changed interactively issuing tkplot command: position, color size vertices color width edges. See tkplot details. rglplot experimental function draw graphs 3D using OpenGL. See rglplot information. Please also check examples .","code":""},{"path":"https://r.igraph.org/reference/plot.common.html","id":"how-to-specify-graphical-parameters","dir":"Reference","previous_headings":"","what":"How to specify graphical parameters","title":"Drawing graphs — Drawing graphs","text":"three ways give values parameters described , section 'Parameters'. give three ways order precedence. first method supply named arguments plotting commands: plot.igraph, tkplot rglplot. Parameters vertices start prefix ‘vertex.’, parameters edges prefix ‘edge.’, global parameters prefix. Eg. color vertices can given via argument vertex.color, whereas edge.color sets color edges. layout gives layout graphs. second way assign vertex, edge graph attributes graph. attributes prefix, ie. color vertices taken color vertex attribute color edges color edge attribute. layout graph given layout graph attribute. (Always assuming corresponding command argument present.) Setting vertex edge attributes handy want assign given ‘look’ graph, attributes saved graph save save GraphML format write_graph, graph look loading . parameter given command line, corresponding vertex/edge/graph attribute also missing general igraph parameters handled igraph_options also checked. Vertex parameters prefix ‘vertex.’, edge parameters prefixed ‘edge.’, general parameters like layout prefixed ‘plot’. parameters useful want graphs look, vertex size, vertex color, etc. need set every plotting, also need assign vertex/edge attributes every graph. value parameter specified three ways described , default valued used, given source code. Different parameters can different type, eg. vertex colors can given character vector color names, integer vector color numbers current palette. Different types valid different parameters, discussed detail next section. however always true parameter can always function object called graph single argument get “proper” value parameter. (function returns another function object called ...)","code":""},{"path":"https://r.igraph.org/reference/plot.common.html","id":"the-list-of-parameters","dir":"Reference","previous_headings":"","what":"The list of parameters","title":"Drawing graphs — Drawing graphs","text":"Vertex parameters first, note ‘vertex.’ prefix needs added used argument setting via igraph_options. value parameter may scalar valid every vertex vector separate value vertex. (Shorter vectors recycled.) size size vertex, numeric scalar vector, latter case vertex sizes may differ. vertex sizes scaled order size vertices given value three plotting commands. need integer number. default value 15. big enough place short labels vertices. size2 “” size vertex, vertex shapes. various rectangle shapes gives height vertices, whereas size gives width. ignored shapes size can specified single number. default 15. color fill color vertex. numeric current palette used, see palette. character vector may either contain integer values, named colors RGB specified colors three four bytes. strings starting ‘#’ assumed RGB color specifications. possible mix named color RGB colors. Note tkplot ignores fourth byte (alpha channel) RGB color specification. plot.igraph integer values, default igraph palette used (see ‘palette’ parameter . Note different R palette. want () vertices color, supply NA color name. default value “SkyBlue2”. frame.color color frame vertices, formats allowed fill color. want vertices frame, supply NA color name. default “black”. frame.width width frame vertices. default value 1. shape shape vertex, currently “circle”, “square”, “csquare”, “rectangle”, “crectangle”, “vrectangle”, “pie” (see vertex.shape.pie), ‘sphere’, “none” supported, plot.igraph command. “none” draw vertices , although vertex label plotted (given). See shapes details vertex shapes vertex.shape.pie using pie charts vertices. “sphere” vertex shape plots vertices 3D ray-traced spheres, given color size. produces raster image supported graphics devices. devices raster transparency supported spheres transparent background. See dev.capabilities ‘rasterImage’ capability check device supported. default vertices drawn circles. label vertex labels. converted character. Specify NA omit vertex labels. default vertex labels vertex ids. label.family font family used vertex labels. different plotting commands can used different fonts, interpret parameter different ways. basic notation , however, understood plot.igraph tkplot. rglplot support fonts right now, ignores parameter completely. plot.igraph parameter simply passed text argument family. tkplot conversion performed. parameter name exixting Tk font, font used label.font label.cex parameters ignored complerely. one base families (serif, sans, mono) Times, Helvetica Courier fonts used, guaranteed exist systems. ‘symbol’ base family used symbol font available, otherwise first font ‘symbol’ name. parameter name base families also named Tk font pass tkfont.create hope user knows . label.font label.cex parameters also passed tkfont.create case. default value ‘serif’. label.font font within font family use vertex labels. interpreted way font graphical parameter: 1 plain text, 2 bold face, 3 italic, 4 bold italic 5 specifies symbol font. plot.igraph parameter simply passed text. tkplot, label.family parameter name Tk font parameter used set whether newly created font italic / boldface. Otherwise ignored. rglplot ignored. default value 1. label.cex font size vertex labels. interpreted multiplication factor device-dependent base font size. plot.igraph simply passed text argument cex. tkplot multiplied 12 used size argument tkfont.create. base font thus 12 tkplot. rglplot ignored. default value 1. label.dist distance label center vertex. 0 label centered vertex. 1 label displayed beside vertex. default value 0. label.degree defines position vertex labels, relative center vertices. interpreted angle radian, zero means ‘right’, ‘pi’ means left, -pi/2 pi/2. default value -pi/4. label.color color labels, see color vertex parameter discussed earlier possible values. default value black. Edge parameters require add ‘edge.’ prefix used arguments set igraph_options. edge parameters: color color edges, see color vertex parameter possible values. default parameter darkgrey. width width edges. default value 1. arrow.size size arrows. Currently constant, every edge. vector submitted first element used, ie. taken edge attribute attribute first edge used arrows. likely change future. default value 1. arrow.width width arrows. Currently constant, every edge. vector submitted first element used, ie. taken edge attribute attribute first edge used arrows. likely change future. argument currently used plot.igraph. default value 1, gives width option appeared igraph. lty line type edges. Almost format accepted standard graphics par, 0 “blank” mean edges, 1 “solid” solid lines, possible values : 2 (“dashed”), 3 (“dotted”), 4 (“dotdash”), 5 (“longdash”), 6 (“twodash”). tkplot also accepts standard Tk line type strings, however support “blank” lines, instead type ‘0’ type ‘1’, ie. solid lines drawn. argument ignored rglplot. default value type 1, solid line. label edge labels. converted character. Specify NA omit edge labels. Edge labels omitted default. label.family Font family edge labels. See vertex parameter name details. label.font font edge labels. See corresponding vertex parameter discussed earlier details. label.cex font size edge labels, see corresponding vertex parameter details. label.color color edge labels, see color vertex parameters specify colors. label.x horizontal coordinates edge labels might given , explicitly. NA elements replaced automatically calculated coordinates. NULL, edge horizontal coordinates calculated automatically. parameter supported plot.igraph. label.y label.x, vertical coordinates. curved Specifies whether draw curved edges, . can logical numeric vector scalar. First vector replicated length number edges graph. interpreted edge separately. numeric value specifies curvature edge; zero curvature means straight edges, negative values means edge bends clockwise, positive values opposite. TRUE means curvature 0.5, FALSE means curvature zero. default vector specifying curvatire calculated via call curve_multiple function. function makes sure multiple edges curved visible. parameter ignored loop edges. default value FALSE. parameter currently ignored rglplot. arrow.mode parameter can used specify edges arrows drawn. parameter given user (either three ways) specifies edges forward, backward arrows, , arrows . usual, parameter can vector scalar value. can integer character type. integer 0 means arrows, 1 means backward arrows, 2 forward arrows 3 . character vector “<” “<-” specify backward, “>” “->” forward arrows “<>” “<->” stands arrows. values mean arrows, perhaps use “-” “–” specify arrows. Hint: parameter can used ‘cheap’ solution drawing “mixed” graphs: graphs edges directed . want , please create directed graph, version 0.4 vertex pairs edge lists can swapped undirected graphs. default, arrows drawn undirected graphs, directed graphs, arrow drawn edge, according direction. surprising, expected behavior. loop.angle Gives angle radian plotting loop edges. See label.dist vertex parameter see interpreted. default value 0. loop.angle2 Gives second angle radian plotting loop edges. used 3D, loop.angle enough 2D. default value 0. parameters: layout Either function numeric matrix. specifies vertices placed plot. numeric matrix, matrix one line vertex, specifying coordinates. matrix least two columns, x y coordinates, can also third column, z coordinate 3D plots ignored 2D plots. two column matrix given 3D plotting function rglplot third column assumed 1 vertex. layout function, function called graph single parameter determine actual coordinates. function return matrix two three columns. 2D plots third column ignored. default value layout_nicely, smart function chooses layouter based graph. margin amount empty space , , left right plot, numeric vector length four. Usually values 0 0.5 meaningful, negative values also possible, make plot zoom part graph. shorter four recycled. rglplot support parameter, can zoom graph flexible way. default value 0. palette color palette use vertex color. default categorical_pal, color-blind friendly categorical palette. See manual page details palettes. parameters supported plot, tkplot rglplot. rescale Logical constant, whether rescale coordinates [-1,1]x[-1,1](x[-1,1]) interval. parameter implemented tkplot. Defaults TRUE, layout rescaled. asp numeric constant, gives asp parameter plot, aspect ratio. Supply 0 want give aspect ratio. ignored tkplot rglplot. Defaults 1. frame Boolean, whether plot frame around graph. ignored tkplot rglplot. Defaults FALSE. main Overall title main plot. default empty annotate.plot igraph option FALSE, graph's name attribute otherwise. See argument base plot function. supported plot. sub Subtitle main plot, default empty. supported plot. xlab Title x axis, default empty annotate.plot igraph option FALSE, number vertices edges, TRUE. supported plot. ylab Title y axis, default empty. supported plot.","code":""},{"path":"https://r.igraph.org/reference/plot.common.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Drawing graphs — Drawing graphs","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/plot.common.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Drawing graphs — Drawing graphs","text":"","code":"if (FALSE) { # \\dontrun{ # plotting a simple ring graph, all default parameters, except the layout g <- make_ring(10) g$layout <- layout_in_circle plot(g) tkplot(g) rglplot(g) # plotting a random graph, set the parameters in the command arguments g <- barabasi.game(100) plot(g, layout=layout_with_fr, vertex.size=4, vertex.label.dist=0.5, vertex.color=\"red\", edge.arrow.size=0.5) # plot a random graph, different color for each component g <- sample_gnp(100, 1/100) comps <- components(g)$membership colbar <- rainbow(max(comps)+1) V(g)$color <- colbar[comps+1] plot(g, layout=layout_with_fr, vertex.size=5, vertex.label=NA) # plot communities in a graph g <- make_full_graph(5) %du% make_full_graph(5) %du% make_full_graph(5) g <- add_edges(g, c(1,6, 1,11, 6,11)) com <- cluster_spinglass(g, spins=5) V(g)$color <- com$membership+1 g <- set_graph_attr(g, \"layout\", layout_with_kk(g)) plot(g, vertex.label.dist=1.5) # draw a bunch of trees, fix layout igraph_options(plot.layout=layout_as_tree) plot(make_tree(20, 2)) plot(make_tree(50, 3), vertex.size=3, vertex.label=NA) tkplot(make_tree(50, 2, mode=\"undirected\"), vertex.size=10, vertex.color=\"green\") } # }"},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Plotting of graphs — plot.igraph","title":"Plotting of graphs — plot.igraph","text":"plot.igraph() able plot graphs R device. non-interactive companion tkplot() function.","code":""},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plotting of graphs — plot.igraph","text":"","code":"# S3 method for class 'igraph' plot( x, axes = FALSE, add = FALSE, xlim = c(-1, 1), ylim = c(-1, 1), mark.groups = list(), mark.shape = 1/2, mark.col = rainbow(length(mark.groups), alpha = 0.3), mark.border = rainbow(length(mark.groups), alpha = 1), mark.expand = 15, loop.size = 1, ... )"},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plotting of graphs — plot.igraph","text":"x graph plot. axes Logical, whether plot axes, defaults FALSE. add Logical scalar, whether add plot current device, delete device's current contents first. xlim limits horizontal axis, unlikely want modify . ylim limits vertical axis, unlikely want modify . mark.groups list vertex id vectors. interpreted set vertex groups. vertex group highlighted, plotting colored smoothed polygon around “” . See arguments control look polygons. mark.shape numeric scalar vector. Controls smoothness vertex group marking polygons. basically ‘shape’ parameter graphics::xspline() function, possible values -1 1. vector, different value used different vertex groups. mark.col scalar vector giving colors marking polygons, format accepted graphics::xspline(); e.g. numeric color ids, symbolic color names, colors RGB. mark.border scalar vector giving colors borders vertex group marking polygons. NA, border drawn. mark.expand numeric scalar vector, size border around marked vertex groups. units vertex sizes. vector given, different values used different vertex groups. loop.size numeric scalar allows user scale loop edges network. default loop size 1. Larger values produce larger loops. ... Additional plotting parameters. See igraph.plotting complete list.","code":""},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plotting of graphs — plot.igraph","text":"Returns NULL, invisibly.","code":""},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plotting of graphs — plot.igraph","text":"One convenient way plot graphs plot tkplot() first, handtune placement vertices, query coordinates tk_coords() function use plot() plot graph R device.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plotting of graphs — plot.igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/plot.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plotting of graphs — plot.igraph","text":"","code":"g <- make_ring(10) plot(g, layout = layout_with_kk, vertex.color = \"green\")"},{"path":"https://r.igraph.org/reference/plot.sir.html","id":null,"dir":"Reference","previous_headings":"","what":"Plotting the results on multiple SIR model runs — plot.sir","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"function can conveniently plot results multiple SIR model simulations.","code":""},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"","code":"# S3 method for class 'sir' plot( x, comp = c(\"NI\", \"NS\", \"NR\"), median = TRUE, quantiles = c(0.1, 0.9), color = NULL, median_color = NULL, quantile_color = NULL, lwd.median = 2, lwd.quantile = 2, lty.quantile = 3, xlim = NULL, ylim = NULL, xlab = \"Time\", ylab = NULL, ... )"},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"x output SIR simulation, coming sir() function. comp Character scalar, component plot. Either ‘NI’ (infected, default), ‘NS’ (susceptible) ‘NR’ (recovered). median Logical scalar, whether plot (binned) median. quantiles vector (binned) quantiles plot. color Color individual simulation curves. median_color Color median curve. quantile_color Color(s) quantile curves. (recycled needed non-needed entries ignored long.) lwd.median Line width median. lwd.quantile Line width quantile curves. lty.quantile Line type quantile curves. xlim x limits, two-element numeric vector. NULL, calculated data. ylim y limits, two-element numeric vector. NULL, calculated data. xlab x label. ylab y label. NULL automatically added based comp argument. ... Additional arguments passed plot(), run curves added, create figure.","code":""},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"Nothing.","code":""},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"number susceptible/infected/recovered individuals plotted time, multiple simulations.","code":""},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"Bailey, Norman T. J. (1975). mathematical theory infectious diseases applications (2nd ed.). London: Griffin.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"Eric Kolaczyk (http://math.bu.edu/people/kolaczyk/) Gabor Csardi csardi.gabor@gmail.com.","code":""},{"path":"https://r.igraph.org/reference/plot.sir.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plotting the results on multiple SIR model runs — plot.sir","text":"","code":"g <- sample_gnm(100, 100) sm <- sir(g, beta = 5, gamma = 1) plot(sm)"},{"path":"https://r.igraph.org/reference/plotHierarchy.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Cohesive Blocks — plotHierarchy","title":"Calculate Cohesive Blocks — plotHierarchy","text":"plotHierarchy() renamed plot_hierarchy() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/plotHierarchy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Cohesive Blocks — plotHierarchy","text":"","code":"plotHierarchy( blocks, layout = layout_as_tree(hierarchy(blocks), root = 1), ... )"},{"path":"https://r.igraph.org/reference/plotHierarchy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Cohesive Blocks — plotHierarchy","text":"layout layout plot, simply passed plot.igraph(), see possible formats . default Reingold-Tilford layout generator used. ... Additional arguments. plot_hierarchy() plot() pass plot.igraph(). print() summary() ignore .","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure dendrogram plots — plot_dendrogram","title":"Community structure dendrogram plots — plot_dendrogram","text":"Plot hierarchical community structure dendrogram.","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure dendrogram plots — plot_dendrogram","text":"","code":"plot_dendrogram(x, mode = igraph_opt(\"dend.plot.type\"), ...) # S3 method for class 'communities' plot_dendrogram( x, mode = igraph_opt(\"dend.plot.type\"), ..., use.modularity = FALSE, palette = categorical_pal(8) )"},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure dendrogram plots — plot_dendrogram","text":"x object containing community structure graph. See communities() details. mode dendrogram plotting function use. See details . ... Additional arguments supply dendrogram plotting function. use.modularity Logical scalar, whether use modularity values define height branches. palette color palette use colored plots.","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Community structure dendrogram plots — plot_dendrogram","text":"Returns whatever return value plotting function, plot.phylo, plot.dendrogram plot.hclust.","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Community structure dendrogram plots — plot_dendrogram","text":"plot_dendrogram() supports three different plotting functions, selected via mode argument. default plotting function taken dend.plot.type igraph option, possible values: auto Choose automatically plotting functions. plot.phylo sophisticated, choosen, whenever ape package available. Otherwise plot.hclust used. phylo Use plot.phylo ape package. hclust Use plot.hclust stats package. dendrogram Use plot.dendrogram stats package. different plotting functions take different sets arguments. using plot.phylo (mode=\"phylo\"), following syntax: extra arguments documented : colbar Color bar edges. edge.color Edge colors. NULL, colbar argument used. use.edge.length Passed plot.phylo. dots Attitional arguments pass plot.phylo. syntax plot.hclust (mode=\"hclust\"): extra arguments documented : rect numeric scalar, number groups mark dendrogram. dendrogram cut exactly rect groups marked via rect.hclust command. Set zero want mark groups. colbar colors rectangles mark vertex groups via rect argument. hang put leaf nodes, corresponds hang argument plot.hclust. ann Whether annotate plot, ann argument plot.hclust. main main title plot, main argument plot.hclust. sub sub-title plot, sub argument plot.hclust. xlab label horizontal axis, passed plot.hclust. ylab label vertical axis, passed plot.hclust. dots Attitional arguments pass plot.hclust. syntax plot.dendrogram (mode=\"dendrogram\"): extra arguments simply passed .dendrogram().","code":"plot_dendrogram(x, mode=\"phylo\", colbar = palette(), edge.color = NULL, use.edge.length = FALSE, \\dots) plot_dendrogram(x, mode=\"hclust\", rect = 0, colbar = palette(), hang = 0.01, ann = FALSE, main = \"\", sub = \"\", xlab = \"\", ylab = \"\", \\dots) plot_dendrogram(x, \\dots)"},{"path":[]},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community structure dendrogram plots — plot_dendrogram","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.communities.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community structure dendrogram plots — plot_dendrogram","text":"","code":"karate <- make_graph(\"Zachary\") fc <- cluster_fast_greedy(karate) plot_dendrogram(fc)"},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":null,"dir":"Reference","previous_headings":"","what":"HRG dendrogram plot — plot_dendrogram.igraphHRG","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"Plot hierarchical random graph dendrogram.","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"","code":"# S3 method for class 'igraphHRG' plot_dendrogram(x, mode = igraph_opt(\"dend.plot.type\"), ...)"},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"x igraphHRG, hierarchical random graph, returned fit_hrg() function. mode dendrogram plotting function use. See details . ... Additional arguments supply dendrogram plotting function.","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"Returns whatever return value plotting function, plot.phylo, plot.dendrogram plot.hclust.","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"plot_dendrogram() supports three different plotting functions, selected via mode argument. default plotting function taken dend.plot.type igraph option, possible values: auto Choose automatically plotting functions. plot.phylo sophisticated, choosen, whenever ape package available. Otherwise plot.hclust used. phylo Use plot.phylo ape package. hclust Use plot.hclust stats package. dendrogram Use plot.dendrogram stats package. different plotting functions take different sets arguments. using plot.phylo (mode=\"phylo\"), following syntax: extra arguments documented : colbar Color bar edges. edge.color Edge colors. NULL, colbar argument used. use.edge.length Passed plot.phylo. dots Attitional arguments pass plot.phylo. syntax plot.hclust (mode=\"hclust\"): extra arguments documented : rect numeric scalar, number groups mark dendrogram. dendrogram cut exactly rect groups marked via rect.hclust command. Set zero want mark groups. colbar colors rectangles mark vertex groups via rect argument. hang put leaf nodes, corresponds hang argument plot.hclust. ann Whether annotate plot, ann argument plot.hclust. main main title plot, main argument plot.hclust. sub sub-title plot, sub argument plot.hclust. xlab label horizontal axis, passed plot.hclust. ylab label vertical axis, passed plot.hclust. dots Attitional arguments pass plot.hclust. syntax plot.dendrogram (mode=\"dendrogram\"): extra arguments simply passed .dendrogram().","code":"plot_dendrogram(x, mode=\"phylo\", colbar = rainbow(11, start=0.7, end=0.1), edge.color = NULL, use.edge.length = FALSE, \\dots) plot_dendrogram(x, mode=\"hclust\", rect = 0, colbar = rainbow(rect), hang = 0.01, ann = FALSE, main = \"\", sub = \"\", xlab = \"\", ylab = \"\", \\dots) plot_dendrogram(x, \\dots)"},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/plot_dendrogram.igraphHRG.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"HRG dendrogram plot — plot_dendrogram.igraphHRG","text":"","code":"g <- make_full_graph(5) + make_full_graph(5) hrg <- fit_hrg(g) plot_dendrogram(hrg)"},{"path":"https://r.igraph.org/reference/plus-.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Add vertices, edges or another graph to a graph — +.igraph","title":"Add vertices, edges or another graph to a graph — +.igraph","text":"Add vertices, edges another graph graph","code":""},{"path":"https://r.igraph.org/reference/plus-.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add vertices, edges or another graph to a graph — +.igraph","text":"","code":"# S3 method for class 'igraph' e1 + e2"},{"path":"https://r.igraph.org/reference/plus-.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add vertices, edges or another graph to a graph — +.igraph","text":"e1 First argument, probably igraph graph, see details . e2 Second argument, see details .","code":""},{"path":"https://r.igraph.org/reference/plus-.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add vertices, edges or another graph to a graph — +.igraph","text":"plus operator can used add vertices edges graph. actual operation performed depends type right hand side argument. another igraph graph object named graphs, union two graphs calculated, see union(). another igraph graph object, either two named, disjoint union two graphs calculated, see disjoint_union(). numeric scalar, specified number vertices added graph. character scalar vector, interpreted names vertices add graph. object created vertex() vertices() function, new vertices added graph. form appropriate one wants add vertex attributes well. operands vertices() function specifies number vertices add attributes well. unnamed arguments vertices() concatenated used ‘name’ vertex attribute (.e. vertex names), named arguments added additional vertex attributes. Examples: vertex() just alias vertices(), provided readability. user use single vertex added graph. object created edge() edges() function, new edges added graph. new edges possibly attributes can specified arguments edges() function. unnamed arguments edges() concatenated used vertex ids end points new edges. named arguments added edge attributes. Examples: See examples . edge() just alias edges() provided readability. user use single edge added graph. object created path() function, new edges form path added. edges possibly attributes specified arguments path() function. non-named arguments concatenated interpreted vertex ids along path. remaining arguments added edge attributes. Examples: important note , although plus operator commutative, .e. possible write associative, e.g. results syntax error, unless parentheses used: clarity, suggest always put graph object left hand side operator:","code":"g <- g + vertex(shape=\"circle\", color= \"red\") g <- g + vertex(\"foo\", color=\"blue\") g <- g + vertex(\"bar\", \"foobar\") g <- g + vertices(\"bar2\", \"foobar2\", color=1:2, shape=\"rectangle\") g <- make_empty_graph() + vertices(letters[1:10]) + vertices(\"foo\", \"bar\", \"bar2\", \"foobar2\") g <- g + edge(\"a\", \"b\") g <- g + edges(\"foo\", \"bar\", \"bar2\", \"foobar2\") g <- g + edges(c(\"bar\", \"foo\", \"foobar2\", \"bar2\"), color=\"red\", weight=1:2) g <- make_empty_graph() + vertices(letters[1:10]) g <- g + path(\"a\", \"b\", \"c\", \"d\") g <- g + path(\"e\", \"f\", \"g\", weight=1:2, color=\"red\") g <- g + path(c(\"f\", \"c\", \"j\", \"d\"), width=1:3, color=\"green\") graph <- \"foo\" + make_empty_graph() graph <- \"foo\" + \"bar\" + make_empty_graph() graph <- \"foo\" + ( \"bar\" + make_empty_graph() ) graph <- make_empty_graph() + \"foo\" + \"bar\""},{"path":[]},{"path":"https://r.igraph.org/reference/plus-.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add vertices, edges or another graph to a graph — +.igraph","text":"","code":"# 10 vertices named a,b,c,... and no edges g <- make_empty_graph() + vertices(letters[1:10]) # Add edges to make it a ring g <- g + path(letters[1:10], letters[1], color = \"grey\") # Add some extra random edges g <- g + edges(sample(V(g), 10, replace = TRUE), color = \"red\") g$layout <- layout_in_circle plot(g)"},{"path":"https://r.igraph.org/reference/power.law.fit.html","id":null,"dir":"Reference","previous_headings":"","what":"Fitting a power-law distribution function to discrete data — power.law.fit","title":"Fitting a power-law distribution function to discrete data — power.law.fit","text":"power.law.fit() renamed fit_power_law() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/power.law.fit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fitting a power-law distribution function to discrete data — power.law.fit","text":"","code":"power.law.fit( x, xmin = NULL, start = 2, force.continuous = FALSE, implementation = c(\"plfit\", \"R.mle\"), ... )"},{"path":"https://r.igraph.org/reference/power.law.fit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fitting a power-law distribution function to discrete data — power.law.fit","text":"x data fit, numeric vector. implementation ‘R.mle’ data must integer values. ‘plfit’ implementation non-integer values might present continuous power-law distribution fitted. xmin Numeric scalar, NULL. lower bound fitting power-law. NULL, smallest value x used ‘R.mle’ implementation, value automatically determined ‘plfit’ implementation. argument makes possible fit tail distribution. start Numeric scalar. initial value exponent minimizing function, ‘R.mle’ implementation. Usually safe leave untouched. force.continuous Logical scalar. Whether force continuous distribution ‘plfit’ implementation, even sample vector contains integer values (chance). argument false, igraph assume continuous distribution least one sample non-integer assume discrete distribution otherwise. implementation Character scalar. implementation use. See details . ... Additional arguments, passed maximum likelihood optimizing function, stats4::mle(), ‘R.mle’ implementation chosen. ignored ‘plfit’ implementation.","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"power_centrality() takes graph (dat) returns Boncich power centralities positions (selected nodes). decay rate power contributions specified exponent (1 default).","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"","code":"power_centrality( graph, nodes = V(graph), loops = FALSE, exponent = 1, rescale = FALSE, tol = 1e-07, sparse = TRUE )"},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"graph input graph. nodes vertex sequence indicating vertices included calculation. default, vertices included. loops boolean indicating whether diagonal treated valid data. Set true data can contain loops. loops FALSE default. exponent exponent (decay rate) Bonacich power centrality score; can negative rescale true, centrality scores rescaled sum 1. tol tolerance near-singularities matrix inversion (see solve()) sparse Logical scalar, whether use sparse matrices calculation. ‘Matrix’ package required sparse matrix support","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"vector, containing centrality scores.","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"Bonacich's power centrality measure defined \\(C_{BP}\\left(\\alpha,\\beta\\right)=\\alpha\\left(\\mathbf{}-\\beta\\mathbf{}\\right)^{-1}\\mathbf{}\\mathbf{1}\\), \\(\\beta\\) attenuation parameter (set exponent) \\(\\mathbf{}\\) graph adjacency matrix. (coefficient \\(\\alpha\\) acts scaling parameter, set (following Bonacich (1987)) sum squared scores equal number vertices. allows 1 used reference value “middle” centrality range.) \\(\\beta \\rightarrow \\)\\( 1/\\lambda_{\\mathbf{}1}\\) (reciprocal largest eigenvalue \\(\\mathbf{}\\)), within constant multiple familiar eigenvector centrality score; values \\(\\beta\\), behavior measure quite different. particular, \\(\\beta\\) gives positive negative weight even odd walks, respectively, can seen series expansion \\(C_{BP}\\left(\\alpha,\\beta\\right)=\\alpha \\sum_{k=0}^\\infty \\beta^k \\)\\( \\mathbf{}^{k+1} \\mathbf{1}\\) converges long \\(|\\beta| \\)\\( < 1/\\lambda_{\\mathbf{}1}\\). magnitude \\(\\beta\\) controls influence distant actors ego's centrality score, larger magnitudes indicating slower rates decay. (High rates, hence, imply greater sensitivity edge effects.) Interpretively, Bonacich power measure corresponds notion power vertex recursively defined sum power alters. nature recursion involved controlled power exponent: positive values imply vertices become powerful alters become powerful (occurs cooperative relations), negative values imply vertices become powerful alters become weaker (occurs competitive antagonistic relations). magnitude exponent indicates tendency effect decay across long walks; higher magnitudes imply slower decay. One interesting feature measure relative instability changes exponent magnitude (particularly negative case). theory motivates use measure, careful choose decay parameter non-ad hoc basis.","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"function ported (.e. copied) SNA package.","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"warning-","dir":"Reference","previous_headings":"","what":"Warning","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"Singular adjacency matrices cause end headaches algorithm; thus, routine may fail certain cases. fixed get better algorithm. power_centrality() symmetrize data extracting eigenvectors; send routine asymmetric matrices unless really mean .","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"Bonacich, P. (1972). “Factoring Weighting Approaches Status Scores Clique Identification.” Journal Mathematical Sociology, 2, 113-120. Bonacich, P. (1987). “Power Centrality: Family Measures.” American Journal Sociology, 92, 1170-1182.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"Carter T. Butts (http://www.faculty.uci.edu/profile.cfm?faculty_id=5057), ported igraph Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/power_centrality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find Bonacich Power Centrality Scores of Network Positions — power_centrality","text":"","code":"# Generate some test data from Bonacich, 1987: g.c <- make_graph(c(1, 2, 1, 3, 2, 4, 3, 5), dir = FALSE) g.d <- make_graph(c(1, 2, 1, 3, 1, 4, 2, 5, 3, 6, 4, 7), dir = FALSE) g.e <- make_graph(c(1, 2, 1, 3, 1, 4, 2, 5, 2, 6, 3, 7, 3, 8, 4, 9, 4, 10), dir = FALSE) g.f <- make_graph( c(1, 2, 1, 3, 1, 4, 2, 5, 2, 6, 2, 7, 3, 8, 3, 9, 3, 10, 4, 11, 4, 12, 4, 13), dir = FALSE ) # Compute power centrality scores for (e in seq(-0.5, .5, by = 0.1)) { print(round(power_centrality(g.c, exp = e)[c(1, 2, 4)], 2)) } #> [1] 0.00 1.58 0.00 #> [1] 0.73 1.45 0.36 #> [1] 0.97 1.34 0.49 #> [1] 1.09 1.27 0.54 #> [1] 1.15 1.23 0.58 #> [1] 1.2 1.2 0.6 #> [1] 1.22 1.17 0.61 #> [1] 1.25 1.16 0.62 #> [1] 1.26 1.14 0.63 #> [1] 1.27 1.13 0.64 #> [1] 1.28 1.12 0.64 for (e in seq(-0.4, .4, by = 0.1)) { print(round(power_centrality(g.d, exp = e)[c(1, 2, 5)], 2)) } #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 #> [1] 1.62 1.08 0.54 for (e in seq(-0.4, .4, by = 0.1)) { print(round(power_centrality(g.e, exp = e)[c(1, 2, 5)], 2)) } #> [1] -1.00 1.67 -0.33 #> [1] 0.36 1.81 0.12 #> [1] 1.00 1.67 0.33 #> [1] 1.30 1.55 0.43 #> [1] 1.46 1.46 0.49 #> [1] 1.57 1.40 0.52 #> [1] 1.63 1.36 0.54 #> [1] 1.68 1.33 0.56 #> [1] 1.72 1.30 0.57 for (e in seq(-0.4, .4, by = 0.1)) { print(round(power_centrality(g.f, exp = e)[c(1, 2, 5)], 2)) } #> [1] -1.72 1.53 -0.57 #> [1] -0.55 2.03 -0.18 #> [1] 0.44 2.05 0.15 #> [1] 1.01 1.91 0.34 #> [1] 1.33 1.78 0.44 #> [1] 1.52 1.67 0.51 #> [1] 1.65 1.59 0.55 #> [1] 1.74 1.53 0.58 #> [1] 1.80 1.48 0.60"},{"path":"https://r.igraph.org/reference/predict_edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Predict edges based on a hierarchical random graph model — predict_edges","title":"Predict edges based on a hierarchical random graph model — predict_edges","text":"predict_edges() uses hierarchical random graph model predict missing edges network. done sampling hierarchical models around optimum model, proportionally likelihood. MCMC sampling stated hrg(), given start argument set TRUE. Otherwise HRG fitted graph first.","code":""},{"path":"https://r.igraph.org/reference/predict_edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Predict edges based on a hierarchical random graph model — predict_edges","text":"","code":"predict_edges( graph, hrg = NULL, start = FALSE, num.samples = 10000, num.bins = 25 )"},{"path":"https://r.igraph.org/reference/predict_edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Predict edges based on a hierarchical random graph model — predict_edges","text":"graph graph fit model . Edge directions ignored directed graphs. hrg hierarchical random graph model, form igraphHRG object. predict_edges() allow NULL well, HRG fitted graph first, random starting point. start Logical, whether start fitting/sampling supplied igraphHRG object, random starting point. num.samples Number samples use consensus generation missing edge prediction. num.bins Number bins edge probabilities. Give higher number accurate prediction.","code":""},{"path":"https://r.igraph.org/reference/predict_edges.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Predict edges based on a hierarchical random graph model — predict_edges","text":"list entries: edges predicted edges, two-column matrix vertex ids. prob Probabilities edges, according fitted model. hrg (supplied fitted) hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/predict_edges.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Predict edges based on a hierarchical random graph model — predict_edges","text":". Clauset, C. Moore, M.E.J. Newman. Hierarchical structure prediction missing links networks. Nature 453, 98–101 (2008); . Clauset, C. Moore, M.E.J. Newman. Structural Inference Hierarchies Networks. E. M. Airoldi et al. (Eds.): ICML 2006 Ws, Lecture Notes Computer Science 4503, 1–13. Springer-Verlag, Berlin Heidelberg (2007).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/predict_edges.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Predict edges based on a hierarchical random graph model — predict_edges","text":"","code":"if (FALSE) { # \\dontrun{ ## We are not running these examples any more, because they ## take a long time (~15 seconds) to run and this is against the CRAN ## repository policy. Copy and paste them by hand to your R prompt if ## you want to run them. ## A graph with two dense groups g <- sample_gnp(10, p = 1 / 2) + sample_gnp(10, p = 1 / 2) hrg <- fit_hrg(g) hrg ## The consensus tree for it consensus_tree(g, hrg = hrg, start = TRUE) ## Prediction of missing edges g2 <- make_full_graph(4) + (make_full_graph(4) - path(1, 2)) predict_edges(g2) } # }"},{"path":"https://r.igraph.org/reference/preference.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Trait-based random generation — preference.game","title":"Trait-based random generation — preference.game","text":"preference.game() renamed sample_pref() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/preference.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trait-based random generation — preference.game","text":"","code":"preference.game( nodes, types, type.dist = rep(1, types), fixed.sizes = FALSE, pref.matrix = matrix(1, types, types), directed = FALSE, loops = FALSE )"},{"path":"https://r.igraph.org/reference/preference.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trait-based random generation — preference.game","text":"nodes number vertices graphs. types number different vertex types. type.dist distribution vertex types, numeric vector length ‘types’ containing non-negative numbers. vector normed obtain probabilities. fixed.sizes Fix number vertices given vertex type label. type.dist argument gives group sizes (.e. number vertices different labels) case. pref.matrix square matrix giving preferences vertex types. matrix ‘types’ rows columns. generating undirected graph, must symmetric. directed Logical constant, whether create directed graph. loops Logical constant, whether self-loops allowed graph.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Print an edge sequence to the screen — print.igraph.es","title":"Print an edge sequence to the screen — print.igraph.es","text":"long edge sequences, printing truncated fit screen. Use print() explicitly full argument see full sequence.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print an edge sequence to the screen — print.igraph.es","text":"","code":"# S3 method for class 'igraph.es' print(x, full = igraph_opt(\"print.full\"), id = igraph_opt(\"print.id\"), ...)"},{"path":"https://r.igraph.org/reference/print.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print an edge sequence to the screen — print.igraph.es","text":"x edge sequence. full Whether show full sequence, truncate output screen size. id Whether print graph ID. ... Currently ignored.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print an edge sequence to the screen — print.igraph.es","text":"edge sequence, invisibly.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.es.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Print an edge sequence to the screen — print.igraph.es","text":"Edge sequences created double bracket operator printed differently, together attributes edges sequence, table.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/print.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print an edge sequence to the screen — print.igraph.es","text":"","code":"# Unnamed graphs g <- make_ring(10) E(g) #> + 10/10 edges from f537500: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 # Named graphs g2 <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) E(g2) #> + 10/10 edges from 77608d9 (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J # All edges in a long sequence g3 <- make_ring(200) E(g3) #> + 200/200 edges from 8f94071: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 10--11 #> [11] 11--12 12--13 13--14 14--15 15--16 16--17 17--18 18--19 19--20 20--21 #> [21] 21--22 22--23 23--24 24--25 25--26 26--27 27--28 28--29 29--30 30--31 #> [31] 31--32 32--33 33--34 34--35 35--36 36--37 37--38 38--39 39--40 40--41 #> [41] 41--42 42--43 43--44 44--45 45--46 46--47 47--48 48--49 49--50 50--51 #> [51] 51--52 52--53 53--54 54--55 55--56 56--57 57--58 58--59 59--60 60--61 #> [61] 61--62 62--63 63--64 64--65 65--66 66--67 67--68 68--69 69--70 70--71 #> [71] 71--72 72--73 73--74 74--75 75--76 76--77 77--78 78--79 79--80 80--81 #> [81] 81--82 82--83 83--84 84--85 85--86 86--87 87--88 88--89 89--90 90--91 #> [91] 91--92 92--93 93--94 94--95 95--96 96--97 97--98 98--99 #> + ... omitted several edges E(g3) %>% print(full = TRUE) #> + 200/200 edges from 8f94071: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 #> [9] 9-- 10 10-- 11 11-- 12 12-- 13 13-- 14 14-- 15 15-- 16 16-- 17 #> [17] 17-- 18 18-- 19 19-- 20 20-- 21 21-- 22 22-- 23 23-- 24 24-- 25 #> [25] 25-- 26 26-- 27 27-- 28 28-- 29 29-- 30 30-- 31 31-- 32 32-- 33 #> [33] 33-- 34 34-- 35 35-- 36 36-- 37 37-- 38 38-- 39 39-- 40 40-- 41 #> [41] 41-- 42 42-- 43 43-- 44 44-- 45 45-- 46 46-- 47 47-- 48 48-- 49 #> [49] 49-- 50 50-- 51 51-- 52 52-- 53 53-- 54 54-- 55 55-- 56 56-- 57 #> [57] 57-- 58 58-- 59 59-- 60 60-- 61 61-- 62 62-- 63 63-- 64 64-- 65 #> [65] 65-- 66 66-- 67 67-- 68 68-- 69 69-- 70 70-- 71 71-- 72 72-- 73 #> [73] 73-- 74 74-- 75 75-- 76 76-- 77 77-- 78 78-- 79 79-- 80 80-- 81 #> [81] 81-- 82 82-- 83 83-- 84 84-- 85 85-- 86 86-- 87 87-- 88 88-- 89 #> [89] 89-- 90 90-- 91 91-- 92 92-- 93 93-- 94 94-- 95 95-- 96 96-- 97 #> [97] 97-- 98 98-- 99 99--100 100--101 101--102 102--103 103--104 104--105 #> [105] 105--106 106--107 107--108 108--109 109--110 110--111 111--112 112--113 #> [113] 113--114 114--115 115--116 116--117 117--118 118--119 119--120 120--121 #> [121] 121--122 122--123 123--124 124--125 125--126 126--127 127--128 128--129 #> [129] 129--130 130--131 131--132 132--133 133--134 134--135 135--136 136--137 #> [137] 137--138 138--139 139--140 140--141 141--142 142--143 143--144 144--145 #> [145] 145--146 146--147 147--148 148--149 149--150 150--151 151--152 152--153 #> [153] 153--154 154--155 155--156 156--157 157--158 158--159 159--160 160--161 #> [161] 161--162 162--163 163--164 164--165 165--166 166--167 167--168 168--169 #> [169] 169--170 170--171 171--172 172--173 173--174 174--175 175--176 176--177 #> [177] 177--178 178--179 179--180 180--181 181--182 182--183 183--184 184--185 #> [185] 185--186 186--187 187--188 188--189 189--190 190--191 191--192 192--193 #> [193] 193--194 194--195 195--196 196--197 197--198 198--199 199--200 1--200 # Metadata g4 <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) %>% set_edge_attr(\"weight\", value = 1:10) %>% set_edge_attr(\"color\", value = \"green\") E(g4) #> + 10/10 edges from 5e32543 (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J E(g4)[[]] #> + 10/10 edges from 5e32543 (vertex names): #> tail head tid hid weight color #> 1 A B 1 2 1 green #> 2 B C 2 3 2 green #> 3 C D 3 4 3 green #> 4 D E 4 5 4 green #> 5 E F 5 6 5 green #> 6 F G 6 7 6 green #> 7 G H 7 8 7 green #> 8 H I 8 9 8 green #> 9 I J 9 10 9 green #> 10 A J 1 10 10 green E(g4)[[1:5]] #> + 5/10 edges from 5e32543 (vertex names): #> tail head tid hid weight color #> 1 A B 1 2 1 green #> 2 B C 2 3 2 green #> 3 C D 3 4 3 green #> 4 D E 4 5 4 green #> 5 E F 5 6 5 green"},{"path":"https://r.igraph.org/reference/print.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Print graphs to the terminal — print.igraph","title":"Print graphs to the terminal — print.igraph","text":"functions attempt print graph terminal human readable form.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print graphs to the terminal — print.igraph","text":"","code":"# S3 method for class 'igraph' print( x, full = igraph_opt(\"print.full\"), graph.attributes = igraph_opt(\"print.graph.attributes\"), vertex.attributes = igraph_opt(\"print.vertex.attributes\"), edge.attributes = igraph_opt(\"print.edge.attributes\"), names = TRUE, max.lines = igraph_opt(\"auto.print.lines\"), id = igraph_opt(\"print.id\"), ... ) # S3 method for class 'igraph' summary(object, ...)"},{"path":"https://r.igraph.org/reference/print.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print graphs to the terminal — print.igraph","text":"x graph print. full Logical scalar, whether print graph structure well. graph.attributes Logical constant, whether print graph attributes. vertex.attributes Logical constant, whether print vertex attributes. edge.attributes Logical constant, whether print edge attributes. names Logical constant, whether print symbolic vertex names (.e. name vertex attribute) vertex ids. max.lines maximum number lines use. rest output truncated. id Whether print graph ID. ... Additional agruments. object graph summary printed.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print graphs to the terminal — print.igraph","text":"functions return graph invisibly.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Print graphs to the terminal — print.igraph","text":"summary.igraph prints number vertices, edges whether graph directed. print_all() prints information, also lists edges, optionally graph, vertex /edge attributes. print.igraph() behaves either summary.igraph print_all() depending full argument. See also ‘print.full’ igraph option igraph_opt(). graph summary printed summary.igraph (print.igraph() print_all()) consists one lines. first line contains basic properties graph, rest contains attributes. example, small star graph weighted directed edges named vertices: first line always starts IGRAPH, showing object igraph graph. seven character code printed, first seven characters unique id graph. See graph_id() . four letter long code string printed. first letter distinguishes directed (‘D’) undirected (‘U’) graphs. second letter ‘N’ named graphs, .e. graphs name vertex attribute set. third letter ‘W’ weighted graphs, .e. graphs weight edge attribute set. fourth letter ‘B’ bipartite graphs, .e. graphs type vertex attribute set. followed number vertices edges, two dashes. Finally, two dashes, name graph printed, one, .e. name graph attribute set. second line, attributes graph listed, separated comma. attribute names, kind attribute – graph (‘g’), vertex (‘v’) edge (‘e’) – denoted, type attribute well, character (‘c’), numeric (‘n’), logical (‘l’), (‘x’). igraph 0.4 print_all() print.igraph() use max.print option, see base::options() details. igraph 1.1.1, str.igraph function defunct, use print_all().","code":"IGRAPH badcafe DNW- 10 9 -- In-star + attr: name (g/c), mode (g/c), center (g/n), name (v/c), weight (e/n)"},{"path":"https://r.igraph.org/reference/print.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print graphs to the terminal — print.igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/print.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print graphs to the terminal — print.igraph","text":"","code":"g <- make_ring(10) g #> IGRAPH 83e22a8 U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from 83e22a8: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 summary(g) #> IGRAPH 83e22a8 U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l)"},{"path":"https://r.igraph.org/reference/print.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Show a vertex sequence on the screen — print.igraph.vs","title":"Show a vertex sequence on the screen — print.igraph.vs","text":"long vertex sequences, printing truncated fit screen. Use print() explicitly full argument see full sequence.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show a vertex sequence on the screen — print.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' print(x, full = igraph_opt(\"print.full\"), id = igraph_opt(\"print.id\"), ...)"},{"path":"https://r.igraph.org/reference/print.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show a vertex sequence on the screen — print.igraph.vs","text":"x vertex sequence. full Whether show full sequence, truncate output screen size. id Whether print graph ID. ... arguments currently ignored.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Show a vertex sequence on the screen — print.igraph.vs","text":"vertex sequence, invisibly.","code":""},{"path":"https://r.igraph.org/reference/print.igraph.vs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Show a vertex sequence on the screen — print.igraph.vs","text":"Vertex sequence created double bracket operator printed differently, together attributes vertices sequence, table.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/print.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Show a vertex sequence on the screen — print.igraph.vs","text":"","code":"# Unnamed graphs g <- make_ring(10) V(g) #> + 10/10 vertices, from a7bdf68: #> [1] 1 2 3 4 5 6 7 8 9 10 # Named graphs g2 <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) V(g2) #> + 10/10 vertices, named, from 7b10198: #> [1] A B C D E F G H I J # All vertices in the sequence g3 <- make_ring(1000) V(g3) #> + 1000/1000 vertices, from b649257: #> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #> [15] 15 16 17 18 19 20 21 22 23 24 25 26 27 28 #> [29] 29 30 31 32 33 34 35 36 37 38 39 40 41 42 #> [43] 43 44 45 46 47 48 49 50 51 52 53 54 55 56 #> [57] 57 58 59 60 61 62 63 64 65 66 67 68 69 70 #> [71] 71 72 73 74 75 76 77 78 79 80 81 82 83 84 #> [85] 85 86 87 88 89 90 91 92 93 94 95 96 97 98 #> [99] 99 100 101 102 103 104 105 106 107 108 109 110 111 112 #> [113] 113 114 115 116 117 118 119 120 121 122 123 124 125 126 #> [127] 127 128 129 130 131 132 133 134 135 136 137 138 139 140 #> + ... omitted several vertices print(V(g3), full = TRUE) #> + 1000/1000 vertices, from b649257: #> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #> [15] 15 16 17 18 19 20 21 22 23 24 25 26 27 28 #> [29] 29 30 31 32 33 34 35 36 37 38 39 40 41 42 #> [43] 43 44 45 46 47 48 49 50 51 52 53 54 55 56 #> [57] 57 58 59 60 61 62 63 64 65 66 67 68 69 70 #> [71] 71 72 73 74 75 76 77 78 79 80 81 82 83 84 #> [85] 85 86 87 88 89 90 91 92 93 94 95 96 97 98 #> [99] 99 100 101 102 103 104 105 106 107 108 109 110 111 112 #> [113] 113 114 115 116 117 118 119 120 121 122 123 124 125 126 #> [127] 127 128 129 130 131 132 133 134 135 136 137 138 139 140 #> [141] 141 142 143 144 145 146 147 148 149 150 151 152 153 154 #> [155] 155 156 157 158 159 160 161 162 163 164 165 166 167 168 #> [169] 169 170 171 172 173 174 175 176 177 178 179 180 181 182 #> [183] 183 184 185 186 187 188 189 190 191 192 193 194 195 196 #> [197] 197 198 199 200 201 202 203 204 205 206 207 208 209 210 #> [211] 211 212 213 214 215 216 217 218 219 220 221 222 223 224 #> [225] 225 226 227 228 229 230 231 232 233 234 235 236 237 238 #> [239] 239 240 241 242 243 244 245 246 247 248 249 250 251 252 #> [253] 253 254 255 256 257 258 259 260 261 262 263 264 265 266 #> [267] 267 268 269 270 271 272 273 274 275 276 277 278 279 280 #> [281] 281 282 283 284 285 286 287 288 289 290 291 292 293 294 #> [295] 295 296 297 298 299 300 301 302 303 304 305 306 307 308 #> [309] 309 310 311 312 313 314 315 316 317 318 319 320 321 322 #> [323] 323 324 325 326 327 328 329 330 331 332 333 334 335 336 #> [337] 337 338 339 340 341 342 343 344 345 346 347 348 349 350 #> [351] 351 352 353 354 355 356 357 358 359 360 361 362 363 364 #> [365] 365 366 367 368 369 370 371 372 373 374 375 376 377 378 #> [379] 379 380 381 382 383 384 385 386 387 388 389 390 391 392 #> [393] 393 394 395 396 397 398 399 400 401 402 403 404 405 406 #> [407] 407 408 409 410 411 412 413 414 415 416 417 418 419 420 #> [421] 421 422 423 424 425 426 427 428 429 430 431 432 433 434 #> [435] 435 436 437 438 439 440 441 442 443 444 445 446 447 448 #> [449] 449 450 451 452 453 454 455 456 457 458 459 460 461 462 #> [463] 463 464 465 466 467 468 469 470 471 472 473 474 475 476 #> [477] 477 478 479 480 481 482 483 484 485 486 487 488 489 490 #> [491] 491 492 493 494 495 496 497 498 499 500 501 502 503 504 #> [505] 505 506 507 508 509 510 511 512 513 514 515 516 517 518 #> [519] 519 520 521 522 523 524 525 526 527 528 529 530 531 532 #> [533] 533 534 535 536 537 538 539 540 541 542 543 544 545 546 #> [547] 547 548 549 550 551 552 553 554 555 556 557 558 559 560 #> [561] 561 562 563 564 565 566 567 568 569 570 571 572 573 574 #> [575] 575 576 577 578 579 580 581 582 583 584 585 586 587 588 #> [589] 589 590 591 592 593 594 595 596 597 598 599 600 601 602 #> [603] 603 604 605 606 607 608 609 610 611 612 613 614 615 616 #> [617] 617 618 619 620 621 622 623 624 625 626 627 628 629 630 #> [631] 631 632 633 634 635 636 637 638 639 640 641 642 643 644 #> [645] 645 646 647 648 649 650 651 652 653 654 655 656 657 658 #> [659] 659 660 661 662 663 664 665 666 667 668 669 670 671 672 #> [673] 673 674 675 676 677 678 679 680 681 682 683 684 685 686 #> [687] 687 688 689 690 691 692 693 694 695 696 697 698 699 700 #> [701] 701 702 703 704 705 706 707 708 709 710 711 712 713 714 #> [715] 715 716 717 718 719 720 721 722 723 724 725 726 727 728 #> [729] 729 730 731 732 733 734 735 736 737 738 739 740 741 742 #> [743] 743 744 745 746 747 748 749 750 751 752 753 754 755 756 #> [757] 757 758 759 760 761 762 763 764 765 766 767 768 769 770 #> [771] 771 772 773 774 775 776 777 778 779 780 781 782 783 784 #> [785] 785 786 787 788 789 790 791 792 793 794 795 796 797 798 #> [799] 799 800 801 802 803 804 805 806 807 808 809 810 811 812 #> [813] 813 814 815 816 817 818 819 820 821 822 823 824 825 826 #> [827] 827 828 829 830 831 832 833 834 835 836 837 838 839 840 #> [841] 841 842 843 844 845 846 847 848 849 850 851 852 853 854 #> [855] 855 856 857 858 859 860 861 862 863 864 865 866 867 868 #> [869] 869 870 871 872 873 874 875 876 877 878 879 880 881 882 #> [883] 883 884 885 886 887 888 889 890 891 892 893 894 895 896 #> [897] 897 898 899 900 901 902 903 904 905 906 907 908 909 910 #> [911] 911 912 913 914 915 916 917 918 919 920 921 922 923 924 #> [925] 925 926 927 928 929 930 931 932 933 934 935 936 937 938 #> [939] 939 940 941 942 943 944 945 946 947 948 949 950 951 952 #> [953] 953 954 955 956 957 958 959 960 961 962 963 964 965 966 #> [967] 967 968 969 970 971 972 973 974 975 976 977 978 979 980 #> [981] 981 982 983 984 985 986 987 988 989 990 991 992 993 994 #> [995] 995 996 997 998 999 1000 # Metadata g4 <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) %>% set_vertex_attr(\"color\", value = \"red\") V(g4)[[]] #> + 10/10 vertices, named, from f418542: #> name color #> 1 A red #> 2 B red #> 3 C red #> 4 D red #> 5 E red #> 6 F red #> 7 G red #> 8 H red #> 9 I red #> 10 J red V(g4)[[2:5, 7:8]] #> + 6/10 vertices, named, from f418542: #> name color #> 2 B red #> 3 C red #> 4 D red #> 5 E red #> 7 G red #> 8 H red"},{"path":"https://r.igraph.org/reference/print.igraphHRG.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a hierarchical random graph model to the screen — print.igraphHRG","title":"Print a hierarchical random graph model to the screen — print.igraphHRG","text":"igraphHRG objects can printed screen two forms: tree list, depending type argument print function. default auto type used, selects tree small graphs simple (=list) bigger ones. tree format looks like : graph 20 vertices, top three levels fitted hierarchical random graph printed. root node HRG always vertex group #1 (‘g1’ printout). Vertex pairs left subtree g1 connect vertices right subtree probability zero, according fitted model. g1 two subgroups, g15 g8. g15 subgroup single vertex (vertex 1), another larger subgroup contains vertices 6, 3, etc. lower levels, etc. plain printing simpler faster produce, less visual: lists two subgroups internal node, many columns screen width allows.","code":"Hierarchical random graph, at level 3: g1 p= 0 '- g15 p=0.33 1 '- g13 p=0.88 6 3 9 4 2 10 7 5 8 '- g8 p= 0.5 '- g16 p= 0.2 20 14 17 19 11 15 16 13 '- g5 p= 0 12 18 Hierarchical random graph: g1 p=0.0 -> g12 g10 g2 p=1.0 -> 7 10 g3 p=1.0 -> g18 14 g4 p=1.0 -> g17 15 g5 p=0.4 -> g15 17 g6 p=0.0 -> 1 4 g7 p=1.0 -> 11 16 g8 p=0.1 -> g9 3 g9 p=0.3 -> g11 g16 g10 p=0.2 -> g4 g5 g11 p=1.0 -> g6 5 g12 p=0.8 -> g8 8 g13 p=0.0 -> g14 9 g14 p=1.0 -> 2 6 g15 p=0.2 -> g19 18 g16 p=1.0 -> g13 g2 g17 p=0.5 -> g7 13 g18 p=1.0 -> 12 19 g19 p=0.7 -> g3 20"},{"path":"https://r.igraph.org/reference/print.igraphHRG.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a hierarchical random graph model to the screen — print.igraphHRG","text":"","code":"# S3 method for class 'igraphHRG' print(x, type = c(\"auto\", \"tree\", \"plain\"), level = 3, ...)"},{"path":"https://r.igraph.org/reference/print.igraphHRG.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a hierarchical random graph model to the screen — print.igraphHRG","text":"x igraphHRG object print. type print dendrogram, see details . level number top levels print dendrogram. ... Additional arguments, used currently.","code":""},{"path":"https://r.igraph.org/reference/print.igraphHRG.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print a hierarchical random graph model to the screen — print.igraphHRG","text":"hierarchical random graph model , invisibly.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/print.igraphHRGConsensus.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a hierarchical random graph consensus tree to the screen — print.igraphHRGConsensus","title":"Print a hierarchical random graph consensus tree to the screen — print.igraphHRGConsensus","text":"Consensus dendrograms (igraphHRGConsensus objects) printed simply listing children internal node dendrogram: root dendrogram g3 (incoming edges), two subgroups, g1 g2.","code":"HRG consensus tree: g1 -> 11 12 13 14 15 16 17 18 19 20 g2 -> 1 2 3 4 5 6 7 8 9 10 g3 -> g1 g2"},{"path":"https://r.igraph.org/reference/print.igraphHRGConsensus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a hierarchical random graph consensus tree to the screen — print.igraphHRGConsensus","text":"","code":"# S3 method for class 'igraphHRGConsensus' print(x, ...)"},{"path":"https://r.igraph.org/reference/print.igraphHRGConsensus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a hierarchical random graph consensus tree to the screen — print.igraphHRGConsensus","text":"x igraphHRGConsensus object print. ... Ignored.","code":""},{"path":"https://r.igraph.org/reference/print.igraphHRGConsensus.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print a hierarchical random graph consensus tree to the screen — print.igraphHRGConsensus","text":"input object, invisibly, allow method chaining.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/printer_callback.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a printer callback function — printer_callback","title":"Create a printer callback function — printer_callback","text":"printer callback function function can performs actual printing. number subcommands, called printer package, form See examples .","code":"printer_callback(\"subcommand\", argument1, argument2, ...)"},{"path":"https://r.igraph.org/reference/printer_callback.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a printer callback function — printer_callback","text":"","code":"printer_callback(fun)"},{"path":"https://r.igraph.org/reference/printer_callback.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a printer callback function — printer_callback","text":"fun function use printer callback function.","code":""},{"path":"https://r.igraph.org/reference/printer_callback.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a printer callback function — printer_callback","text":"subcommands: length length data print, number items, natural units. E.g. list objects, number objects. min_width TODO width Width one item, items printed. TODO print Argument: . actual printing, print items. done TODO","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/r_pal.html","id":null,"dir":"Reference","previous_headings":"","what":"The default R palette — r_pal","title":"The default R palette — r_pal","text":"default R palette, able reproduce colors older igraph versions. colors appropriate categories, attractive.","code":""},{"path":"https://r.igraph.org/reference/r_pal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The default R palette — r_pal","text":"","code":"r_pal(n)"},{"path":"https://r.igraph.org/reference/r_pal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The default R palette — r_pal","text":"n number colors use, maximum eight.","code":""},{"path":"https://r.igraph.org/reference/r_pal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The default R palette — r_pal","text":"character vector color names.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/radius.html","id":null,"dir":"Reference","previous_headings":"","what":"Radius of a graph — radius","title":"Radius of a graph — radius","text":"eccentricity vertex shortest path distance farthest node graph. smallest eccentricity graph called radius","code":""},{"path":"https://r.igraph.org/reference/radius.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Radius of a graph — radius","text":"","code":"radius(graph, mode = c(\"all\", \"out\", \"in\", \"total\"))"},{"path":"https://r.igraph.org/reference/radius.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Radius of a graph — radius","text":"graph input graph, can directed undirected. mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, corresponding undirected graph used, edge directions ignored. argument ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/radius.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Radius of a graph — radius","text":"numeric scalar, radius graph.","code":""},{"path":"https://r.igraph.org/reference/radius.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Radius of a graph — radius","text":"eccentricity vertex calculated measuring shortest distance () vertex, () vertices graph, taking maximum. implementation ignores vertex pairs different components. Isolate vertices eccentricity zero.","code":""},{"path":"https://r.igraph.org/reference/radius.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Radius of a graph — radius","text":"Harary, F. Graph Theory. Reading, MA: Addison-Wesley, p. 35, 1994.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/radius.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Radius of a graph — radius","text":"","code":"g <- make_star(10, mode = \"undirected\") eccentricity(g) #> [1] 1 2 2 2 2 2 2 2 2 2 radius(g) #> [1] 1"},{"path":"https://r.igraph.org/reference/random_walk.html","id":null,"dir":"Reference","previous_headings":"","what":"Random walk on a graph — random_walk","title":"Random walk on a graph — random_walk","text":"random_walk() performs random walk graph returns vertices random walk passed . random_edge_walk() returns edges random walk passed .","code":""},{"path":"https://r.igraph.org/reference/random_walk.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random walk on a graph — random_walk","text":"","code":"random_walk( graph, start, steps, weights = NULL, mode = c(\"out\", \"in\", \"all\", \"total\"), stuck = c(\"return\", \"error\") ) random_edge_walk( graph, start, steps, weights = NULL, mode = c(\"out\", \"in\", \"all\", \"total\"), stuck = c(\"return\", \"error\") )"},{"path":"https://r.igraph.org/reference/random_walk.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random walk on a graph — random_walk","text":"graph input graph, might undirected directed. start start vertex. steps number steps make. weights edge weights. Larger edge weights increase probability edge selected random walker. words, larger edge weights correspond stronger connections. ‘weight’ edge attribute used present. Supply ‘NA’ want ignore ‘weight’ edge attribute. mode follow directed edges. \"\" steps along edge direction, \"\" opposite . \"\" ignores edge directions. argument ignored undirected graphs. stuck random walk gets stuck. \"return\" returns partial walk, \"error\" raises error.","code":""},{"path":"https://r.igraph.org/reference/random_walk.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Random walk on a graph — random_walk","text":"random_walk(), vertex sequence length steps + 1 containing vertices along walk, starting start. random_edge_walk(), edge sequence length steps containing edges along walk.","code":""},{"path":"https://r.igraph.org/reference/random_walk.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Random walk on a graph — random_walk","text":"random walk. given start vertex, take given number steps, choosing edge actual vertex uniformly randomly. Edge directions observed directed graphs (see mode argument well). Multiple loop edges also observed. igraph < 1.6.0, random_walk() counted steps differently, returned sequence length steps instead steps + 1. changed improve consistency underlying C library.","code":""},{"path":"https://r.igraph.org/reference/random_walk.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Random walk on a graph — random_walk","text":"","code":"## Stationary distribution of a Markov chain g <- make_ring(10, directed = TRUE) %u% make_star(11, center = 11) + edge(11, 1) ec <- eigen_centrality(g, directed = TRUE)$vector pg <- page_rank(g, damping = 0.999)$vector w <- random_walk(g, start = 1, steps = 10000) ## These are similar, but not exactly the same cor(table(w), ec) #> [1] 0.9620044 ## But these are (almost) the same cor(table(w), pg) #> [1] 0.9999458"},{"path":"https://r.igraph.org/reference/read.graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Reading foreign file formats — read.graph","title":"Reading foreign file formats — read.graph","text":"read.graph() renamed read_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/read.graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reading foreign file formats — read.graph","text":"","code":"read.graph( file, format = c(\"edgelist\", \"pajek\", \"ncol\", \"lgl\", \"graphml\", \"dimacs\", \"graphdb\", \"gml\", \"dl\"), ... )"},{"path":"https://r.igraph.org/reference/read.graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reading foreign file formats — read.graph","text":"file connection read . can local file, http ftp connection. can also character string file name URI. format Character constant giving file format. Right now edgelist, pajek, ncol, lgl, graphml, dimacs, graphdb, gml dl supported, default edgelist. igraph 0.4 argument case insensitive. ... Additional arguments, see .","code":""},{"path":"https://r.igraph.org/reference/read_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Reading foreign file formats — read_graph","title":"Reading foreign file formats — read_graph","text":"read_graph() function able read graphs various representations file, http connection. Various formats supported.","code":""},{"path":"https://r.igraph.org/reference/read_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reading foreign file formats — read_graph","text":"","code":"read_graph( file, format = c(\"edgelist\", \"pajek\", \"ncol\", \"lgl\", \"graphml\", \"dimacs\", \"graphdb\", \"gml\", \"dl\"), ... )"},{"path":"https://r.igraph.org/reference/read_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reading foreign file formats — read_graph","text":"file connection read . can local file, http ftp connection. can also character string file name URI. format Character constant giving file format. Right now edgelist, pajek, ncol, lgl, graphml, dimacs, graphdb, gml dl supported, default edgelist. igraph 0.4 argument case insensitive. ... Additional arguments, see .","code":""},{"path":"https://r.igraph.org/reference/read_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reading foreign file formats — read_graph","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/read_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reading foreign file formats — read_graph","text":"read_graph() function may additional arguments depending file format (format argument). See details separately file format, .","code":""},{"path":"https://r.igraph.org/reference/read_graph.html","id":"edge-list-format","dir":"Reference","previous_headings":"","what":"Edge list format","title":"Reading foreign file formats — read_graph","text":"format simple text file numeric vertex IDs defining edges. need newline characters edges, simple space also . Vertex IDs contained file assumed start zero. Additional arguments: n number vertices graph. smaller equal largest integer file, ignored; safe set zero (default). directed Logical scalar, whether create directed graph. default value TRUE.","code":""},{"path":"https://r.igraph.org/reference/read_graph.html","id":"pajek-format","dir":"Reference","previous_headings":"","what":"Pajek format","title":"Reading foreign file formats — read_graph","text":"Currently igraph supports Pajek network files, .net extension, Pajek project files .paj extension. network data supported; permutations, hierarchies, clusters vectors .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/read_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Reading foreign file formats — read_graph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/realize_bipartite_degseq.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","title":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","text":"Constructs bipartite graph degree sequences partitions, one exists. function uses Havel-Hakimi style construction algorithm.","code":""},{"path":"https://r.igraph.org/reference/realize_bipartite_degseq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","text":"","code":"realize_bipartite_degseq( degrees1, degrees2, ..., allowed.edge.types = c(\"simple\", \"multiple\"), method = c(\"smallest\", \"largest\", \"index\") )"},{"path":"https://r.igraph.org/reference/realize_bipartite_degseq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","text":"degrees1 degrees first partition. degrees2 degrees second partition. ... dots future extensions must empty. allowed.edge.types Character, specifies types allowed edges. “simple” allows simple graphs (multiple edges). “multiple” allows multiple edges. method Character, method generating graph; see .","code":""},{"path":"https://r.igraph.org/reference/realize_bipartite_degseq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/realize_bipartite_degseq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","text":"‘method’ argument controls order vertices selected course algorithm. “smallest” method selects vertex smallest remaining degree, either partition. result usually graph high negative degree assortativity. undirected case, method guaranteed generate connected graph, regardless whether multi-edges allowed, provided connected realization exists. default method. “largest” method selects vertex largest remaining degree. result usually graph high positive degree assortativity, often disconnected. “index” method selects vertices order index.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/realize_bipartite_degseq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creating a bipartite graph from two degree sequences, deterministically — realize_bipartite_degseq","text":"","code":"g <- realize_bipartite_degseq(c(3, 3, 2, 1, 1), c(2, 2, 2, 2, 2)) degree(g) #> [1] 3 3 2 1 1 2 2 2 2 2"},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":null,"dir":"Reference","previous_headings":"","what":"Creating a graph from a given degree sequence, deterministically — realize_degseq","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":"often useful create graph given vertex degrees. function creates graph deterministic manner.","code":""},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":"","code":"realize_degseq( out.deg, in.deg = NULL, allowed.edge.types = c(\"simple\", \"loops\", \"multi\", \"all\"), method = c(\"smallest\", \"largest\", \"index\") )"},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":".deg Numeric vector, sequence degrees (undirected graphs) -degrees (directed graphs). undirected graphs sum even. directed graphs sum sum .deg. .deg directed graph, -degree sequence. default NULL undirected graph created. allowed.edge.types Character, specifies types allowed edges. “simple” allows simple graphs (loops, multiple edges). “multiple” allows multiple edges disallows loop. “loops” allows loop edges disallows multiple edges (currently unimplemented). “” allows types edges. default “simple”. method Character, method generating graph; see .","code":""},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":"Simple undirected graphs constructed using Havel-Hakimi algorithm (undirected case), analogous Kleitman-Wang algorithm (directed case). algorithms work choosing arbitrary vertex connecting stubs vertices. step repeated degrees connected . ‘method’ argument controls order vertices selected course algorithm. “smallest” method selects vertex smallest remaining degree. result usually graph high negative degree assortativity. undirected case, method guaranteed generate connected graph, regardless whether multi-edges allowed, provided connected realization exists. See Horvát Modes (2021) details. directed case tends generate weakly connected graphs, guaranteed. default method. “largest” method selects vertex largest remaining degree. result usually graph high positive degree assortativity, often disconnected. “index” method selects vertices order index.","code":""},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":"V. Havel, Poznámka o existenci konečných grafů (remark existence finite graphs), Časopis pro pěstování matematiky 80, 477-480 (1955). https://eudml.org/doc/19050 S. L. Hakimi, Realizability Set Integers Degrees Vertices Linear Graph, Journal SIAM 10, 3 (1962). doi:10.1137/0111010 D. J. Kleitman D. L. Wang, Algorithms Constructing Graphs Digraphs Given Valences Factors, Discrete Mathematics 6, 1 (1973). doi:10.1016/0012-365X(73)90037-X Sz. Horvát C. D. Modes, Connectedness matters: construction exact random sampling connected networks (2021). doi:10.1088/2632-072X/abced5","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/realize_degseq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creating a graph from a given degree sequence, deterministically — realize_degseq","text":"","code":"g <- realize_degseq(rep(2, 100)) degree(g) #> [1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 #> [38] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 #> [75] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 is_simple(g) #> [1] TRUE ## Exponential degree distribution, with high positive assortativity. ## Loop and multiple edges are explicitly allowed. ## Note that we correct the degree sequence if its sum is odd. degs <- sample(1:100, 100, replace = TRUE, prob = exp(-0.5 * (1:100))) if (sum(degs) %% 2 != 0) { degs[1] <- degs[1] + 1 } g4 <- realize_degseq(degs, method = \"largest\", allowed.edge.types = \"all\") all(degree(g4) == degs) #> [1] TRUE ## Power-law degree distribution, no loops allowed but multiple edges ## are okay. ## Note that we correct the degree sequence if its sum is odd. degs <- sample(1:100, 100, replace = TRUE, prob = (1:100)^-2) if (sum(degs) %% 2 != 0) { degs[1] <- degs[1] + 1 } g5 <- realize_degseq(degs, allowed.edge.types = \"multi\") all(degree(g5) == degs) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/reciprocity.html","id":null,"dir":"Reference","previous_headings":"","what":"Reciprocity of graphs — reciprocity","title":"Reciprocity of graphs — reciprocity","text":"Calculates reciprocity directed graph.","code":""},{"path":"https://r.igraph.org/reference/reciprocity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reciprocity of graphs — reciprocity","text":"","code":"reciprocity(graph, ignore.loops = TRUE, mode = c(\"default\", \"ratio\"))"},{"path":"https://r.igraph.org/reference/reciprocity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reciprocity of graphs — reciprocity","text":"graph graph object. ignore.loops Logical constant, whether ignore loop edges. mode See .","code":""},{"path":"https://r.igraph.org/reference/reciprocity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reciprocity of graphs — reciprocity","text":"numeric scalar zero one.","code":""},{"path":"https://r.igraph.org/reference/reciprocity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reciprocity of graphs — reciprocity","text":"measure reciprocity defines proportion mutual connections, directed graph. commonly defined probability opposite counterpart directed edge also included graph. adjacency matrix notation: \\(1 - \\left(\\sum_{,j} |A_{ij} - A_{ji}|\\right) / \\left(2\\sum_{,j} A_{ij}\\right)\\). measure calculated mode argument default. Prior igraph version 0.6, another measure implemented, defined probability mutual connection vertex pair, know (possibly non-mutual) connection . words, (unordered) vertex pairs classified three groups: (1) -connected, (2) non-reciprocally connected, (3) reciprocally connected. result size group (3), divided sum group sizes (2)+(3). measure calculated mode ratio.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/reciprocity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Reciprocity of graphs — reciprocity","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/reciprocity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reciprocity of graphs — reciprocity","text":"","code":"g <- sample_gnp(20, 5 / 20, directed = TRUE) reciprocity(g) #> [1] 0.2247191"},{"path":"https://r.igraph.org/reference/remove.edge.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete an edge attribute — remove.edge.attribute","title":"Delete an edge attribute — remove.edge.attribute","text":"remove.edge.attribute() renamed delete_edge_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/remove.edge.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete an edge attribute — remove.edge.attribute","text":"","code":"remove.edge.attribute(graph, name)"},{"path":"https://r.igraph.org/reference/remove.edge.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete an edge attribute — remove.edge.attribute","text":"graph graph name name edge attribute delete.","code":""},{"path":"https://r.igraph.org/reference/remove.graph.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete a graph attribute — remove.graph.attribute","title":"Delete a graph attribute — remove.graph.attribute","text":"remove.graph.attribute() renamed delete_graph_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/remove.graph.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete a graph attribute — remove.graph.attribute","text":"","code":"remove.graph.attribute(graph, name)"},{"path":"https://r.igraph.org/reference/remove.graph.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete a graph attribute — remove.graph.attribute","text":"graph graph. name Name attribute delete.","code":""},{"path":"https://r.igraph.org/reference/remove.vertex.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete a vertex attribute — remove.vertex.attribute","title":"Delete a vertex attribute — remove.vertex.attribute","text":"remove.vertex.attribute() renamed delete_vertex_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/remove.vertex.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete a vertex attribute — remove.vertex.attribute","text":"","code":"remove.vertex.attribute(graph, name)"},{"path":"https://r.igraph.org/reference/remove.vertex.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete a vertex attribute — remove.vertex.attribute","text":"graph graph name name vertex attribute delete.","code":""},{"path":"https://r.igraph.org/reference/rep.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Replicate a graph multiple times — rep.igraph","title":"Replicate a graph multiple times — rep.igraph","text":"new graph contain input graph given number times, unconnected components.","code":""},{"path":"https://r.igraph.org/reference/rep.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replicate a graph multiple times — rep.igraph","text":"","code":"# S3 method for class 'igraph' rep(x, n, mark = TRUE, ...) # S3 method for class 'igraph' x * n"},{"path":"https://r.igraph.org/reference/rep.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replicate a graph multiple times — rep.igraph","text":"x input graph. n Number times replicate . mark Whether mark vertices attribute, integer number denoting replication vertex coming . ... Additional arguments satisfy S3 requirements, currently ignored.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/rep.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Replicate a graph multiple times — rep.igraph","text":"","code":"rings <- make_ring(5) * 5"},{"path":"https://r.igraph.org/reference/rev.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Reverse the order in an edge sequence — rev.igraph.es","title":"Reverse the order in an edge sequence — rev.igraph.es","text":"Reverse order edge sequence","code":""},{"path":"https://r.igraph.org/reference/rev.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reverse the order in an edge sequence — rev.igraph.es","text":"","code":"# S3 method for class 'igraph.es' rev(x)"},{"path":"https://r.igraph.org/reference/rev.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reverse the order in an edge sequence — rev.igraph.es","text":"x edge sequence reverse.","code":""},{"path":"https://r.igraph.org/reference/rev.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reverse the order in an edge sequence — rev.igraph.es","text":"reversed edge sequence.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/rev.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reverse the order in an edge sequence — rev.igraph.es","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) E(g) #> + 10/10 edges from 4ddd02c (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J E(g) %>% rev() #> + 10/10 edges from 4ddd02c (vertex names): #> [1] A--J I--J H--I G--H F--G E--F D--E C--D B--C A--B"},{"path":"https://r.igraph.org/reference/rev.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Reverse the order in a vertex sequence — rev.igraph.vs","title":"Reverse the order in a vertex sequence — rev.igraph.vs","text":"Reverse order vertex sequence","code":""},{"path":"https://r.igraph.org/reference/rev.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reverse the order in a vertex sequence — rev.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' rev(x)"},{"path":"https://r.igraph.org/reference/rev.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reverse the order in a vertex sequence — rev.igraph.vs","text":"x vertex sequence reverse.","code":""},{"path":"https://r.igraph.org/reference/rev.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reverse the order in a vertex sequence — rev.igraph.vs","text":"reversed vertex sequence.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/rev.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reverse the order in a vertex sequence — rev.igraph.vs","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) V(g) %>% rev() #> + 10/10 vertices, named, from 9e7c3dc: #> [1] J I H G F E D C B A"},{"path":"https://r.igraph.org/reference/reverse_edges.html","id":null,"dir":"Reference","previous_headings":"","what":"Reverse edges in a graph — reverse_edges","title":"Reverse edges in a graph — reverse_edges","text":"new graph contain vertices, edges attributes original graph, except direction edges selected edge IDs eids argument reversed. reversing edges, operation also known graph transpose.","code":""},{"path":"https://r.igraph.org/reference/reverse_edges.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reverse edges in a graph — reverse_edges","text":"","code":"reverse_edges(graph, eids = E(graph)) # S3 method for class 'igraph' t(x)"},{"path":"https://r.igraph.org/reference/reverse_edges.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reverse edges in a graph — reverse_edges","text":"graph input graph. eids edge IDs edges reverse. x input graph.","code":""},{"path":"https://r.igraph.org/reference/reverse_edges.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reverse edges in a graph — reverse_edges","text":"result graph direction edges given IDs reversed","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/reverse_edges.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reverse edges in a graph — reverse_edges","text":"","code":"g <- make_graph(~ 1 -+ 2, 2 -+ 3, 3 -+ 4) reverse_edges(g, 2) #> IGRAPH eb9267a DN-- 4 3 -- #> + attr: name (v/c) #> + edges from eb9267a (vertex names): #> [1] 1->2 3->2 3->4"},{"path":"https://r.igraph.org/reference/rewire.html","id":null,"dir":"Reference","previous_headings":"","what":"Rewiring edges of a graph — rewire","title":"Rewiring edges of a graph — rewire","text":"See links implemented rewiring methods.","code":""},{"path":"https://r.igraph.org/reference/rewire.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rewiring edges of a graph — rewire","text":"","code":"rewire(graph, with)"},{"path":"https://r.igraph.org/reference/rewire.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rewiring edges of a graph — rewire","text":"graph graph rewire function call one rewiring methods, see details .","code":""},{"path":"https://r.igraph.org/reference/rewire.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rewiring edges of a graph — rewire","text":"rewired graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/rewire.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rewiring edges of a graph — rewire","text":"","code":"g <- make_ring(10) g %>% rewire(each_edge(p = .1, loops = FALSE)) %>% plot(layout = layout_in_circle) print_all(rewire(g, with = keeping_degseq(niter = vcount(g) * 10))) #> IGRAPH 5919f73 U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + graph attributes: #> | + name: #> | [1] \"Ring graph\" #> | + mutual: #> | [1] FALSE #> | + circular: #> | [1] TRUE #> + edges from 5919f73: #> [1] 1--10 2-- 9 2-- 6 1-- 6 5-- 8 4-- 7 5-- 9 3-- 4 3-- 8 7--10"},{"path":"https://r.igraph.org/reference/rglplot.html","id":null,"dir":"Reference","previous_headings":"","what":"3D plotting of graphs with OpenGL — rglplot","title":"3D plotting of graphs with OpenGL — rglplot","text":"Using rgl package, rglplot() plots graph 3D. plot can zoomed, rotated, shifted, etc. coordinates vertices fixed.","code":""},{"path":"https://r.igraph.org/reference/rglplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"3D plotting of graphs with OpenGL — rglplot","text":"","code":"rglplot(x, ...)"},{"path":"https://r.igraph.org/reference/rglplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"3D plotting of graphs with OpenGL — rglplot","text":"x graph plot. ... Additional arguments, see igraph.plotting details","code":""},{"path":"https://r.igraph.org/reference/rglplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"3D plotting of graphs with OpenGL — rglplot","text":"NULL, invisibly.","code":""},{"path":"https://r.igraph.org/reference/rglplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"3D plotting of graphs with OpenGL — rglplot","text":"Note rglplot() considered highly experimental. useful either. See igraph.plotting possible arguments.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/rglplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"3D plotting of graphs with OpenGL — rglplot","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/rglplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"3D plotting of graphs with OpenGL — rglplot","text":"","code":"g <- make_lattice(c(5, 5, 5)) coords <- layout_with_fr(g, dim = 3) if (interactive() && requireNamespace(\"rgl\", quietly = TRUE)) { rglplot(g, layout = coords) }"},{"path":"https://r.igraph.org/reference/running.mean.html","id":null,"dir":"Reference","previous_headings":"","what":"Running mean of a time series — running.mean","title":"Running mean of a time series — running.mean","text":"running.mean() renamed running_mean() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/running.mean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Running mean of a time series — running.mean","text":"","code":"running.mean(v, binwidth)"},{"path":"https://r.igraph.org/reference/running.mean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Running mean of a time series — running.mean","text":"v numeric vector. binwidth Numeric constant, size bin, meaningful, .e. smaller length v.","code":""},{"path":"https://r.igraph.org/reference/running_mean.html","id":null,"dir":"Reference","previous_headings":"","what":"Running mean of a time series — running_mean","title":"Running mean of a time series — running_mean","text":"running_mean() calculates running mean vector given bin width.","code":""},{"path":"https://r.igraph.org/reference/running_mean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Running mean of a time series — running_mean","text":"","code":"running_mean(v, binwidth)"},{"path":"https://r.igraph.org/reference/running_mean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Running mean of a time series — running_mean","text":"v numeric vector. binwidth Numeric constant, size bin, meaningful, .e. smaller length v.","code":""},{"path":"https://r.igraph.org/reference/running_mean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Running mean of a time series — running_mean","text":"numeric vector length length(v)-binwidth+1","code":""},{"path":"https://r.igraph.org/reference/running_mean.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Running mean of a time series — running_mean","text":"running mean v w vector length length(v)-binwidth+1. first element w id average first binwidth elements v, second element w average elements 2:(binwidth+1), etc.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/running_mean.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Running mean of a time series — running_mean","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/running_mean.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Running mean of a time series — running_mean","text":"","code":"running_mean(1:100, 10) #> [1] 5.5 6.5 7.5 8.5 9.5 10.5 11.5 12.5 13.5 14.5 15.5 16.5 17.5 18.5 19.5 #> [16] 20.5 21.5 22.5 23.5 24.5 25.5 26.5 27.5 28.5 29.5 30.5 31.5 32.5 33.5 34.5 #> [31] 35.5 36.5 37.5 38.5 39.5 40.5 41.5 42.5 43.5 44.5 45.5 46.5 47.5 48.5 49.5 #> [46] 50.5 51.5 52.5 53.5 54.5 55.5 56.5 57.5 58.5 59.5 60.5 61.5 62.5 63.5 64.5 #> [61] 65.5 66.5 67.5 68.5 69.5 70.5 71.5 72.5 73.5 74.5 75.5 76.5 77.5 78.5 79.5 #> [76] 80.5 81.5 82.5 83.5 84.5 85.5 86.5 87.5 88.5 89.5 90.5 91.5 92.5 93.5 94.5 #> [91] 95.5"},{"path":"https://r.igraph.org/reference/sample_.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample from a random graph model — sample_","title":"Sample from a random graph model — sample_","text":"Generic function sampling network models.","code":""},{"path":"https://r.igraph.org/reference/sample_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample from a random graph model — sample_","text":"","code":"sample_(...)"},{"path":"https://r.igraph.org/reference/sample_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample from a random graph model — sample_","text":"... Parameters, see details .","code":""},{"path":"https://r.igraph.org/reference/sample_.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample from a random graph model — sample_","text":"TODO","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample from a random graph model — sample_","text":"","code":"pref_matrix <- cbind(c(0.8, 0.1), c(0.1, 0.7)) blocky <- sample_(sbm( n = 20, pref.matrix = pref_matrix, block.sizes = c(10, 10) )) blocky2 <- pref_matrix %>% sample_sbm(n = 20, block.sizes = c(10, 10)) ## Arguments are passed on from sample_ to sample_sbm blocky3 <- pref_matrix %>% sample_(sbm(), n = 20, block.sizes = c(10, 10))"},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":null,"dir":"Reference","previous_headings":"","what":"Bipartite random graphs — sample_bipartite","title":"Bipartite random graphs — sample_bipartite","text":"Generate bipartite graphs using Erdős-Rényi model","code":""},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bipartite random graphs — sample_bipartite","text":"","code":"sample_bipartite( n1, n2, type = c(\"gnp\", \"gnm\"), p, m, directed = FALSE, mode = c(\"out\", \"in\", \"all\") ) bipartite(...)"},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bipartite random graphs — sample_bipartite","text":"n1 Integer scalar, number bottom vertices. n2 Integer scalar, number top vertices. type Character scalar, type graph, ‘gnp’ creates \\(G(n,p)\\) graph, ‘gnm’ creates \\(G(n,m)\\) graph. See details . p Real scalar, connection probability \\(G(n,p)\\) graphs. given \\(G(n,m)\\) graphs. m Integer scalar, number edges \\(G(n,m)\\) graphs. given \\(G(n,p)\\) graphs. directed Logical scalar, whether create directed graph. See also mode argument. mode Character scalar, specifies direct edges directed graphs. ‘’, directed edges point bottom vertices top vertices. ‘’, edges point top vertices bottom vertices. ‘’ ‘’ generate mutual edges. argument ‘’, edge direction considered independently mutual edges might generated. argument ignored undirected graphs. ... Passed sample_bipartite().","code":""},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bipartite random graphs — sample_bipartite","text":"bipartite igraph graph.","code":""},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Bipartite random graphs — sample_bipartite","text":"Similarly unipartite (one-mode) networks, can define \\(G(n,p)\\), \\(G(n,m)\\) graph classes bipartite graphs, via generating process. \\(G(n,p)\\) every possible edge top bottom vertices realized probability \\(p\\), independently rest edges. \\(G(n,m)\\), uniformly choose \\(m\\) edges realize.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Bipartite random graphs — sample_bipartite","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_bipartite.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bipartite random graphs — sample_bipartite","text":"","code":"## empty graph sample_bipartite(10, 5, p = 0) #> IGRAPH d2f1ab9 U--B 15 0 -- Bipartite Gnp random graph #> + attr: name (g/c), p (g/n), type (v/l) #> + edges from d2f1ab9: ## full graph sample_bipartite(10, 5, p = 1) #> IGRAPH 8278079 U--B 15 50 -- Bipartite Gnp random graph #> + attr: name (g/c), p (g/n), type (v/l) #> + edges from 8278079: #> [1] 1--11 1--12 1--13 1--14 1--15 2--11 2--12 2--13 2--14 2--15 #> [11] 3--11 3--12 3--13 3--14 3--15 4--11 4--12 4--13 4--14 4--15 #> [21] 5--11 5--12 5--13 5--14 5--15 6--11 6--12 6--13 6--14 6--15 #> [31] 7--11 7--12 7--13 7--14 7--15 8--11 8--12 8--13 8--14 8--15 #> [41] 9--11 9--12 9--13 9--14 9--15 10--11 10--12 10--13 10--14 10--15 ## random bipartite graph sample_bipartite(10, 5, p = .1) #> IGRAPH a0ba091 U--B 15 6 -- Bipartite Gnp random graph #> + attr: name (g/c), p (g/n), type (v/l) #> + edges from a0ba091: #> [1] 7--12 5--13 2--15 4--15 6--15 8--15 ## directed bipartite graph, G(n,m) sample_bipartite(10, 5, type = \"Gnm\", m = 20, directed = TRUE, mode = \"all\") #> IGRAPH cbceda9 D--B 15 20 -- Bipartite Gnm random graph #> + attr: name (g/c), m (g/n), type (v/l) #> + edges from cbceda9: #> [1] 2->11 8->11 10->11 1->12 7->12 4->13 7->13 6->14 4->15 10->15 #> [11] 15-> 1 12-> 2 13-> 2 15-> 2 11-> 3 12-> 3 13-> 4 15-> 6 12-> 7 15->10"},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"Sample new graph perturbing adjacency matrix given graph shuffling vertices.","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"","code":"sample_correlated_gnp( old.graph, corr, p = edge_density(old.graph), permutation = NULL )"},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"old.graph original graph. corr scalar unit interval, target Pearson correlation adjacency matrices original generated graph (adjacency matrix used vector). p numeric scalar, probability edge two vertices, must open (0,1) interval. default empirical edge density graph. resampling Erdős-Rényi graph know original edge probability Erdős-Rényi model, supply explicitly. permutation numeric vector, permutation vector applied vertices first graph, get second graph. NULL, vertices permuted.","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"unweighted graph size old.graph correlation coefficient entries two adjacency matrices corr. Note pair corresponding matrix entries pair correlated Bernoulli random variables.","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"Please see reference given .","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"Lyzinski, V., Fishkind, D. E., Priebe, C. E. (2013). Seeded graph matching correlated Erdős-Rényi graphs. https://arxiv.org/abs/1304.7844","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_correlated_gnp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate a new random graph from a given graph by randomly adding/removing edges — sample_correlated_gnp","text":"","code":"g <- sample_gnp(1000, .1) g2 <- sample_correlated_gnp(g, corr = 0.5) cor(as.vector(g[]), as.vector(g2[])) #> [1] 0.4998541 g #> IGRAPH e1e1168 U--- 1000 49966 -- Erdos-Renyi (gnp) graph #> + attr: name (g/c), type (g/c), loops (g/l), p (g/n) #> + edges from e1e1168: #> [1] 1-- 2 2-- 3 4-- 7 2-- 8 4-- 8 4-- 9 2--10 5--10 4--11 7--11 #> [11] 2--12 11--13 2--14 2--15 4--15 6--15 11--15 12--16 16--17 3--18 #> [21] 9--18 11--19 19--20 2--21 1--22 6--22 12--24 15--24 1--25 14--26 #> [31] 6--27 5--28 19--28 5--29 15--29 19--29 23--29 2--30 3--30 1--31 #> [41] 2--31 27--31 1--32 14--32 28--32 15--33 9--34 16--34 32--34 7--35 #> [51] 12--35 21--35 32--35 12--36 13--36 19--36 23--36 26--36 29--36 7--37 #> [61] 28--37 33--37 13--38 19--38 24--39 28--39 29--39 31--39 14--40 15--40 #> [71] 16--40 37--40 12--41 39--41 2--42 6--42 25--42 27--42 35--42 4--43 #> + ... omitted several edges g2 #> IGRAPH b7f8438 U--- 1000 49613 -- Correlated random graph #> + attr: name (g/c), corr (g/n), p (g/n) #> + edges from b7f8438: #> [1] 2-- 3 2-- 4 4-- 5 4-- 6 4-- 7 1-- 8 4-- 8 2--10 5--10 7--11 #> [11] 10--13 2--14 4--14 9--14 11--15 7--16 9--16 12--16 9--18 6--19 #> [21] 11--19 17--19 19--20 2--21 3--21 10--21 1--22 6--22 8--23 16--23 #> [31] 12--24 15--24 16--24 1--25 11--25 14--26 6--27 8--28 18--28 19--28 #> [41] 5--29 10--29 19--29 24--29 27--29 2--30 5--30 11--30 2--31 10--31 #> [51] 1--32 14--32 21--32 29--32 15--33 17--33 2--34 3--34 9--34 16--34 #> [61] 29--34 32--34 12--35 24--35 32--35 2--36 12--36 19--36 22--36 5--37 #> [71] 28--38 24--39 24--40 37--40 12--41 39--41 6--42 19--42 25--42 27--42 #> + ... omitted several edges"},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"Sample new graph perturbing adjacency matrix given graph shuffling vertices.","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"","code":"sample_correlated_gnp_pair(n, corr, p, directed = FALSE, permutation = NULL)"},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"n Numeric scalar, number vertices sampled graphs. corr scalar unit interval, target Pearson correlation adjacency matrices original generated graph (adjacency matrix used vector). p numeric scalar, probability edge two vertices, must open (0,1) interval. directed Logical scalar, whether generate directed graphs. permutation numeric vector, permutation vector applied vertices first graph, get second graph. NULL, vertices permuted.","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"list two igraph objects, named graph1 graph2, two graphs whose adjacency matrix entries correlated corr.","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"Please see reference given .","code":""},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"Lyzinski, V., Fishkind, D. E., Priebe, C. E. (2013). Seeded graph matching correlated Erdős-Rényi graphs. https://arxiv.org/abs/1304.7844","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_correlated_gnp_pair.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample a pair of correlated \\(G(n,p)\\) random graphs — sample_correlated_gnp_pair","text":"","code":"gg <- sample_correlated_gnp_pair( n = 10, corr = .8, p = .5, directed = FALSE ) gg #> $graph1 #> IGRAPH 60aea36 U--- 10 19 -- #> + edges from 60aea36: #> [1] 2-- 3 3-- 4 1-- 5 2-- 5 4-- 5 2-- 6 1-- 7 3-- 7 6-- 7 1-- 8 3-- 8 4-- 8 #> [13] 1-- 9 2-- 9 4-- 9 4--10 5--10 6--10 9--10 #> #> $graph2 #> IGRAPH ed8305f U--- 10 19 -- #> + edges from ed8305f: #> [1] 2-- 3 3-- 4 1-- 5 2-- 5 4-- 5 2-- 6 1-- 7 3-- 7 6-- 7 1-- 8 4-- 8 1-- 9 #> [13] 2-- 9 4-- 9 2--10 4--10 5--10 6--10 9--10 #> cor(as.vector(gg[[1]][]), as.vector(gg[[2]][])) #> [1] 0.9151104"},{"path":"https://r.igraph.org/reference/sample_degseq.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs with a given degree sequence — sample_degseq","title":"Generate random graphs with a given degree sequence — sample_degseq","text":"often useful create graph given vertex degrees. function creates graph randomized manner.","code":""},{"path":"https://r.igraph.org/reference/sample_degseq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs with a given degree sequence — sample_degseq","text":"","code":"sample_degseq( out.deg, in.deg = NULL, method = c(\"simple\", \"vl\", \"simple.no.multiple\", \"simple.no.multiple.uniform\") ) degseq(..., deterministic = FALSE)"},{"path":"https://r.igraph.org/reference/sample_degseq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs with a given degree sequence — sample_degseq","text":".deg Numeric vector, sequence degrees (undirected graphs) -degrees (directed graphs). undirected graphs sum even. directed graphs sum sum .deg. .deg directed graph, -degree sequence. default NULL undirected graph created. method Character, method generating graph. Right now “simple”, “simple..multiple” “vl” methods implemented. ... Passed realize_degseq() ‘deterministic’ true, sample_degseq() otherwise. deterministic Whether construction deterministic","code":""},{"path":"https://r.igraph.org/reference/sample_degseq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate random graphs with a given degree sequence — sample_degseq","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_degseq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate random graphs with a given degree sequence — sample_degseq","text":"“simple” method connects -stubs edges (undirected graphs) -stubs -stubs (directed graphs) together. way loop edges also multiple edges may generated. method adequate one needs generate simple graphs given degree sequence. multiple loop edges can deleted, degree sequence distorted nothing ensure graphs sampled uniformly. “simple..multiple” method similar “simple”, tries avoid multiple loop edges restarts generation scratch gets stuck. guaranteed sample uniformly space possible graphs given sequence, relatively fast eventually succeed provided degree sequence graphical, upper bound number iterations. “simple..multiple.uniform” method variant “simple..multiple” added benefit sampling uniformly set possible simple graphs given degree sequence. Ensuring uniformity performance implications, though. “vl” method sophisticated generator. algorithm implementation done Fabien Viger Matthieu Latapy. generator always generates undirected, connected simple graphs, error pass .deg argument . algorithm relies first creating initial (possibly unconnected) simple undirected graph given degree sequence (possible ). rewiring done make graph connected. Finally Monte-Carlo algorithm used randomize graph. “vl” samples undirected, connected simple graphs uniformly.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_degseq.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate random graphs with a given degree sequence — sample_degseq","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_degseq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate random graphs with a given degree sequence — sample_degseq","text":"","code":"## The simple generator g <- sample_degseq(rep(2, 100)) degree(g) #> [1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 #> [38] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 #> [75] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 is_simple(g) # sometimes TRUE, but can be FALSE #> [1] TRUE g2 <- sample_degseq(1:10, 10:1) degree(g2, mode = \"out\") #> [1] 1 2 3 4 5 6 7 8 9 10 degree(g2, mode = \"in\") #> [1] 10 9 8 7 6 5 4 3 2 1 ## The vl generator g3 <- sample_degseq(rep(2, 100), method = \"vl\") degree(g3) #> [1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 #> [38] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 #> [75] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 is_simple(g3) # always TRUE #> [1] TRUE ## Exponential degree distribution ## Note, that we correct the degree sequence if its sum is odd degs <- sample(1:100, 100, replace = TRUE, prob = exp(-0.5 * (1:100))) if (sum(degs) %% 2 != 0) { degs[1] <- degs[1] + 1 } g4 <- sample_degseq(degs, method = \"vl\") all(degree(g4) == degs) #> [1] TRUE ## Power-law degree distribution ## Note, that we correct the degree sequence if its sum is odd degs <- sample(1:100, 100, replace = TRUE, prob = (1:100)^-2) if (sum(degs) %% 2 != 0) { degs[1] <- degs[1] + 1 } g5 <- sample_degseq(degs, method = \"vl\") #> Error in sample_degseq(degs, method = \"vl\"): At vendor/cigraph/src/games/degree_sequence_vl/gengraph_mr-connected.cpp:150 : Cannot realize the given degree sequence as an undirected, simple graph. Invalid value all(degree(g5) == degs) #> Error: object 'g5' not found"},{"path":"https://r.igraph.org/reference/sample_dirichlet.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample from a Dirichlet distribution — sample_dirichlet","title":"Sample from a Dirichlet distribution — sample_dirichlet","text":"Sample finite-dimensional vectors use latent position vectors random dot product graphs","code":""},{"path":"https://r.igraph.org/reference/sample_dirichlet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample from a Dirichlet distribution — sample_dirichlet","text":"","code":"sample_dirichlet(n, alpha)"},{"path":"https://r.igraph.org/reference/sample_dirichlet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample from a Dirichlet distribution — sample_dirichlet","text":"n Integer scalar, sample size. alpha Numeric vector, vector \\(\\alpha\\) parameter Dirichlet distribution.","code":""},{"path":"https://r.igraph.org/reference/sample_dirichlet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample from a Dirichlet distribution — sample_dirichlet","text":"dim (length alpha vector sample_dirichlet()) times n matrix, whose columns sample vectors.","code":""},{"path":"https://r.igraph.org/reference/sample_dirichlet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample from a Dirichlet distribution — sample_dirichlet","text":"sample_dirichlet() generates samples Dirichlet distribution given \\(\\alpha\\) parameter. sample drawn length(alpha)-1-simplex.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_dirichlet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample from a Dirichlet distribution — sample_dirichlet","text":"","code":"lpvs.dir <- sample_dirichlet(n = 20, alpha = rep(1, 10)) RDP.graph.2 <- sample_dot_product(lpvs.dir) colSums(lpvs.dir) #> [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs according to the random dot product graph model — sample_dot_product","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"model, vertex represented latent position vector. Probability edge two vertices given dot product latent position vectors.","code":""},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"","code":"sample_dot_product(vecs, directed = FALSE) dot_product(...)"},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"vecs numeric matrix latent position vector column. directed logical scalar, TRUE generated graph directed. ... Passed sample_dot_product().","code":""},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"igraph graph object generated random dot product graph.","code":""},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"dot product latent position vectors [0,1] interval, otherwise warning given. negative dot products, edges added; dot products larger one always add edge.","code":""},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"Christine Leigh Myers Nickel: Random dot product graphs, model social networks. Dissertation, Johns Hopkins University, Maryland, USA, 2006.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_dot_product.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate random graphs according to the random dot product graph model — sample_dot_product","text":"","code":"## A randomly generated graph lpvs <- matrix(rnorm(200), 20, 10) lpvs <- apply(lpvs, 2, function(x) { return(abs(x) / sqrt(sum(x^2))) }) g <- sample_dot_product(lpvs) g #> IGRAPH e613e98 U--- 10 31 -- #> + edges from e613e98: #> [1] 1-- 3 1-- 4 1-- 5 1-- 6 1-- 9 1--10 2-- 3 2-- 4 2-- 6 2-- 8 2--10 3-- 5 #> [13] 3-- 7 3-- 8 3-- 9 3--10 4-- 5 4-- 9 4--10 5-- 6 5-- 7 5-- 9 5--10 6-- 7 #> [25] 6-- 8 7-- 8 7-- 9 7--10 8-- 9 8--10 9--10 ## Sample latent vectors from the surface of the unit sphere lpvs2 <- sample_sphere_surface(dim = 5, n = 20) g2 <- sample_dot_product(lpvs2) g2 #> IGRAPH d730c2c U--- 20 130 -- #> + edges from d730c2c: #> [1] 1-- 2 1-- 3 1-- 4 1-- 5 1-- 6 1-- 7 1-- 8 1-- 9 1--11 1--12 1--15 1--16 #> [13] 1--17 1--18 1--20 2-- 3 2-- 5 2-- 6 2-- 8 2--10 2--12 2--13 2--14 2--15 #> [25] 2--16 2--17 2--18 2--19 2--20 3-- 4 3-- 5 3-- 6 3-- 7 3-- 8 3-- 9 3--10 #> [37] 3--11 3--13 3--14 3--19 4-- 5 4-- 7 4-- 8 4--10 4--11 4--13 4--14 4--15 #> [49] 4--16 4--17 4--18 4--19 5-- 7 5-- 8 5--10 5--13 5--15 5--16 5--18 5--19 #> [61] 5--20 6-- 7 6-- 8 6-- 9 6--10 6--11 6--12 6--13 6--15 6--16 6--17 6--18 #> [73] 7-- 8 7--10 7--11 7--12 7--14 7--16 7--17 7--18 7--19 8-- 9 8--11 8--12 #> [85] 8--14 8--15 8--16 8--18 8--19 8--20 9--12 9--13 9--15 9--16 9--18 9--19 #> [97] 9--20 #> + ... omitted several edges"},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":null,"dir":"Reference","previous_headings":"","what":"Random graphs from vertex fitness scores — sample_fitness","title":"Random graphs from vertex fitness scores — sample_fitness","text":"function generates non-growing random graph edge probabilities proportional node fitness scores.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random graphs from vertex fitness scores — sample_fitness","text":"","code":"sample_fitness( no.of.edges, fitness.out, fitness.in = NULL, loops = FALSE, multiple = FALSE )"},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random graphs from vertex fitness scores — sample_fitness","text":"..edges number edges generated graph. fitness.numeric vector containing fitness vertex. directed graphs, specifies -fitness vertex. fitness.NULL (default), generated graph undirected. NULL, numeric vector specifies -fitness vertex. argument NULL, directed graph generated, otherwise undirected one. loops Logical scalar, whether allow loop edges graph. multiple Logical scalar, whether allow multiple edges graph.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Random graphs from vertex fitness scores — sample_fitness","text":"igraph graph, directed undirected.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Random graphs from vertex fitness scores — sample_fitness","text":"game generates directed undirected random graph probability edge vertices \\(\\) \\(j\\) depends fitness scores two vertices involved. undirected graphs, vertex single fitness score. directed graphs, vertex - -fitness, probability edge \\(\\) \\(j\\) depends -fitness vertex \\(\\) -fitness vertex \\(j\\). generation process goes follows. start \\(N\\) disconnected nodes (\\(N\\) given length fitness vector). randomly select two vertices \\(\\) \\(j\\), probabilities proportional fitnesses. (generated graph directed, \\(\\) selected according -fitnesses \\(j\\) selected according -fitnesses). vertices connected yet (multiple edges allowed), connect ; otherwise select new pair. repeated desired number links created. can shown expected degree vertex proportional fitness, although actual, observed degree . need generate graph exact degree sequence, consider sample_degseq() instead. model commonly used generate static scale-free networks. achieve , draw fitness scores desired power-law distribution. Alternatively, may use sample_fitness_pl() generates fitnesses given exponent.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Random graphs from vertex fitness scores — sample_fitness","text":"Goh K-, Kahng B, Kim D: Universal behaviour load distribution scale-free networks. Phys Rev Lett 87(27):278701, 2001.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Random graphs from vertex fitness scores — sample_fitness","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_fitness.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Random graphs from vertex fitness scores — sample_fitness","text":"","code":"N <- 10000 g <- sample_fitness(5 * N, sample((1:50)^-2, N, replace = TRUE)) degree_distribution(g) #> [1] 0.4872 0.1982 0.0788 0.0430 0.0228 0.0170 0.0136 0.0100 0.0076 0.0077 #> [11] 0.0061 0.0055 0.0049 0.0036 0.0032 0.0039 0.0029 0.0024 0.0033 0.0024 #> [21] 0.0029 0.0017 0.0015 0.0018 0.0015 0.0013 0.0015 0.0015 0.0005 0.0010 #> [31] 0.0010 0.0015 0.0014 0.0012 0.0009 0.0014 0.0017 0.0012 0.0011 0.0022 #> [41] 0.0009 0.0008 0.0008 0.0006 0.0005 0.0004 0.0006 0.0001 0.0002 0.0002 #> [51] 0.0000 0.0001 0.0000 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [61] 0.0000 0.0000 0.0000 0.0001 0.0003 0.0001 0.0001 0.0003 0.0003 0.0004 #> [71] 0.0005 0.0000 0.0009 0.0009 0.0006 0.0005 0.0008 0.0012 0.0016 0.0014 #> [81] 0.0007 0.0007 0.0009 0.0008 0.0014 0.0005 0.0004 0.0002 0.0005 0.0001 #> [91] 0.0005 0.0004 0.0003 0.0000 0.0000 0.0002 0.0001 0.0002 0.0000 0.0000 #> [101] 0.0001 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [111] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [121] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [131] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [141] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [151] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [161] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [171] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [181] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [191] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [201] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [211] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [221] 0.0000 0.0002 0.0000 0.0001 0.0000 0.0000 0.0002 0.0000 0.0003 0.0003 #> [231] 0.0001 0.0003 0.0001 0.0003 0.0001 0.0001 0.0000 0.0003 0.0003 0.0003 #> [241] 0.0004 0.0002 0.0005 0.0006 0.0004 0.0003 0.0007 0.0004 0.0010 0.0005 #> [251] 0.0008 0.0009 0.0005 0.0006 0.0006 0.0002 0.0009 0.0010 0.0009 0.0004 #> [261] 0.0007 0.0010 0.0009 0.0005 0.0007 0.0004 0.0002 0.0007 0.0005 0.0004 #> [271] 0.0003 0.0003 0.0004 0.0003 0.0002 0.0003 0.0001 0.0002 0.0002 0.0001 #> [281] 0.0001 0.0000 0.0000 0.0001 0.0000 0.0000 0.0002 0.0000 0.0000 0.0000 #> [291] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 plot(degree_distribution(g, cumulative = TRUE), log = \"xy\")"},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":null,"dir":"Reference","previous_headings":"","what":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"function generates non-growing random graph expected power-law degree distributions.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"","code":"sample_fitness_pl( no.of.nodes, no.of.edges, exponent.out, exponent.in = -1, loops = FALSE, multiple = FALSE, finite.size.correction = TRUE )"},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"..nodes number vertices generated graph. ..edges number edges generated graph. exponent.Numeric scalar, power law exponent degree distribution. directed graphs, specifies exponent -degree distribution. must greater equal 2. pass Inf , get back Erdős-Rényi random network. exponent.Numeric scalar. negative, generated graph undirected. greater equal 2, argument specifies exponent -degree distribution. non-negative less 2, error generated. loops Logical scalar, whether allow loop edges generated graph. multiple Logical scalar, whether allow multiple edges generated graph. finite.size.correction Logical scalar, whether use proposed finite size correction Cho et al., see references .","code":""},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"igraph graph, directed undirected.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"game generates directed undirected random graph degrees vertices follow power-law distributions prescribed exponents. directed graphs, exponents - -degree distributions may specified separately. game simply uses sample_fitness() appropriately constructed fitness vectors. particular, fitness vertex \\(\\) \\(^{-\\alpha}\\), \\(\\alpha = 1/(\\gamma-1)\\) \\(\\gamma\\) exponent given arguments. remove correlations - -degrees case directed graphs, -fitness vector shuffled set sample_fitness() called. Note significant finite size effects may observed exponents smaller 3 original formulation game. function provides argument lets remove finite size effects assuming fitness vertex \\(\\) \\((+i_0-1)^{-\\alpha}\\) \\(i_0\\) constant chosen appropriately ensure maximum degree less square root number edges times average degree; see paper Chung Lu, Cho et al details.","code":""},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"Goh K-, Kahng B, Kim D: Universal behaviour load distribution scale-free networks. Phys Rev Lett 87(27):278701, 2001. Chung F Lu L: Connected components random graph given degree sequences. Annals Combinatorics 6, 125-145, 2002. Cho YS, Kim JS, Park J, Kahng B, Kim D: Percolation transitions scale-free networks Achlioptas process. Phys Rev Lett 103:135702, 2009.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_fitness_pl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scale-free random graphs, from vertex fitness scores — sample_fitness_pl","text":"","code":"g <- sample_fitness_pl(10000, 30000, 2.2, 2.3) plot(degree_distribution(g, cumulative = TRUE, mode = \"out\"), log = \"xy\")"},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":null,"dir":"Reference","previous_headings":"","what":"Forest Fire Network Model — sample_forestfire","title":"Forest Fire Network Model — sample_forestfire","text":"growing network model, resembles forest fire spreads igniting trees close .","code":""},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Forest Fire Network Model — sample_forestfire","text":"","code":"sample_forestfire(nodes, fw.prob, bw.factor = 1, ambs = 1, directed = TRUE)"},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Forest Fire Network Model — sample_forestfire","text":"nodes number vertices graph. fw.prob forward burning probability, see details . bw.factor backward burning ratio. backward burning probability calculated bw.factor*fw.prob. ambs number ambassador vertices. directed Logical scalar, whether create directed graph.","code":""},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Forest Fire Network Model — sample_forestfire","text":"simple graph, possibly directed directed argument TRUE.","code":""},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Forest Fire Network Model — sample_forestfire","text":"forest fire model intends reproduce following network characteristics, observed real networks: Heavy-tailed -degree distribution. Heavy-tailed -degree distribution. Communities. Densification power-law. network densifying time, according power-law rule. Shrinking diameter. diameter network decreases time. network generated following way. One vertex added time. vertex connects (cites) ambs vertices already present network, chosen uniformly random. Now, cited vertex \\(v\\) following procedure: generate two random number, \\(x\\) \\(y\\), geometrically distributed means \\(p/(1-p)\\) \\(rp(1-rp)\\). (\\(p\\) fw.prob, \\(r\\) bw.factor.) new vertex cites \\(x\\) outgoing neighbors \\(y\\) incoming neighbors \\(v\\), yet cited new vertex. less \\(x\\) \\(y\\) vertices available cite . procedure applied newly cited vertices.","code":""},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Forest Fire Network Model — sample_forestfire","text":"version model published paper incorrect sense generate kind graphs authors claim. corrected version available http://www.cs.cmu.edu/~jure/pubs/powergrowth-tkdd.pdf, implementation based .","code":""},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Forest Fire Network Model — sample_forestfire","text":"Jure Leskovec, Jon Kleinberg Christos Faloutsos. Graphs time: densification laws, shrinking diameters possible explanations. KDD '05: Proceeding eleventh ACM SIGKDD international conference Knowledge discovery data mining, 177–187, 2005.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Forest Fire Network Model — sample_forestfire","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_forestfire.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Forest Fire Network Model — sample_forestfire","text":"","code":"g <- sample_forestfire(10000, fw.prob = 0.37, bw.factor = 0.32 / 0.37) dd1 <- degree_distribution(g, mode = \"in\") dd2 <- degree_distribution(g, mode = \"out\") plot(seq(along.with = dd1) - 1, dd1, log = \"xy\") #> Warning: 1 x value <= 0 omitted from logarithmic plot #> Warning: 627 y values <= 0 omitted from logarithmic plot points(seq(along.with = dd2) - 1, dd2, col = 2, pch = 2)"},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"Random graph fixed number edges vertices.","code":""},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"","code":"sample_gnm(n, m, directed = FALSE, loops = FALSE) gnm(...)"},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"n number vertices graph. m number edges graph. directed Logical, whether graph directed, defaults FALSE. loops Logical, whether add loop edges, defaults FALSE. ... Passed sample_gnm().","code":""},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"graph n vertices m edges. edges chosen uniformly random set vertex pairs. set includes potential self-connections well loops parameter TRUE.","code":""},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"Erdős, P. Rényi, ., random graphs, Publicationes Mathematicae 6, 290–297 (1959).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_gnm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate random graphs according to the \\(G(n,m)\\) Erdős-Rényi model — sample_gnm","text":"","code":"g <- sample_gnm(1000, 1000) degree_distribution(g) #> [1] 0.149 0.269 0.256 0.167 0.100 0.040 0.016 0.002 0.001"},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"Every possible edge created independently probability p. model also referred Bernoulli random graph since connectivity status vertex pairs follows Bernoulli distribution.","code":""},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"","code":"sample_gnp(n, p, directed = FALSE, loops = FALSE) gnp(...)"},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"n number vertices graph. p probability drawing edge two arbitrary vertices (\\(G(n,p)\\) graph). directed Logical, whether graph directed, defaults FALSE. loops Logical, whether add loop edges, defaults FALSE. ... Passed sample_gnp().","code":""},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"graph n vertices pair vertices connected probability p. loops parameter controls whether self-connections also considered. model effectively constrains average number edges, \\(p m_\\text{max}\\), \\(m_\\text{max}\\) largest possible number edges, depends whether graph directed undirected whether self-loops allowed.","code":""},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"Erdős, P. Rényi, ., random graphs, Publicationes Mathematicae 6, 290–297 (1959).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_gnp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate random graphs according to the \\(G(n,p)\\) Erdős-Rényi model — sample_gnp","text":"","code":"g <- sample_gnp(1000, 1 / 1000) degree_distribution(g) #> [1] 0.381 0.355 0.181 0.064 0.015 0.003 0.001"},{"path":"https://r.igraph.org/reference/sample_grg.html","id":null,"dir":"Reference","previous_headings":"","what":"Geometric random graphs — sample_grg","title":"Geometric random graphs — sample_grg","text":"Generate random graph based distance random point unit square","code":""},{"path":"https://r.igraph.org/reference/sample_grg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Geometric random graphs — sample_grg","text":"","code":"sample_grg(nodes, radius, torus = FALSE, coords = FALSE) grg(...)"},{"path":"https://r.igraph.org/reference/sample_grg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Geometric random graphs — sample_grg","text":"nodes number vertices graph. radius radius within vertices connected edge. torus Logical constant, whether use torus instead square. coords Logical scalar, whether add positions vertices vertex attributes called ‘x’ ‘y’. ... Passed sample_grg().","code":""},{"path":"https://r.igraph.org/reference/sample_grg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Geometric random graphs — sample_grg","text":"graph object. coords TRUE vertex attributes ‘x’ ‘y’.","code":""},{"path":"https://r.igraph.org/reference/sample_grg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Geometric random graphs — sample_grg","text":"First number points dropped unit square, points correspond vertices graph create. Two points connected undirected edge closer Euclidean norm given radius. torus argument TRUE unit area torus used instead square.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_grg.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Geometric random graphs — sample_grg","text":"Gabor Csardi csardi.gabor@gmail.com, first version written Keith Briggs (http://keithbriggs.info/).","code":""},{"path":"https://r.igraph.org/reference/sample_grg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Geometric random graphs — sample_grg","text":"","code":"g <- sample_grg(1000, 0.05, torus = FALSE) g2 <- sample_grg(1000, 0.05, torus = TRUE)"},{"path":"https://r.igraph.org/reference/sample_growing.html","id":null,"dir":"Reference","previous_headings":"","what":"Growing random graph generation — sample_growing","title":"Growing random graph generation — sample_growing","text":"function creates random graph simulating stochastic evolution.","code":""},{"path":"https://r.igraph.org/reference/sample_growing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Growing random graph generation — sample_growing","text":"","code":"sample_growing(n, m = 1, directed = TRUE, citation = FALSE) growing(...)"},{"path":"https://r.igraph.org/reference/sample_growing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Growing random graph generation — sample_growing","text":"n Numeric constant, number vertices graph. m Numeric constant, number edges added time step. directed Logical, whether create directed graph. citation Logical. TRUE citation graph created, .e. time step added edges originating new vertex. ... Passed sample_growing().","code":""},{"path":"https://r.igraph.org/reference/sample_growing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Growing random graph generation — sample_growing","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_growing.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Growing random graph generation — sample_growing","text":"discrete time step model, time step new vertex added graph m new edges created. citation FALSE edges connecting two uniformly randomly chosen vertices, otherwise edges connecting new vertex uniformly randomly chosen old vertices.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_growing.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Growing random graph generation — sample_growing","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_growing.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Growing random graph generation — sample_growing","text":"","code":"g <- sample_growing(500, citation = FALSE) g2 <- sample_growing(500, citation = TRUE)"},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"Sampling hierarchical stochastic block model networks.","code":""},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"","code":"sample_hierarchical_sbm(n, m, rho, C, p) hierarchical_sbm(...)"},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"n Integer scalar, number vertices. m Integer scalar, number vertices per block. n / m must integer. Alternatively, integer vector block sizes, blocks equal sizes. rho Numeric vector, fraction vertices per cluster, within block. Must sum 1, rho * m must integer elements rho. Alternatively list rho vectors, one block, blocks. C square, symmetric numeric matrix, Bernoulli rates clusters within block. size must mach size rho vector. Alternatively, list square matrices, Bernoulli rates differ different blocks. p Numeric scalar, Bernoulli rate connections vertices different blocks. ... Passed sample_hierarchical_sbm().","code":""},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"function generates random graph according hierarchical stochastic block model.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_hierarchical_sbm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample the hierarchical stochastic block model — sample_hierarchical_sbm","text":"","code":"## Ten blocks with three clusters each C <- matrix(c( 1, 3 / 4, 0, 3 / 4, 0, 3 / 4, 0, 3 / 4, 3 / 4 ), nrow = 3) g <- sample_hierarchical_sbm(100, 10, rho = c(3, 3, 4) / 10, C = C, p = 1 / 20) g #> IGRAPH e69caab U--- 100 494 -- Hierarchical stochastic block model #> + attr: name (g/c), m (g/n), rho (g/n), C (g/n), p (g/n) #> + edges from e69caab: #> [1] 1-- 2 1-- 3 2-- 3 1-- 4 3-- 4 3-- 5 1-- 6 2-- 6 5-- 7 5-- 8 #> [11] 6-- 8 4-- 9 5-- 9 6-- 9 4--10 7-- 8 7-- 9 8-- 9 7--10 8--10 #> [21] 9--10 11--12 11--13 12--13 11--14 12--14 13--14 11--15 12--15 13--15 #> [31] 11--16 12--16 13--16 15--17 16--17 15--18 14--19 15--19 16--19 14--20 #> [41] 17--18 18--19 17--20 18--20 19--20 21--22 21--23 22--23 21--24 22--24 #> [51] 23--24 21--25 22--25 23--25 21--26 22--26 23--26 24--27 25--27 26--27 #> [61] 25--28 26--28 24--29 25--29 26--29 24--30 25--30 26--30 27--29 28--29 #> [71] 27--30 28--30 31--32 31--33 32--33 31--34 32--34 33--34 31--35 32--35 #> + ... omitted several edges if (require(Matrix)) { image(g[]) }"},{"path":"https://r.igraph.org/reference/sample_hrg.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample from a hierarchical random graph model — sample_hrg","title":"Sample from a hierarchical random graph model — sample_hrg","text":"sample_hrg() samples graph given hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/sample_hrg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample from a hierarchical random graph model — sample_hrg","text":"","code":"sample_hrg(hrg)"},{"path":"https://r.igraph.org/reference/sample_hrg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample from a hierarchical random graph model — sample_hrg","text":"hrg hierarchical random graph model.","code":""},{"path":"https://r.igraph.org/reference/sample_hrg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample from a hierarchical random graph model — sample_hrg","text":"igraph graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_islands.html","id":null,"dir":"Reference","previous_headings":"","what":"A graph with subgraphs that are each a random graph. — sample_islands","title":"A graph with subgraphs that are each a random graph. — sample_islands","text":"Create number Erdős-Rényi random graphs identical parameters, connect specified number edges.","code":""},{"path":"https://r.igraph.org/reference/sample_islands.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A graph with subgraphs that are each a random graph. — sample_islands","text":"","code":"sample_islands(islands.n, islands.size, islands.pin, n.inter)"},{"path":"https://r.igraph.org/reference/sample_islands.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A graph with subgraphs that are each a random graph. — sample_islands","text":"islands.n number islands graph. islands.size size islands graph. islands.pin probability create possible edge island. n.inter number edges create two islands.","code":""},{"path":"https://r.igraph.org/reference/sample_islands.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A graph with subgraphs that are each a random graph. — sample_islands","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/sample_islands.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A graph with subgraphs that are each a random graph. — sample_islands","text":"","code":"g <- sample_islands(3, 10, 5/10, 1) oc <- cluster_optimal(g) oc"},{"path":[]},{"path":"https://r.igraph.org/reference/sample_islands.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A graph with subgraphs that are each a random graph. — sample_islands","text":"Samuel Thiriot","code":""},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a random regular graph — sample_k_regular","title":"Create a random regular graph — sample_k_regular","text":"Generate random graph vertex degree.","code":""},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a random regular graph — sample_k_regular","text":"","code":"sample_k_regular(no.of.nodes, k, directed = FALSE, multiple = FALSE)"},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a random regular graph — sample_k_regular","text":"..nodes Integer scalar, number vertices generated graph. k Integer scalar, degree vertex graph, -degree -degree directed graph. directed Logical scalar, whether create directed graph. multiple Logical scalar, whether multiple edges allowed.","code":""},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a random regular graph — sample_k_regular","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a random regular graph — sample_k_regular","text":"game generates directed undirected random graph degrees vertices equal predefined constant k. undirected graphs, least one k number vertices must even. game simply uses sample_degseq() appropriately constructed degree sequences.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a random regular graph — sample_k_regular","text":"Tamas Nepusz ntamas@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_k_regular.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a random regular graph — sample_k_regular","text":"","code":"## A simple ring ring <- sample_k_regular(10, 2) plot(ring) ## k-regular graphs on 10 vertices, with k=1:9 k10 <- lapply(1:9, sample_k_regular, no.of.nodes = 10) layout(matrix(1:9, nrow = 3, byrow = TRUE)) sapply(k10, plot, vertex.label = NA) #> [[1]] #> NULL #> #> [[2]] #> NULL #> #> [[3]] #> NULL #> #> [[4]] #> NULL #> #> [[5]] #> NULL #> #> [[6]] #> NULL #> #> [[7]] #> NULL #> #> [[8]] #> NULL #> #> [[9]] #> NULL #>"},{"path":"https://r.igraph.org/reference/sample_last_cit.html","id":null,"dir":"Reference","previous_headings":"","what":"Random citation graphs — sample_last_cit","title":"Random citation graphs — sample_last_cit","text":"sample_last_cit() creates graph, vertices age, gain new connections based long ago last citation happened.","code":""},{"path":"https://r.igraph.org/reference/sample_last_cit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random citation graphs — sample_last_cit","text":"","code":"sample_last_cit( n, edges = 1, agebins = n/7100, pref = (1:(agebins + 1))^-3, directed = TRUE ) last_cit(...) sample_cit_types( n, edges = 1, types = rep(0, n), pref = rep(1, length(types)), directed = TRUE, attr = TRUE ) cit_types(...) sample_cit_cit_types( n, edges = 1, types = rep(0, n), pref = matrix(1, nrow = length(types), ncol = length(types)), directed = TRUE, attr = TRUE ) cit_cit_types(...)"},{"path":"https://r.igraph.org/reference/sample_last_cit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random citation graphs — sample_last_cit","text":"n Number vertices. edges Number edges per step. agebins Number aging bins. pref Vector (sample_last_cit() sample_cit_types() matrix (sample_cit_cit_types()) giving (unnormalized) citation probabilities different vertex types. directed Logical scalar, whether generate directed networks. ... Passed actual constructor. types Vector length ‘n’, types vertices. Types numbered zero. attr Logical scalar, whether add vertex types generated graph vertex attribute called ‘type’.","code":""},{"path":"https://r.igraph.org/reference/sample_last_cit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Random citation graphs — sample_last_cit","text":"new graph.","code":""},{"path":"https://r.igraph.org/reference/sample_last_cit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Random citation graphs — sample_last_cit","text":"sample_cit_cit_types() stochastic block model graph growing. sample_cit_types() similarly growing stochastic block model, probability edge depends (potentially) cited vertex .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_last_cit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Random citation graphs — sample_last_cit","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_motifs.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph motifs — sample_motifs","title":"Graph motifs — sample_motifs","text":"Graph motifs small connected induced subgraphs well-defined structure. functions search graph various motifs.","code":""},{"path":"https://r.igraph.org/reference/sample_motifs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph motifs — sample_motifs","text":"","code":"sample_motifs( graph, size = 3, cut.prob = rep(0, size), sample.size = vcount(graph)/10, sample = NULL )"},{"path":"https://r.igraph.org/reference/sample_motifs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph motifs — sample_motifs","text":"graph Graph object, input graph. size size motif, currently size 3 4 supported directed graphs sizes 3-6 undirected graphs. cut.prob Numeric vector giving probabilities search graph cut certain level. length size motif (size argument). default cuts made. sample.size number vertices use starting point finding motifs. used sample argument NULL. sample NULL specifies vertices use starting point finding motifs.","code":""},{"path":"https://r.igraph.org/reference/sample_motifs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph motifs — sample_motifs","text":"numeric scalar, estimate total number motifs graph.","code":""},{"path":"https://r.igraph.org/reference/sample_motifs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph motifs — sample_motifs","text":"sample_motifs() estimates total number motifs given size graph based sample.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_motifs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph motifs — sample_motifs","text":"","code":"g <- sample_pa(100) motifs(g, 3) #> [1] NA NA 576 NA 67 0 0 0 0 0 0 0 0 0 0 0 count_motifs(g, 3) #> [1] 643 sample_motifs(g, 3) #> [1] 0"},{"path":"https://r.igraph.org/reference/sample_pa.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate random graphs using preferential attachment — sample_pa","title":"Generate random graphs using preferential attachment — sample_pa","text":"Preferential attachment family simple stochastic algorithms building graph. Variants include Barabási-Abert model Price model.","code":""},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate random graphs using preferential attachment — sample_pa","text":"","code":"sample_pa( n, power = 1, m = NULL, out.dist = NULL, out.seq = NULL, out.pref = FALSE, zero.appeal = 1, directed = TRUE, algorithm = c(\"psumtree\", \"psumtree-multiple\", \"bag\"), start.graph = NULL ) pa(...)"},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate random graphs using preferential attachment — sample_pa","text":"n Number vertices. power power preferential attachment, default one, .e. linear preferential attachment. m Numeric constant, number edges add time step argument used .dist .seq omitted NULL. .dist Numeric vector, distribution number edges add time step. argument used .seq argument omitted NULL. .seq Numeric vector giving number edges add time step. first element ignored edges added first time step. .pref Logical, true total degree used calculating citation probability, otherwise -degree used. zero.appeal ‘attractiveness’ vertices adjacent edges. See details . directed Whether create directed graph. algorithm algorithm use graph generation. psumtree uses partial prefix-sum tree generate graph, algorithm can handle power zero.appeal values never generates multiple edges. psumtree-multiple also uses partial prefix-sum tree, generation multiple edges allowed. 0.6 version igraph used algorithm power one, zero.appeal one. bag algorithm previously (version 0.6) used power one zero.appeal one well. works putting ids vertices bag (multiset, really), exactly many times (-)degree, plus . required number cited vertices drawn bag, replacement. method might generate multiple edges. works power zero.appeal equal one. start.graph NULL igraph graph. graph, supplied graph used starting graph preferential attachment algorithm. graph least one vertex. graph supplied .seq argument NULL, contain degrees new vertices , ones start.graph. ... Passed sample_pa().","code":""},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate random graphs using preferential attachment — sample_pa","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate random graphs using preferential attachment — sample_pa","text":"simple stochastic algorithm generate graph. discrete time step model time step single vertex added. start single vertex edges first time step. add one vertex time step new vertex initiates edges old vertices. probability old vertex chosen given $$P[] \\sim k_i^\\alpha+$$ \\(k_i\\) -degree vertex \\(\\) current time step (precisely number adjacent edges \\(\\) initiated \\(\\) ) \\(\\alpha\\) \\(\\) parameters given power zero.appeal arguments. number edges initiated time step given m, .dist .seq arguments. .seq given NULL gives number edges add vector, first element ignored, second number edges add second time step . .seq given null .dist given NULL used discrete distribution generate number edges time step. first element probability edges added, second probability one edge added, etc. (.dist need sum one, normalized automatically.) .dist contain non-negative numbers east one element positive. .seq .dist omitted NULL m used, positive integer constant m edges added time step. sample_pa() generates directed graph default, set directed FALSE generate undirected graph. Note even undirected graph generated \\(k_i\\) denotes number adjacent edges initiated vertex total (- + -) degree vertex, unless .pref argument set TRUE.","code":""},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate random graphs using preferential attachment — sample_pa","text":"Barabási, .-L. Albert R. 1999. Emergence scaling random networks Science, 286 509–512. de Solla Price, D. J. 1965. Networks Scientific Papers Science, 149 510–515.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate random graphs using preferential attachment — sample_pa","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_pa.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate random graphs using preferential attachment — sample_pa","text":"","code":"g <- sample_pa(10000) degree_distribution(g) #> [1] 0.0000 0.6718 0.1603 0.0664 0.0327 0.0208 0.0128 0.0064 0.0065 0.0035 #> [11] 0.0028 0.0020 0.0021 0.0023 0.0008 0.0014 0.0014 0.0009 0.0003 0.0002 #> [21] 0.0002 0.0004 0.0004 0.0000 0.0001 0.0003 0.0001 0.0002 0.0003 0.0004 #> [31] 0.0001 0.0000 0.0001 0.0003 0.0001 0.0001 0.0000 0.0000 0.0000 0.0000 #> [41] 0.0000 0.0002 0.0000 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [51] 0.0001 0.0000 0.0000 0.0001 0.0000 0.0001 0.0000 0.0000 0.0000 0.0001 #> [61] 0.0002 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [71] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0003 0.0000 0.0000 #> [81] 0.0000 0.0000 0.0000 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [91] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 0.0000 0.0000 0.0000 #> [101] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [111] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [121] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [131] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 #> [141] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001"},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"function creates random graph simulating evolution. time new vertex added creates number links old vertices probability old vertex cited depends -degree (preferential attachment) age.","code":""},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"","code":"sample_pa_age( n, pa.exp, aging.exp, m = NULL, aging.bin = 300, out.dist = NULL, out.seq = NULL, out.pref = FALSE, directed = TRUE, zero.deg.appeal = 1, zero.age.appeal = 0, deg.coef = 1, age.coef = 1, time.window = NULL ) pa_age(...)"},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"n number vertices graph. pa.exp preferential attachment exponent, see details . aging.exp exponent aging, usually non-positive number, see details . m number edges new vertex creates (except first vertex). argument used .dist .seq arguments NULL. aging.bin number bins use measuring age vertices, see details . .dist discrete distribution generate number edges add time step .seq NULL. See details . .seq number edges add time step, vector containing many elements number vertices. See details . .pref Logical constant, whether include edges initiated vertex basis preferential attachment. See details . directed Logical constant, whether generate directed graph. See details . zero.deg.appeal degree-dependent part ‘attractiveness’ vertices adjacent edges. See also details . zero.age.appeal age-dependent part ‘attrativeness’ vertices age zero. usually zero, see details . deg.coef coefficient degree-dependent ‘attractiveness’. See details . age.coef coefficient age-dependent part ‘attractiveness’. See details . time.window Integer constant, NULL adjacent added last time.windows time steps counted basis preferential attachment. See also details . ... Passed sample_pa_age().","code":""},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"new graph.","code":""},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"discrete time step model growing graph. start network containing single vertex (edges) first time step. time step (starting second) new vertex added initiates number edges old vertices network. probability old vertex connected proportional $$P[] \\sim (c\\cdot k_i^\\alpha+)(d\\cdot l_i^\\beta+b)$$. \\(k_i\\) -degree vertex \\(\\) current time step \\(l_i\\) age vertex \\(\\). age simply defined number time steps passed since vertex added, extension vertex age divided aging.bin bins. \\(c\\), \\(\\alpha\\), \\(\\), \\(d\\), \\(\\beta\\) \\(b\\) parameters can set via following arguments: pa.exp (\\(\\alpha\\), mandatory argument), aging.exp (\\(\\beta\\), mandatory argument), zero.deg.appeal (\\(\\), optional, default value 1), zero.age.appeal (\\(b\\), optional, default 0), deg.coef (\\(c\\), optional, default 1), age.coef (\\(d\\), optional, default 1). number edges initiated time step governed m, .seq .pref parameters. .seq given interpreted vector giving number edges added time step. length n (number vertices), first element ignored. .seq given (NULL) .dist given used discrete probability distribution generate number edges. first element gives probability zero edges added time step, second element probability one edge added, etc. (.seq contain non-negative numbers, sum 1, normalized sum 1. behavior similar prob argument sample command.) default directed graph generated, directed set FALSE undirected created. Even undirected graph generated \\(k_i\\) denotes adjacent edges initiated vertex except .pref set TRUE. time.window argument given (NULL) \\(k_i\\) means adjacent edges added previous time.window time steps. function might generate graphs multiple edges.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_pa_age.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate an evolving random graph with preferential attachment and aging — sample_pa_age","text":"","code":"# The maximum degree for graph with different aging exponents g1 <- sample_pa_age(10000, pa.exp = 1, aging.exp = 0, aging.bin = 1000) g2 <- sample_pa_age(10000, pa.exp = 1, aging.exp = -1, aging.bin = 1000) g3 <- sample_pa_age(10000, pa.exp = 1, aging.exp = -3, aging.bin = 1000) max(degree(g1)) #> [1] 182 max(degree(g2)) #> [1] 48 max(degree(g3)) #> [1] 10"},{"path":"https://r.igraph.org/reference/sample_pref.html","id":null,"dir":"Reference","previous_headings":"","what":"Trait-based random generation — sample_pref","title":"Trait-based random generation — sample_pref","text":"Generation random graphs based different vertex types.","code":""},{"path":"https://r.igraph.org/reference/sample_pref.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trait-based random generation — sample_pref","text":"","code":"sample_pref( nodes, types, type.dist = rep(1, types), fixed.sizes = FALSE, pref.matrix = matrix(1, types, types), directed = FALSE, loops = FALSE ) pref(...) sample_asym_pref( nodes, types, type.dist.matrix = matrix(1, types, types), pref.matrix = matrix(1, types, types), loops = FALSE ) asym_pref(...)"},{"path":"https://r.igraph.org/reference/sample_pref.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trait-based random generation — sample_pref","text":"nodes number vertices graphs. types number different vertex types. type.dist distribution vertex types, numeric vector length ‘types’ containing non-negative numbers. vector normed obtain probabilities. fixed.sizes Fix number vertices given vertex type label. type.dist argument gives group sizes (.e. number vertices different labels) case. pref.matrix square matrix giving preferences vertex types. matrix ‘types’ rows columns. generating undirected graph, must symmetric. directed Logical constant, whether create directed graph. loops Logical constant, whether self-loops allowed graph. ... Passed constructor, sample_pref() sample_asym_pref(). type.dist.matrix joint distribution - -vertex types.","code":""},{"path":"https://r.igraph.org/reference/sample_pref.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Trait-based random generation — sample_pref","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/sample_pref.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Trait-based random generation — sample_pref","text":"models generate random graphs given vertex types. sample_pref() probability two vertices connected depends type given ‘pref.matrix’ argument. matrix symmetric make sense checked. distribution different vertex types given ‘type.dist’ vector. sample_asym_pref() vertex -type -type directed graph created. probability directed edge realized vertex given -type vertex given -type given ‘pref.matrix’ argument, can asymmetric. joint distribution - -types given ‘type.dist.matrix’ argument. types generated vertices can retrieved type vertex attribute sample_pref() intype outtype vertex attribute sample_asym_pref().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_pref.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Trait-based random generation — sample_pref","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com R interface","code":""},{"path":"https://r.igraph.org/reference/sample_pref.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Trait-based random generation — sample_pref","text":"","code":"pf <- matrix(c(1, 0, 0, 1), nrow = 2) g <- sample_pref(20, 2, pref.matrix = pf) if (FALSE) { # \\dontrun{ tkplot(g, layout = layout_with_fr) } # } pf <- matrix(c(0, 1, 0, 0), nrow = 2) g <- sample_asym_pref(20, 2, pref.matrix = pf) if (FALSE) { # \\dontrun{ tkplot(g, layout = layout_in_circle) } # }"},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample stochastic block model — sample_sbm","title":"Sample stochastic block model — sample_sbm","text":"Sampling stochastic block model networks","code":""},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample stochastic block model — sample_sbm","text":"","code":"sample_sbm(n, pref.matrix, block.sizes, directed = FALSE, loops = FALSE) sbm(...)"},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample stochastic block model — sample_sbm","text":"n Number vertices graph. pref.matrix matrix giving Bernoulli rates. \\(K\\times K\\) matrix, \\(K\\) number groups. probability creating edge vertices groups \\(\\) \\(j\\) given element \\((,j)\\). undirected graphs, matrix must symmetric. block.sizes Numeric vector giving number vertices group. sum vector must match number vertices. directed Logical scalar, whether generate directed graph. loops Logical scalar, whether self-loops allowed graph. ... Passed sample_sbm().","code":""},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample stochastic block model — sample_sbm","text":"igraph graph.","code":""},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample stochastic block model — sample_sbm","text":"function samples graphs stochastic block model (equivalent ) Bernoulli trials potential edge probabilities given Bernoulli rate matrix, pref.matrix. order vertices generated graph corresponds block.sizes argument.","code":""},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sample stochastic block model — sample_sbm","text":"Faust, K., & Wasserman, S. (1992a). Blockmodels: Interpretation evaluation. Social Networks, 14, 5–61.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Sample stochastic block model — sample_sbm","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_sbm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample stochastic block model — sample_sbm","text":"","code":"## Two groups with not only few connection between groups pm <- cbind(c(.1, .001), c(.001, .05)) g <- sample_sbm(1000, pref.matrix = pm, block.sizes = c(300, 700)) g #> IGRAPH dbfb6d5 U--- 1000 16954 -- Stochastic block model #> + attr: name (g/c), loops (g/l) #> + edges from dbfb6d5: #> [1] 3-- 5 7-- 9 8--10 9--10 2--11 6--11 1--12 6--12 6--13 12--14 #> [11] 2--15 3--15 9--15 5--16 2--17 11--17 12--17 14--17 10--18 17--18 #> [21] 6--19 14--19 17--19 16--20 3--21 7--21 11--21 12--21 1--22 5--22 #> [31] 4--23 8--23 12--23 20--23 4--25 14--25 6--26 7--26 11--26 1--27 #> [41] 6--27 8--27 20--27 25--27 23--28 26--28 1--29 14--29 15--29 17--30 #> [51] 19--30 12--31 16--31 26--31 22--32 24--32 18--33 9--34 11--34 5--35 #> [61] 18--35 24--35 27--35 34--35 10--36 19--36 22--36 28--36 2--37 11--37 #> [71] 12--37 14--37 25--37 29--37 2--38 7--38 22--38 31--38 6--39 8--39 #> + ... omitted several edges"},{"path":"https://r.igraph.org/reference/sample_seq.html","id":null,"dir":"Reference","previous_headings":"","what":"Sampling a random integer sequence — sample_seq","title":"Sampling a random integer sequence — sample_seq","text":"function provides efficient way pull integer random sample sequence integer interval.","code":""},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sampling a random integer sequence — sample_seq","text":"","code":"sample_seq(low, high, length)"},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sampling a random integer sequence — sample_seq","text":"low lower limit interval (inclusive). high higher limit interval (inclusive). length length sample.","code":""},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sampling a random integer sequence — sample_seq","text":"increasing numeric vector containing integers, sample.","code":""},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sampling a random integer sequence — sample_seq","text":"algorithm runs O(length) expected time, even high-low big. much faster (course less general) builtin sample function R.","code":""},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sampling a random integer sequence — sample_seq","text":"Jeffrey Scott Vitter: Efficient Algorithm Sequential Random Sampling, ACM Transactions Mathematical Software, 13/1, 58–67.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Sampling a random integer sequence — sample_seq","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_seq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sampling a random integer sequence — sample_seq","text":"","code":"rs <- sample_seq(1, 100000000, 10) rs #> [1] 3448251 17193538 24272928 44540786 47529307 75691495 82369671 87146886 #> [9] 92437850 99190836"},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":null,"dir":"Reference","previous_headings":"","what":"The Watts-Strogatz small-world model — sample_smallworld","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"function generates networks small-world property based variant Watts-Strogatz model. network obtained first creating periodic undirected lattice, rewiring endpoints edge probability p, avoiding creation multi-edges.","code":""},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"","code":"sample_smallworld(dim, size, nei, p, loops = FALSE, multiple = FALSE) smallworld(...)"},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"dim Integer constant, dimension starting lattice. size Integer constant, size lattice along dimension. nei Integer constant, neighborhood within vertices lattice connected. p Real constant zero one, rewiring probability. loops Logical scalar, whether loops edges allowed generated graph. multiple Logical scalar, whether multiple edges allowed int generated graph. ... Passed sample_smallworld().","code":""},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"Note function might create graphs loops /multiple edges. can use simplify() get rid . process differs original model Watts Strogatz (see reference) rewires endpoints edges. Thus limit p=1, obtain G(n,m) random graph number vertices edges original lattice. comparison, original Watts-Strogatz model rewires single endpoint edge, thus network become fully random even p=1. appropriate choices p, models exhibit property simultaneously short path lengths high clustering.","code":""},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"Duncan J Watts Steven H Strogatz: Collective dynamics ‘small world’ networks, Nature 393, 440-442, 1998.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_smallworld.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Watts-Strogatz small-world model — sample_smallworld","text":"","code":"g <- sample_smallworld(1, 100, 5, 0.05) mean_distance(g) #> [1] 2.696768 transitivity(g, type = \"average\") #> [1] 0.5011677"},{"path":"https://r.igraph.org/reference/sample_spanning_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Samples from the spanning trees of a graph randomly and uniformly — sample_spanning_tree","title":"Samples from the spanning trees of a graph randomly and uniformly — sample_spanning_tree","text":"sample_spanning_tree() picks spanning tree undirected graph randomly uniformly, using loop-erased random walks.","code":""},{"path":"https://r.igraph.org/reference/sample_spanning_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Samples from the spanning trees of a graph randomly and uniformly — sample_spanning_tree","text":"","code":"sample_spanning_tree(graph, vid = 0)"},{"path":"https://r.igraph.org/reference/sample_spanning_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Samples from the spanning trees of a graph randomly and uniformly — sample_spanning_tree","text":"graph input graph sample . Edge directions ignored graph directed. vid graph disconnected, argument specifies handle situation. argument zero (default), sampling performed component-wise, result spanning forest. argument contains vertex ID, component containing given vertex processed, result spanning tree component graph.","code":""},{"path":"https://r.igraph.org/reference/sample_spanning_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Samples from the spanning trees of a graph randomly and uniformly — sample_spanning_tree","text":"edge sequence containing edges spanning tree. Use subgraph.edges() extract corresponding subgraph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_spanning_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Samples from the spanning trees of a graph randomly and uniformly — sample_spanning_tree","text":"","code":"g <- make_full_graph(10) %du% make_full_graph(5) edges <- sample_spanning_tree(g) forest <- subgraph.edges(g, edges)"},{"path":"https://r.igraph.org/reference/sample_sphere_surface.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","title":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","text":"Sample finite-dimensional vectors use latent position vectors random dot product graphs","code":""},{"path":"https://r.igraph.org/reference/sample_sphere_surface.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","text":"","code":"sample_sphere_surface(dim, n = 1, radius = 1, positive = TRUE)"},{"path":"https://r.igraph.org/reference/sample_sphere_surface.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","text":"dim Integer scalar, dimension random vectors. n Integer scalar, sample size. radius Numeric scalar, radius sphere sample. positive Logical scalar, whether sample positive orthant sphere.","code":""},{"path":"https://r.igraph.org/reference/sample_sphere_surface.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","text":"dim (length alpha vector sample_dirichlet()) times n matrix, whose columns sample vectors.","code":""},{"path":"https://r.igraph.org/reference/sample_sphere_surface.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","text":"sample_sphere_surface() generates uniform samples \\(S^{dim-1}\\) ((dim-1)-sphere) radius radius, .e. Euclidean norm samples equal radius.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_sphere_surface.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample vectors uniformly from the surface of a sphere — sample_sphere_surface","text":"","code":"lpvs.sph <- sample_sphere_surface(dim = 10, n = 20, radius = 1) RDP.graph.3 <- sample_dot_product(lpvs.sph) vec.norm <- apply(lpvs.sph, 2, function(x) { sum(x^2) }) vec.norm #> [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},{"path":"https://r.igraph.org/reference/sample_sphere_volume.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","title":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","text":"Sample finite-dimensional vectors use latent position vectors random dot product graphs","code":""},{"path":"https://r.igraph.org/reference/sample_sphere_volume.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","text":"","code":"sample_sphere_volume(dim, n = 1, radius = 1, positive = TRUE)"},{"path":"https://r.igraph.org/reference/sample_sphere_volume.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","text":"dim Integer scalar, dimension random vectors. n Integer scalar, sample size. radius Numeric scalar, radius sphere sample. positive Logical scalar, whether sample positive orthant sphere.","code":""},{"path":"https://r.igraph.org/reference/sample_sphere_volume.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","text":"dim (length alpha vector sample_dirichlet()) times n matrix, whose columns sample vectors.","code":""},{"path":"https://r.igraph.org/reference/sample_sphere_volume.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","text":"sample_sphere_volume() generates uniform samples \\(S^{dim-1}\\) ((dim-1)-sphere) .e. Euclidean norm samples smaller equal radius.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_sphere_volume.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample vectors uniformly from the volume of a sphere — sample_sphere_volume","text":"","code":"lpvs.sph.vol <- sample_sphere_volume(dim = 10, n = 20, radius = 1) RDP.graph.4 <- sample_dot_product(lpvs.sph.vol) vec.norm <- apply(lpvs.sph.vol, 2, function(x) { sum(x^2) }) vec.norm #> [1] 0.5107383 0.9702620 0.9313446 0.7826239 0.9006161 0.9105936 0.2688683 #> [8] 0.6761988 0.5461198 0.9849826 0.7700989 0.6592338 0.9190629 0.8928857 #> [15] 0.9870842 0.8720690 0.7226361 0.7508656 0.9817244 0.9408558"},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":null,"dir":"Reference","previous_headings":"","what":"Graph generation based on different vertex types — sample_traits_callaway","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"functions implement evolving network models based different vertex types.","code":""},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"","code":"sample_traits_callaway( nodes, types, edge.per.step = 1, type.dist = rep(1, types), pref.matrix = matrix(1, types, types), directed = FALSE ) traits_callaway(...) sample_traits( nodes, types, k = 1, type.dist = rep(1, types), pref.matrix = matrix(1, types, types), directed = FALSE ) traits(...)"},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"nodes number vertices graph. types number different vertex types. edge.per.step number edges add graph per time step. type.dist distribution vertex types. assumed stationary time. pref.matrix matrix giving preferences given vertex types. probabilities, .e. numbers zero one. directed Logical constant, whether generate directed graphs. ... Passed constructor, sample_traits() sample_traits_callaway(). k number trials per time step, see details .","code":""},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"sample_traits_callaway() simulation goes like : discrete time step new vertex added graph. type vertex generated based type.dist. two vertices selected uniformly randomly graph. probability connected depends types vertices taken pref.matrix. another two vertices selected repeated edges.per.step times time step. sample_traits() simulation goes like : single vertex added time step. new vertex tries connect k vertices graph. probability connection realized depends types vertices involved taken pref.matrix.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/sample_traits_callaway.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graph generation based on different vertex types — sample_traits_callaway","text":"","code":"# two types of vertices, they like only themselves g1 <- sample_traits_callaway(1000, 2, pref.matrix = matrix(c(1, 0, 0, 1), ncol = 2)) g2 <- sample_traits(1000, 2, k = 2, pref.matrix = matrix(c(1, 0, 0, 1), ncol = 2))"},{"path":"https://r.igraph.org/reference/sample_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample trees randomly and uniformly — sample_tree","title":"Sample trees randomly and uniformly — sample_tree","text":"sample_tree() generates random given number nodes uniform random set labelled trees.","code":""},{"path":"https://r.igraph.org/reference/sample_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample trees randomly and uniformly — sample_tree","text":"","code":"sample_tree(n, directed = FALSE, method = c(\"lerw\", \"prufer\"))"},{"path":"https://r.igraph.org/reference/sample_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample trees randomly and uniformly — sample_tree","text":"n number nodes tree directed Whether create directed tree. edges tree oriented away root. method algorithm use generate tree. ‘prufer’ samples Prüfer sequences uniformly converts sampled sequence tree. ‘lerw’ performs loop-erased random walk complete graph uniformly sampleits spanning trees. (also known Wilson's algorithm). default ‘lerw’. Note method based Prüfer sequences support directed trees moment.","code":""},{"path":"https://r.igraph.org/reference/sample_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample trees randomly and uniformly — sample_tree","text":"graph object.","code":""},{"path":"https://r.igraph.org/reference/sample_tree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample trees randomly and uniformly — sample_tree","text":"words, function generates possible labelled tree given number nodes probability.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sample_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample trees randomly and uniformly — sample_tree","text":"","code":"g <- sample_tree(100, method = \"lerw\")"},{"path":"https://r.igraph.org/reference/sbm.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample stochastic block model — sbm.game","title":"Sample stochastic block model — sbm.game","text":"sbm.game() renamed sample_sbm() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/sbm.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample stochastic block model — sbm.game","text":"","code":"sbm.game(n, pref.matrix, block.sizes, directed = FALSE, loops = FALSE)"},{"path":"https://r.igraph.org/reference/sbm.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample stochastic block model — sbm.game","text":"n Number vertices graph. pref.matrix matrix giving Bernoulli rates. \\(K\\times K\\) matrix, \\(K\\) number groups. probability creating edge vertices groups \\(\\) \\(j\\) given element \\((,j)\\). undirected graphs, matrix must symmetric. block.sizes Numeric vector giving number vertices group. sum vector must match number vertices. directed Logical scalar, whether generate directed graph. loops Logical scalar, whether self-loops allowed graph.","code":""},{"path":"https://r.igraph.org/reference/scan_stat.html","id":null,"dir":"Reference","previous_headings":"","what":"Scan statistics on a time series of graphs — scan_stat","title":"Scan statistics on a time series of graphs — scan_stat","text":"Calculate scan statistics time series graphs. done calculating local scan statistics graph vertex, normalizing across vertices across time steps.","code":""},{"path":"https://r.igraph.org/reference/scan_stat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scan statistics on a time series of graphs — scan_stat","text":"","code":"scan_stat(graphs, tau = 1, ell = 0, locality = c(\"us\", \"them\"), ...)"},{"path":"https://r.igraph.org/reference/scan_stat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scan statistics on a time series of graphs — scan_stat","text":"graphs list igraph graph objects. must directed undirected must number vertices. tau number previous time steps consider time-dependent normalization individual vertices. words, current locality statistics vertex compared many previous time steps vertex decide whether significantly larger. ell number previous time steps consider aggregated scan statistics. essentially smoothing parameter. locality Whether calculate ‘us’ ‘’ statistics. ... Extra arguments passed local_scan().","code":""},{"path":"https://r.igraph.org/reference/scan_stat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scan statistics on a time series of graphs — scan_stat","text":"list entries: stat scan statistics time step. NA initial tau + ell time steps. arg_max_v (numeric) vertex ids vertex largest locality statistics, time step. NA initial tau + ell time steps.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/scan_stat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scan statistics on a time series of graphs — scan_stat","text":"","code":"## Generate a bunch of SBMs, with the last one being different num_t <- 20 block_sizes <- c(10, 5, 5) p_ij <- list(p = 0.1, h = 0.9, q = 0.9) P0 <- matrix(p_ij$p, 3, 3) P0[2, 2] <- p_ij$h PA <- P0 PA[3, 3] <- p_ij$q num_v <- sum(block_sizes) tsg <- replicate(num_t - 1, P0, simplify = FALSE) %>% append(list(PA)) %>% lapply(sample_sbm, n = num_v, block.sizes = block_sizes, directed = TRUE) scan_stat(graphs = tsg, k = 1, tau = 4, ell = 2) #> $stat #> [1] NA NA NA NA NA NA #> [7] -2.6250000 0.9428090 1.2121831 -4.2662676 -0.6978469 2.7919210 #> [13] 0.8315248 -0.5387745 0.4195589 0.1250000 1.1250000 -1.6995735 #> [19] -0.5738191 17.9650296 #> #> $arg_max_v #> [1] NA NA NA NA NA NA 4 18 10 20 3 3 11 9 16 10 3 8 18 20 #> scan_stat(graphs = tsg, locality = \"them\", k = 1, tau = 4, ell = 2) #> $stat #> [1] NA NA NA NA NA NA #> [7] -0.40682619 -0.15682619 0.75000000 -1.12500000 -0.94280904 4.62500000 #> [13] 0.03721615 -1.64991582 -0.78038480 -0.21113846 -0.33613846 0.62500000 #> [19] 0.37500000 11.75000000 #> #> $arg_max_v #> [1] NA NA NA NA NA NA 2 18 19 16 10 3 2 9 17 9 17 13 18 17 #>"},{"path":"https://r.igraph.org/reference/sequential_pal.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential palette — sequential_pal","title":"Sequential palette — sequential_pal","text":"‘OrRd’ palette https://colorbrewer2.org/. nine colors.","code":""},{"path":"https://r.igraph.org/reference/sequential_pal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential palette — sequential_pal","text":"","code":"sequential_pal(n)"},{"path":"https://r.igraph.org/reference/sequential_pal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential palette — sequential_pal","text":"n number colors palette. maximum nine currently.","code":""},{"path":"https://r.igraph.org/reference/sequential_pal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential palette — sequential_pal","text":"character vector RGB color codes.","code":""},{"path":"https://r.igraph.org/reference/sequential_pal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sequential palette — sequential_pal","text":"Use palette, vertex colors mark ordinal quantity, e.g. centrality measure, ordinal vertex covariate, like age people, seniority level.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sequential_pal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential palette — sequential_pal","text":"","code":"library(igraphdata) data(karate) karate <- karate %>% add_layout_(with_kk()) %>% set_vertex_attr(\"size\", value = 10) #> This graph was created by an old(er) igraph version. #> Call upgrade_graph() on it to use with the current igraph version #> For now we convert it on the fly... V(karate)$color <- scales::dscale(degree(karate) %>% cut(5), sequential_pal) plot(karate)"},{"path":"https://r.igraph.org/reference/set.edge.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Set edge attributes — set.edge.attribute","title":"Set edge attributes — set.edge.attribute","text":"set.edge.attribute() renamed set_edge_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/set.edge.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set edge attributes — set.edge.attribute","text":"","code":"set.edge.attribute(graph, name, index = E(graph), value)"},{"path":"https://r.igraph.org/reference/set.edge.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set edge attributes — set.edge.attribute","text":"graph graph name name attribute set. index optional edge sequence set attributes subset edges. value new value attribute (index) edges. NULL, input returned unchanged.","code":""},{"path":"https://r.igraph.org/reference/set.graph.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Set a graph attribute — set.graph.attribute","title":"Set a graph attribute — set.graph.attribute","text":"set.graph.attribute() renamed set_graph_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/set.graph.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set a graph attribute — set.graph.attribute","text":"","code":"set.graph.attribute(graph, name, value)"},{"path":"https://r.igraph.org/reference/set.graph.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set a graph attribute — set.graph.attribute","text":"graph graph. name name attribute set. value New value attribute.","code":""},{"path":"https://r.igraph.org/reference/set.vertex.attribute.html","id":null,"dir":"Reference","previous_headings":"","what":"Set vertex attributes — set.vertex.attribute","title":"Set vertex attributes — set.vertex.attribute","text":"set.vertex.attribute() renamed set_vertex_attr() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/set.vertex.attribute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set vertex attributes — set.vertex.attribute","text":"","code":"set.vertex.attribute(graph, name, index = V(graph), value)"},{"path":"https://r.igraph.org/reference/set.vertex.attribute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set vertex attributes — set.vertex.attribute","text":"graph graph. name name attribute set. index optional vertex sequence set attributes subset vertices. value new value attribute (index) vertices. NULL, input returned unchanged.","code":""},{"path":"https://r.igraph.org/reference/set_edge_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Set edge attributes — set_edge_attr","title":"Set edge attributes — set_edge_attr","text":"Set edge attributes","code":""},{"path":"https://r.igraph.org/reference/set_edge_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set edge attributes — set_edge_attr","text":"","code":"set_edge_attr(graph, name, index = E(graph), value)"},{"path":"https://r.igraph.org/reference/set_edge_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set edge attributes — set_edge_attr","text":"graph graph name name attribute set. index optional edge sequence set attributes subset edges. value new value attribute (index) edges. NULL, input returned unchanged.","code":""},{"path":"https://r.igraph.org/reference/set_edge_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set edge attributes — set_edge_attr","text":"graph, edge attribute added set.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/set_edge_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set edge attributes — set_edge_attr","text":"","code":"g <- make_ring(10) %>% set_edge_attr(\"label\", value = LETTERS[1:10]) g #> IGRAPH dd40d4b U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), label (e/c) #> + edges from dd40d4b: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 plot(g)"},{"path":"https://r.igraph.org/reference/set_graph_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Set a graph attribute — set_graph_attr","title":"Set a graph attribute — set_graph_attr","text":"existing attribute name overwritten.","code":""},{"path":"https://r.igraph.org/reference/set_graph_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set a graph attribute — set_graph_attr","text":"","code":"set_graph_attr(graph, name, value)"},{"path":"https://r.igraph.org/reference/set_graph_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set a graph attribute — set_graph_attr","text":"graph graph. name name attribute set. value New value attribute.","code":""},{"path":"https://r.igraph.org/reference/set_graph_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set a graph attribute — set_graph_attr","text":"graph new graph attribute added set.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/set_graph_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set a graph attribute — set_graph_attr","text":"","code":"g <- make_ring(10) %>% set_graph_attr(\"layout\", layout_with_fr) g #> IGRAPH d2487dc U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), layout (g/x) #> + edges from d2487dc: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 plot(g)"},{"path":"https://r.igraph.org/reference/set_vertex_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Set vertex attributes — set_vertex_attr","title":"Set vertex attributes — set_vertex_attr","text":"Set vertex attributes","code":""},{"path":"https://r.igraph.org/reference/set_vertex_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set vertex attributes — set_vertex_attr","text":"","code":"set_vertex_attr(graph, name, index = V(graph), value)"},{"path":"https://r.igraph.org/reference/set_vertex_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set vertex attributes — set_vertex_attr","text":"graph graph. name name attribute set. index optional vertex sequence set attributes subset vertices. value new value attribute (index) vertices. NULL, input returned unchanged.","code":""},{"path":"https://r.igraph.org/reference/set_vertex_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set vertex attributes — set_vertex_attr","text":"graph, vertex attribute added set.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/set_vertex_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set vertex attributes — set_vertex_attr","text":"","code":"g <- make_ring(10) %>% set_vertex_attr(\"label\", value = LETTERS[1:10]) g #> IGRAPH 93baacc U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), label (v/c) #> + edges from 93baacc: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 plot(g)"},{"path":"https://r.igraph.org/reference/shapes.html","id":null,"dir":"Reference","previous_headings":"","what":"Various vertex shapes when plotting igraph graphs — shapes","title":"Various vertex shapes when plotting igraph graphs — shapes","text":"Starting version 0.5.1 igraph supports different vertex shapes plotting graphs.","code":""},{"path":"https://r.igraph.org/reference/shapes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Various vertex shapes when plotting igraph graphs — shapes","text":"","code":"shapes(shape = NULL) shape_noclip(coords, el, params, end = c(\"both\", \"from\", \"to\")) shape_noplot(coords, v = NULL, params) add_shape(shape, clip = shape_noclip, plot = shape_noplot, parameters = list())"},{"path":"https://r.igraph.org/reference/shapes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Various vertex shapes when plotting igraph graphs — shapes","text":"shape Character scalar, name vertex shape. NULL shapes(), names defined vertex shapes returned. coords, el, params, end, v See parameters clipping/plotting functions . clip R function object, clipping function. plot R function object, plotting function. parameters Named list, additional plot/vertex/edge parameters. element named define new parameters, elements define default values. Vertex parameters prefix ‘vertex.’, edge parameters prefix ‘edge.’. general plotting parameters prefix ‘plot.’. See Details .","code":""},{"path":"https://r.igraph.org/reference/shapes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Various vertex shapes when plotting igraph graphs — shapes","text":"shapes() returns character vector shape argument NULL. returns named list entries named ‘clip’ ‘plot’, R functions. add_shape() returns TRUE, invisibly. shape_noclip() returns appropriate columns coords argument.","code":""},{"path":"https://r.igraph.org/reference/shapes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Various vertex shapes when plotting igraph graphs — shapes","text":"igraph vertex shape defined two functions: 1) provides information size shape clipping edges 2) plots shape requested. functions called “shape functions” rest manual page. first one clipping function second plotting function. clipping function following arguments: coords matrix four columns, contains coordinates vertices edge list supplied el argument. el matrix two columns, edges end points clipped. number rows coords. params function object can called query vertex/edge/plot graphical parameters. first argument function “vertex”, “edge” “plot” decide type parameter, second character string giving name parameter. E.g. end Character string, gives end points used. Possible values “”, “” “”. “” function expected clip first column el edge list, “” selects second column, “” selects . clipping function return matrix number rows el arguments. end matrix must four columns, otherwise two. matrix contains modified coordinates, clipping applied. plotting function following arguments: coords coordinates vertices, matrix two columns. v ids vertices plot. match number rows coords argument. params clipping function, see . return value plotting function used. shapes() can used list names installed vertex shapes, calling without arguments, setting shape argument NULL. shape name given, clipping plotting functions shape returned named list. add_shape() can used add new vertex shapes igraph. one must give clipping plotting functions new shape. also possible list plot/vertex/edge parameters, parameters argument, clipping /plotting functions can make use . example generic regular polygon shape, can parameter number sides. shape_noclip() simple clipping function user can use shape definitions. clipping, edges drawn exactly listed vertex position coordinates. shape_noplot() simple (probably useful) plotting function, plot anything.","code":"params(\"vertex\", \"size\")"},{"path":"https://r.igraph.org/reference/shapes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Various vertex shapes when plotting igraph graphs — shapes","text":"","code":"# all vertex shapes, minus \"raster\", that might not be available shapes <- setdiff(shapes(), \"\") g <- make_ring(length(shapes)) set.seed(42) plot(g, vertex.shape = shapes, vertex.label = shapes, vertex.label.dist = 1, vertex.size = 15, vertex.size2 = 15, vertex.pie = lapply(shapes, function(x) if (x == \"pie\") 2:6 else 0), vertex.pie.color = list(heat.colors(5)) ) # add new vertex shape, plot nothing with no clipping add_shape(\"nil\") plot(g, vertex.shape = \"nil\") ################################################################# # triangle vertex shape mytriangle <- function(coords, v = NULL, params) { vertex.color <- params(\"vertex\", \"color\") if (length(vertex.color) != 1 && !is.null(v)) { vertex.color <- vertex.color[v] } vertex.size <- 1 / 200 * params(\"vertex\", \"size\") if (length(vertex.size) != 1 && !is.null(v)) { vertex.size <- vertex.size[v] } symbols( x = coords[, 1], y = coords[, 2], bg = vertex.color, stars = cbind(vertex.size, vertex.size, vertex.size), add = TRUE, inches = FALSE ) } # clips as a circle add_shape(\"triangle\", clip = shapes(\"circle\")$clip, plot = mytriangle ) plot(g, vertex.shape = \"triangle\", vertex.color = rainbow(vcount(g)), vertex.size = seq(10, 20, length.out = vcount(g)) ) ################################################################# # generic star vertex shape, with a parameter for number of rays mystar <- function(coords, v = NULL, params) { vertex.color <- params(\"vertex\", \"color\") if (length(vertex.color) != 1 && !is.null(v)) { vertex.color <- vertex.color[v] } vertex.size <- 1 / 200 * params(\"vertex\", \"size\") if (length(vertex.size) != 1 && !is.null(v)) { vertex.size <- vertex.size[v] } norays <- params(\"vertex\", \"norays\") if (length(norays) != 1 && !is.null(v)) { norays <- norays[v] } mapply(coords[, 1], coords[, 2], vertex.color, vertex.size, norays, FUN = function(x, y, bg, size, nor) { symbols( x = x, y = y, bg = bg, stars = matrix(c(size, size / 2), nrow = 1, ncol = nor * 2), add = TRUE, inches = FALSE ) } ) } # no clipping, edges will be below the vertices anyway add_shape(\"star\", clip = shape_noclip, plot = mystar, parameters = list(vertex.norays = 5) ) plot(g, vertex.shape = \"star\", vertex.color = rainbow(vcount(g)), vertex.size = seq(10, 20, length.out = vcount(g)) ) plot(g, vertex.shape = \"star\", vertex.color = rainbow(vcount(g)), vertex.size = seq(10, 20, length.out = vcount(g)), vertex.norays = rep(4:8, length.out = vcount(g)) )"},{"path":"https://r.igraph.org/reference/shortest.paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Shortest (directed or undirected) paths between vertices — shortest.paths","title":"Shortest (directed or undirected) paths between vertices — shortest.paths","text":"shortest.paths() renamed distances() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/shortest.paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shortest (directed or undirected) paths between vertices — shortest.paths","text":"","code":"shortest.paths( graph, v = V(graph), to = V(graph), mode = c(\"all\", \"out\", \"in\"), weights = NULL, algorithm = c(\"automatic\", \"unweighted\", \"dijkstra\", \"bellman-ford\", \"johnson\") )"},{"path":"https://r.igraph.org/reference/shortest.paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shortest (directed or undirected) paths between vertices — shortest.paths","text":"graph graph work . v Numeric vector, vertices shortest paths calculated. Numeric vector, vertices shortest paths calculated. default includes vertices. Note distances() every vertex must included . (required shortest_paths(). mode Character constant, gives whether shortest paths given vertices calculated directed graphs. shortest paths vertex, considered. , default, corresponding undirected graph used, .e. directed paths searched. argument ignored undirected graphs. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). algorithm algorithm use calculation. default igraph tries select fastest suitable algorithm. weights, unweighted breadth-first search used, otherwise weights positive, Dijkstra's algorithm used. negative weights calculation 100 sources, Johnson's algorithm used. Otherwise Bellman-Ford algorithm used. can override igraph's choice explicitly giving parameter. Note igraph C core might still override choice obvious cases, .e. edge weights, unweighted algorithm used, regardless argument.","code":""},{"path":"https://r.igraph.org/reference/showtrace.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to deal with the result of network community detection — showtrace","title":"Functions to deal with the result of network community detection — showtrace","text":"showtrace() renamed show_trace() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/showtrace.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to deal with the result of network community detection — showtrace","text":"","code":"showtrace(communities)"},{"path":"https://r.igraph.org/reference/similarity.html","id":null,"dir":"Reference","previous_headings":"","what":"Similarity measures of two vertices — similarity","title":"Similarity measures of two vertices — similarity","text":"functions calculates similarity scores vertices based connection patterns.","code":""},{"path":"https://r.igraph.org/reference/similarity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Similarity measures of two vertices — similarity","text":"","code":"similarity( graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), loops = FALSE, method = c(\"jaccard\", \"dice\", \"invlogweighted\") )"},{"path":"https://r.igraph.org/reference/similarity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Similarity measures of two vertices — similarity","text":"graph input graph. vids vertex ids similarity calculated. mode type neighboring vertices use calculation, possible values: ‘’, ‘’, ‘’. loops Whether include vertices neighbor sets. method method use.","code":""},{"path":"https://r.igraph.org/reference/similarity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Similarity measures of two vertices — similarity","text":"length(vids) length(vids) numeric matrix containing similarity scores. argument ignored invlogweighted method.","code":""},{"path":"https://r.igraph.org/reference/similarity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Similarity measures of two vertices — similarity","text":"Jaccard similarity coefficient two vertices number common neighbors divided number vertices neighbors least one two vertices considered. jaccard method calculates pairwise Jaccard similarities () vertices. Dice similarity coefficient two vertices twice number common neighbors divided sum degrees vertices. Methof dice calculates pairwise Dice similarities () vertices. inverse log-weighted similarity two vertices number common neighbors, weighted inverse logarithm degrees. based assumption two vertices considered similar share low-degree common neighbor, since high-degree common neighbors likely appear even pure chance. Isolated vertices zero similarity vertex. Self-similarities calculated. See following paper details: Lada . Adamic Eytan Adar: Friends neighbors Web. Social Networks, 25(3):211-230, 2003.","code":""},{"path":"https://r.igraph.org/reference/similarity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Similarity measures of two vertices — similarity","text":"Lada . Adamic Eytan Adar: Friends neighbors Web. Social Networks, 25(3):211-230, 2003.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/similarity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Similarity measures of two vertices — similarity","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com manual page.","code":""},{"path":"https://r.igraph.org/reference/similarity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Similarity measures of two vertices — similarity","text":"","code":"g <- make_ring(5) similarity(g, method = \"dice\") #> [,1] [,2] [,3] [,4] [,5] #> [1,] 1.0 0.0 0.5 0.5 0.0 #> [2,] 0.0 1.0 0.0 0.5 0.5 #> [3,] 0.5 0.0 1.0 0.0 0.5 #> [4,] 0.5 0.5 0.0 1.0 0.0 #> [5,] 0.0 0.5 0.5 0.0 1.0 similarity(g, method = \"jaccard\") #> [,1] [,2] [,3] [,4] [,5] #> [1,] 1.0000000 0.0000000 0.3333333 0.3333333 0.0000000 #> [2,] 0.0000000 1.0000000 0.0000000 0.3333333 0.3333333 #> [3,] 0.3333333 0.0000000 1.0000000 0.0000000 0.3333333 #> [4,] 0.3333333 0.3333333 0.0000000 1.0000000 0.0000000 #> [5,] 0.0000000 0.3333333 0.3333333 0.0000000 1.0000000"},{"path":"https://r.igraph.org/reference/simplified.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor modifier to drop multiple and loop edges — simplified","title":"Constructor modifier to drop multiple and loop edges — simplified","text":"Constructor modifier drop multiple loop edges","code":""},{"path":"https://r.igraph.org/reference/simplified.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor modifier to drop multiple and loop edges — simplified","text":"","code":"simplified()"},{"path":[]},{"path":"https://r.igraph.org/reference/simplified.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Constructor modifier to drop multiple and loop edges — simplified","text":"","code":"sample_(pa(10, m = 3, algorithm = \"bag\")) #> IGRAPH 651c45d D--- 10 27 -- Barabasi graph #> + attr: name (g/c), power (g/n), m (g/n), zero.appeal (g/n), algorithm #> | (g/c) #> + edges from 651c45d: #> [1] 2->1 2->1 2->1 3->1 3->1 3->2 4->1 4->1 4->1 5->1 5->1 5->1 #> [13] 6->1 6->1 6->2 7->1 7->1 7->1 8->2 8->1 8->1 9->1 9->6 9->2 #> [25] 10->2 10->8 10->1 sample_(pa(10, m = 3, algorithm = \"bag\"), simplified()) #> IGRAPH 69b18ea D--- 10 13 -- Barabasi graph #> + attr: name (g/c), power (g/n), m (g/n), zero.appeal (g/n), algorithm #> | (g/c) #> + edges from 69b18ea: #> [1] 2->1 3->1 3->2 4->1 4->2 5->1 5->4 6->1 7->1 8->1 8->2 9->1 #> [13] 10->1"},{"path":"https://r.igraph.org/reference/simplify.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple graphs — simplify","title":"Simple graphs — simplify","text":"Simple graphs graphs contain loop multiple edges.","code":""},{"path":"https://r.igraph.org/reference/simplify.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple graphs — simplify","text":"","code":"simplify( graph, remove.multiple = TRUE, remove.loops = TRUE, edge.attr.comb = igraph_opt(\"edge.attr.comb\") ) is_simple(graph) simplify_and_colorize(graph)"},{"path":"https://r.igraph.org/reference/simplify.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple graphs — simplify","text":"graph graph work . remove.multiple Logical, whether multiple edges removed. remove.loops Logical, whether loop edges removed. edge.attr.comb Specifies edge attributes, remove.multiple=TRUE. case many edges might mapped single one new graph, attributes combined. Please see attribute.combination() details .","code":""},{"path":"https://r.igraph.org/reference/simplify.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simple graphs — simplify","text":"new graph object edges deleted.","code":""},{"path":"https://r.igraph.org/reference/simplify.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simple graphs — simplify","text":"loop edge edge two endpoints vertex. Two edges multiple edges exactly two endpoints (directed graphs order matter). graph simple contain loop edges multiple edges. is_simple() checks whether graph simple. simplify() removes loop /multiple edges graph. remove.loops remove.multiple TRUE function returns simple graph. simplify_and_colorize() constructs new, simple graph graph also sets color attribute vertices edges. colors vertices represent number self-loops originally incident , colors edges represent multiplicities edges original graph. allows one take account edge multiplicities number loop edges VF2 isomorphism algorithm. graph, vertex edge attributes original graph discarded primary purpose function facilitate usage multigraphs VF2 algorithm.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/simplify.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simple graphs — simplify","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/simplify.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simple graphs — simplify","text":"","code":"g <- make_graph(c(1, 2, 1, 2, 3, 3)) is_simple(g) #> [1] FALSE is_simple(simplify(g, remove.loops = FALSE)) #> [1] FALSE is_simple(simplify(g, remove.multiple = FALSE)) #> [1] FALSE is_simple(simplify(g)) #> [1] TRUE"},{"path":"https://r.igraph.org/reference/sir.html","id":null,"dir":"Reference","previous_headings":"","what":"SIR model on graphs — time_bins","title":"SIR model on graphs — time_bins","text":"Run simulations SIR (susceptible-infected-recovered) model, graph","code":""},{"path":"https://r.igraph.org/reference/sir.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"SIR model on graphs — time_bins","text":"","code":"time_bins(x, middle = TRUE) # S3 method for class 'sir' time_bins(x, middle = TRUE) # S3 method for class 'sir' median(x, na.rm = FALSE, ...) # S3 method for class 'sir' quantile(x, comp = c(\"NI\", \"NS\", \"NR\"), prob, ...) sir(graph, beta, gamma, no.sim = 100)"},{"path":"https://r.igraph.org/reference/sir.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"SIR model on graphs — time_bins","text":"x sir object, returned sir() function. middle Logical scalar, whether return middle time bins, boundaries. na.rm Logical scalar, whether ignore NA values. sir objects contain NA values currently, argument effectively ignored. ... Additional arguments, ignored currently. comp Character scalar. component calculate quantile . NI infected agents, NS susceptibles, NR stands recovered. prob Numeric vector probabilities, [0,1], specify quantiles calculate. graph graph run model . directed, edge directions ignored warning given. beta Non-negative scalar. rate infection individual susceptible single infected neighbor. infection rate susceptible individual n infected neighbors n times beta. Formally rate parameter exponential distribution. gamma Positive scalar. rate recovery infected individual. Formally, rate parameter exponential distribution. .sim Integer scalar, number simulation runs perform.","code":""},{"path":"https://r.igraph.org/reference/sir.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"SIR model on graphs — time_bins","text":"sir() results returned object class ‘sir’, list, one element simulation. simulation list following elements. numeric vectors, equal length: times times events. NS number susceptibles population, time. NI number infected individuals population, time. NR number recovered individuals population, time. Function time_bins() returns numeric vector, middle boundaries time bins, depending middle argument. median returns list three named numeric vectors, NS, NI NR. names within vectors created time bins. quantile returns vector median (one, one requested) one quantile requested. multiple quantiles requested, list vectors returned, one quantile.","code":""},{"path":"https://r.igraph.org/reference/sir.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"SIR model on graphs — time_bins","text":"SIR model simple model epidemiology. individuals population might three states: susceptible, infected recovered. Recovered people assumed immune disease. Susceptibles become infected rate depends number infected neighbors. Infected people become recovered constant rate. function sir() simulates model. function runs multiple simulations, starting single uniformly randomly chosen infected individual. simulation stopped infected individuals left. Function time_bins() bins simulation steps, using Freedman-Diaconis heuristics determine bin width. Function median quantile calculate median quantiles results, respectively, bins calculated time_bins().","code":""},{"path":"https://r.igraph.org/reference/sir.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"SIR model on graphs — time_bins","text":"Bailey, Norman T. J. (1975). mathematical theory infectious diseases applications (2nd ed.). London: Griffin.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/sir.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"SIR model on graphs — time_bins","text":"Gabor Csardi csardi.gabor@gmail.com. Eric Kolaczyk (http://math.bu.edu/people/kolaczyk/) wrote initial version R.","code":""},{"path":"https://r.igraph.org/reference/sir.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"SIR model on graphs — time_bins","text":"","code":"g <- sample_gnm(100, 100) sm <- sir(g, beta = 5, gamma = 1) plot(sm)"},{"path":"https://r.igraph.org/reference/spectrum.html","id":null,"dir":"Reference","previous_headings":"","what":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"Calculate selected eigenvalues eigenvectors (supposedly sparse) graph.","code":""},{"path":"https://r.igraph.org/reference/spectrum.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"","code":"spectrum( graph, algorithm = c(\"arpack\", \"auto\", \"lapack\", \"comp_auto\", \"comp_lapack\", \"comp_arpack\"), which = list(), options = arpack_defaults() )"},{"path":"https://r.igraph.org/reference/spectrum.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"graph input graph, can directed undirected. algorithm algorithm use. Currently arpack implemented, uses ARPACK solver. See also arpack(). list specify eigenvalues eigenvectors calculate. default leading (.e. largest magnitude) eigenvalue corresponding eigenvector calculated. options Options ARPACK solver. See arpack_defaults().","code":""},{"path":"https://r.igraph.org/reference/spectrum.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"Depends algorithm used. arpack list three entries returned: options See return value arpack() complete description. values Numeric vector, eigenvalues. vectors Numeric matrix, eigenvectors columns.","code":""},{"path":"https://r.igraph.org/reference/spectrum.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"argument list specifies eigenvalues corresponding eigenvectors calculate: eight options: Eigenvalues largest magnitude. Set pos LM, howmany number eigenvalues want. Eigenvalues smallest magnitude. Set pos SM howmany number eigenvalues want. Largest eigenvalues. Set pos LA howmany number eigenvalues want. Smallest eigenvalues. Set pos SA howmany number eigenvalues want. Eigenvalues ends spectrum. Set pos howmany number eigenvalues want. howmany odd, one eigenvalue returned larger end. Selected eigenvalues. (yet) implemented currently. Eigenvalues interval. (yet) implemented. eigenvalues. implemented yet. standard eigen function better job , anyway. Note ARPACK might unstable graphs multiple components, e.g. graphs isolate vertices.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/spectrum.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/spectrum.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Eigenvalues and eigenvectors of the adjacency matrix of a graph — spectrum","text":"","code":"## Small example graph, leading eigenvector by default kite <- make_graph(\"Krackhardt_kite\") spectrum(kite)[c(\"values\", \"vectors\")] #> $values #> [1] 4.306404 #> #> $vectors #> [,1] #> [1,] -0.35220940 #> [2,] -0.35220940 #> [3,] -0.28583499 #> [4,] -0.48102086 #> [5,] -0.28583499 #> [6,] -0.39769064 #> [7,] -0.39769064 #> [8,] -0.19586058 #> [9,] -0.04807349 #> [10,] -0.01116326 #> ## Double check eigen(as_adj(kite, sparse = FALSE))$vectors[, 1] #> [1] -0.35220940 -0.35220940 -0.28583499 -0.48102086 -0.28583499 -0.39769064 #> [7] -0.39769064 -0.19586058 -0.04807349 -0.01116326 ## Should be the same as 'eigen_centrality' (but rescaled) cor(eigen_centrality(kite)$vector, spectrum(kite)$vectors) #> [,1] #> [1,] -1 ## Smallest eigenvalues spectrum(kite, which = list(pos = \"SM\", howmany = 2))$values #> [1] -0.4043420 0.6403647"},{"path":"https://r.igraph.org/reference/spinglass.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Finding communities in graphs based on statistical meachanics — spinglass.community","title":"Finding communities in graphs based on statistical meachanics — spinglass.community","text":"spinglass.community() renamed cluster_spinglass() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/spinglass.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finding communities in graphs based on statistical meachanics — spinglass.community","text":"","code":"spinglass.community( graph, weights = NULL, vertex = NULL, spins = 25, parupdate = FALSE, start.temp = 1, stop.temp = 0.01, cool.fact = 0.99, update.rule = c(\"config\", \"random\", \"simple\"), gamma = 1, implementation = c(\"orig\", \"neg\"), gamma.minus = 1 )"},{"path":"https://r.igraph.org/reference/spinglass.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finding communities in graphs based on statistical meachanics — spinglass.community","text":"graph input graph, can directed direction edges neglected. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. larger edge weight means stronger connection function. vertex parameter can used calculate community given vertex without calculating communities. Note argument present arguments ignored. spins Integer constant, number spins use. upper limit number communities. problem supply (reasonably) big number , case spin states unpopulated. parupdate Logical constant, whether update spins vertices parallel (synchronously) . argument ignored second form function used (.e. ‘vertex’ argument present). also implemented “neg” implementation. start.temp Real constant, start temperature. argument ignored second form function used (.e. ‘vertex’ argument present). stop.temp Real constant, stop temperature. simulation terminates temperature lowers level. argument ignored second form function used (.e. ‘vertex’ argument present). cool.fact Cooling factor simulated annealing. argument ignored second form function used (.e. ‘vertex’ argument present). update.rule Character constant giving ‘null-model’ simulation. Possible values: “simple” “config”. “simple” uses random graph number edges baseline probability “config” uses random graph vertex degrees input graph. gamma Real constant, gamma argument algorithm. specifies balance importance present non-present edges community. Roughly, comunity set vertices many edges inside community edges outside community. default 1.0 value makes existing non-existing links equally important. Smaller values make existing links, greater values missing links important. implementation Character scalar. Currently igraph contains two implementations Spin-glass community finding algorithm. faster original implementation default. implementation, takes account negative weights, can chosen supplying ‘neg’ . gamma.minus Real constant, gamma.minus parameter algorithm. specifies balance importance present non-present negative weighted edges community. Smaller values gamma.minus, leads communities lesser negative intra-connectivity. argument set zero, algorithm reduces graph coloring algorithm, using number spins number colors. argument ignored ‘orig’ implementation chosen.","code":""},{"path":"https://r.igraph.org/reference/split_join_distance.html","id":null,"dir":"Reference","previous_headings":"","what":"Split-join distance of two community structures — split_join_distance","title":"Split-join distance of two community structures — split_join_distance","text":"split-join distance partitions B sum projection distance B projection distance B . projection distance asymmetric measure defined follows:","code":""},{"path":"https://r.igraph.org/reference/split_join_distance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split-join distance of two community structures — split_join_distance","text":"","code":"split_join_distance(comm1, comm2)"},{"path":"https://r.igraph.org/reference/split_join_distance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split-join distance of two community structures — split_join_distance","text":"comm1 first community structure. comm2 second community structure.","code":""},{"path":"https://r.igraph.org/reference/split_join_distance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split-join distance of two community structures — split_join_distance","text":"Two integer numbers, see details .","code":""},{"path":"https://r.igraph.org/reference/split_join_distance.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Split-join distance of two community structures — split_join_distance","text":"First, set partition evaluated sets partition B. set partition , best matching set partition B found overlap size calculated. (Matching quantified size overlap two sets). , maximal overlap sizes set summed together subtracted number elements . split-join distance returned two numbers, first projection distance first partition second, second number projection distance second partition first. makes easier detect whether partition subpartition , since case, corresponding distance zero.","code":""},{"path":"https://r.igraph.org/reference/split_join_distance.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Split-join distance of two community structures — split_join_distance","text":"van Dongen S: Performance criteria graph clustering Markov cluster experiments. Technical Report INS-R0012, National Research Institute Mathematics Computer Science Netherlands, Amsterdam, May 2000.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/stCuts.html","id":null,"dir":"Reference","previous_headings":"","what":"List all (s,t)-cuts of a graph — stCuts","title":"List all (s,t)-cuts of a graph — stCuts","text":"stCuts() renamed st_cuts() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/stCuts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all (s,t)-cuts of a graph — stCuts","text":"","code":"stCuts(graph, source, target)"},{"path":"https://r.igraph.org/reference/stCuts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List all (s,t)-cuts of a graph — stCuts","text":"graph input graph. must directed. source source vertex. target target vertex.","code":""},{"path":"https://r.igraph.org/reference/stMincuts.html","id":null,"dir":"Reference","previous_headings":"","what":"List all minimum \\((s,t)\\)-cuts of a graph — stMincuts","title":"List all minimum \\((s,t)\\)-cuts of a graph — stMincuts","text":"stMincuts() renamed st_min_cuts() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/stMincuts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all minimum \\((s,t)\\)-cuts of a graph — stMincuts","text":"","code":"stMincuts(graph, source, target, capacity = NULL)"},{"path":"https://r.igraph.org/reference/stMincuts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List all minimum \\((s,t)\\)-cuts of a graph — stMincuts","text":"graph input graph. must directed. source id source vertex. target id target vertex. capacity Numeric vector giving edge capacities. NULL graph weight edge attribute, attribute defines edge capacities. forcing unit edge capacities, even graphs weight edge attribute, supply NA .","code":""},{"path":"https://r.igraph.org/reference/st_cuts.html","id":null,"dir":"Reference","previous_headings":"","what":"List all (s,t)-cuts of a graph — st_cuts","title":"List all (s,t)-cuts of a graph — st_cuts","text":"List (s,t)-cuts directed graph.","code":""},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all (s,t)-cuts of a graph — st_cuts","text":"","code":"st_cuts(graph, source, target)"},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List all (s,t)-cuts of a graph — st_cuts","text":"graph input graph. must directed. source source vertex. target target vertex.","code":""},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List all (s,t)-cuts of a graph — st_cuts","text":"list entries: cuts list numeric vectors containing edge ids. vector \\((s,t)\\)-cut. partition1s list numeric vectors containing vertex ids, correspond edge cuts. vertex set generator corresponding cut, .e. graph \\(G=(V,E)\\), vertex set \\(X\\) complementer \\(V-X\\), generates cut contains exactly edges go \\(X\\) \\(V-X\\).","code":""},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List all (s,t)-cuts of a graph — st_cuts","text":"Given \\(G\\) directed graph two, different non-ajacent vertices, \\(s\\) \\(t\\), \\((s,t)\\)-cut set edges, removing edges \\(G\\) directed path \\(s\\) \\(t\\).","code":""},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"List all (s,t)-cuts of a graph — st_cuts","text":"JS Provan DR Shier: Paradigm listing (s,t)-cuts graphs, Algorithmica 15, 351–372, 1996.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"List all (s,t)-cuts of a graph — st_cuts","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/st_cuts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List all (s,t)-cuts of a graph — st_cuts","text":"","code":"# A very simple graph g <- graph_from_literal(a -+ b -+ c -+ d -+ e) st_cuts(g, source = \"a\", target = \"e\") #> $cuts #> $cuts[[1]] #> + 1/4 edge from 0c1fe84 (vertex names): #> [1] a->b #> #> $cuts[[2]] #> + 1/4 edge from 0c1fe84 (vertex names): #> [1] b->c #> #> $cuts[[3]] #> + 1/4 edge from 0c1fe84 (vertex names): #> [1] c->d #> #> $cuts[[4]] #> + 1/4 edge from 0c1fe84 (vertex names): #> [1] d->e #> #> #> $partition1s #> $partition1s[[1]] #> + 1/5 vertex, named, from 0c1fe84: #> [1] a #> #> $partition1s[[2]] #> + 2/5 vertices, named, from 0c1fe84: #> [1] a b #> #> $partition1s[[3]] #> + 3/5 vertices, named, from 0c1fe84: #> [1] a b c #> #> $partition1s[[4]] #> + 4/5 vertices, named, from 0c1fe84: #> [1] a b c d #> #> # A somewhat more difficult graph g2 <- graph_from_literal( s --+ a:b, a:b --+ t, a --+ 1:2:3, 1:2:3 --+ b ) st_cuts(g2, source = \"s\", target = \"t\") #> $cuts #> $cuts[[1]] #> + 2/10 edges from 990fce4 (vertex names): #> [1] s->a s->b #> #> $cuts[[2]] #> + 2/10 edges from 990fce4 (vertex names): #> [1] s->a b->t #> #> $cuts[[3]] #> + 5/10 edges from 990fce4 (vertex names): #> [1] s->b a->t a->1 a->2 a->3 #> #> $cuts[[4]] #> + 5/10 edges from 990fce4 (vertex names): #> [1] s->b a->t a->1 a->2 3->b #> #> $cuts[[5]] #> + 5/10 edges from 990fce4 (vertex names): #> [1] s->b a->t a->1 a->3 2->b #> #> $cuts[[6]] #> + 5/10 edges from 990fce4 (vertex names): #> [1] s->b a->t a->1 2->b 3->b #> #> $cuts[[7]] #> + 5/10 edges from 990fce4 (vertex names): #> [1] s->b a->t a->2 a->3 1->b #> #> $cuts[[8]] #> + 5/10 edges from 990fce4 (vertex names): #> [1] s->b a->t a->2 1->b 3->b #> #> $cuts[[9]] #> + 5/10 edges from 990fce4 (vertex names): #> [1] s->b a->t a->3 1->b 2->b #> #> $cuts[[10]] #> + 5/10 edges from 990fce4 (vertex names): #> [1] s->b a->t 1->b 2->b 3->b #> #> $cuts[[11]] #> + 2/10 edges from 990fce4 (vertex names): #> [1] a->t b->t #> #> #> $partition1s #> $partition1s[[1]] #> + 1/7 vertex, named, from 990fce4: #> [1] s #> #> $partition1s[[2]] #> + 2/7 vertices, named, from 990fce4: #> [1] s b #> #> $partition1s[[3]] #> + 2/7 vertices, named, from 990fce4: #> [1] s a #> #> $partition1s[[4]] #> + 3/7 vertices, named, from 990fce4: #> [1] s a 3 #> #> $partition1s[[5]] #> + 3/7 vertices, named, from 990fce4: #> [1] s a 2 #> #> $partition1s[[6]] #> + 4/7 vertices, named, from 990fce4: #> [1] s a 2 3 #> #> $partition1s[[7]] #> + 3/7 vertices, named, from 990fce4: #> [1] s a 1 #> #> $partition1s[[8]] #> + 4/7 vertices, named, from 990fce4: #> [1] s a 1 3 #> #> $partition1s[[9]] #> + 4/7 vertices, named, from 990fce4: #> [1] s a 1 2 #> #> $partition1s[[10]] #> + 5/7 vertices, named, from 990fce4: #> [1] s a 1 2 3 #> #> $partition1s[[11]] #> + 6/7 vertices, named, from 990fce4: #> [1] s a 1 2 3 b #> #>"},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":null,"dir":"Reference","previous_headings":"","what":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"Listing minimum \\((s,t)\\)-cuts directed graph, given \\(s\\) \\(t\\).","code":""},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"","code":"st_min_cuts(graph, source, target, capacity = NULL)"},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"graph input graph. must directed. source id source vertex. target id target vertex. capacity Numeric vector giving edge capacities. NULL graph weight edge attribute, attribute defines edge capacities. forcing unit edge capacities, even graphs weight edge attribute, supply NA .","code":""},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"list entries: value Numeric scalar, size minimum cut(s). cuts list numeric vectors containing edge ids. vector minimum \\((s,t)\\)-cut. partition1s list numeric vectors containing vertex ids, correspond edge cuts. vertex set generator corresponding cut, .e. graph \\(G=(V,E)\\), vertex set \\(X\\) complementer \\(V-X\\), generates cut contains exactly edges go \\(X\\) \\(V-X\\).","code":""},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"Given \\(G\\) directed graph two, different non-ajacent vertices, \\(s\\) \\(t\\), \\((s,t)\\)-cut set edges, removing edges \\(G\\) directed path \\(s\\) \\(t\\). size \\((s,t)\\)-cut defined sum capacities (weights) cut. unweighted (=equally weighted) graphs, simply number edges. \\((s,t)\\)-cut minimum smallest possible size.","code":""},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"JS Provan DR Shier: Paradigm listing (s,t)-cuts graphs, Algorithmica 15, 351–372, 1996.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/st_min_cuts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List all minimum \\((s,t)\\)-cuts of a graph — st_min_cuts","text":"","code":"# A difficult graph, from the Provan-Shier paper g <- graph_from_literal( s --+ a:b, a:b --+ t, a --+ 1:2:3:4:5, 1:2:3:4:5 --+ b ) st_min_cuts(g, source = \"s\", target = \"t\") #> $value #> [1] 2 #> #> $cuts #> $cuts[[1]] #> + 2/14 edges from 6e7f990 (vertex names): #> [1] s->a s->b #> #> $cuts[[2]] #> + 2/14 edges from 6e7f990 (vertex names): #> [1] s->b a->t #> #> $cuts[[3]] #> + 2/14 edges from 6e7f990 (vertex names): #> [1] s->a b->t #> #> $cuts[[4]] #> + 2/14 edges from 6e7f990 (vertex names): #> [1] a->t b->t #> #> #> $partition1s #> $partition1s[[1]] #> + 1/9 vertex, named, from 6e7f990: #> [1] s #> #> $partition1s[[2]] #> + 7/9 vertices, named, from 6e7f990: #> [1] s a 5 4 3 2 1 #> #> $partition1s[[3]] #> + 2/9 vertices, named, from 6e7f990: #> [1] s b #> #> $partition1s[[4]] #> + 8/9 vertices, named, from 6e7f990: #> [1] s b a 5 4 3 2 1 #> #>"},{"path":"https://r.igraph.org/reference/static.fitness.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Random graphs from vertex fitness scores — static.fitness.game","title":"Random graphs from vertex fitness scores — static.fitness.game","text":"static.fitness.game() renamed sample_fitness() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/static.fitness.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random graphs from vertex fitness scores — static.fitness.game","text":"","code":"static.fitness.game( no.of.edges, fitness.out, fitness.in = NULL, loops = FALSE, multiple = FALSE )"},{"path":"https://r.igraph.org/reference/static.fitness.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Random graphs from vertex fitness scores — static.fitness.game","text":"..edges number edges generated graph. fitness.numeric vector containing fitness vertex. directed graphs, specifies -fitness vertex. fitness.NULL (default), generated graph undirected. NULL, numeric vector specifies -fitness vertex. argument NULL, directed graph generated, otherwise undirected one. loops Logical scalar, whether allow loop edges graph. multiple Logical scalar, whether allow multiple edges graph.","code":""},{"path":"https://r.igraph.org/reference/static.power.law.game.html","id":null,"dir":"Reference","previous_headings":"","what":"Scale-free random graphs, from vertex fitness scores — static.power.law.game","title":"Scale-free random graphs, from vertex fitness scores — static.power.law.game","text":"static.power.law.game() renamed sample_fitness_pl() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/static.power.law.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scale-free random graphs, from vertex fitness scores — static.power.law.game","text":"","code":"static.power.law.game( no.of.nodes, no.of.edges, exponent.out, exponent.in = -1, loops = FALSE, multiple = FALSE, finite.size.correction = TRUE )"},{"path":"https://r.igraph.org/reference/static.power.law.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scale-free random graphs, from vertex fitness scores — static.power.law.game","text":"..nodes number vertices generated graph. ..edges number edges generated graph. exponent.Numeric scalar, power law exponent degree distribution. directed graphs, specifies exponent -degree distribution. must greater equal 2. pass Inf , get back Erdős-Rényi random network. exponent.Numeric scalar. negative, generated graph undirected. greater equal 2, argument specifies exponent -degree distribution. non-negative less 2, error generated. loops Logical scalar, whether allow loop edges generated graph. multiple Logical scalar, whether allow multiple edges generated graph. finite.size.correction Logical scalar, whether use proposed finite size correction Cho et al., see references .","code":""},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Stochastic matrix of a graph — stochastic_matrix","title":"Stochastic matrix of a graph — stochastic_matrix","text":"Retrieves stochastic matrix graph class igraph.","code":""},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stochastic matrix of a graph — stochastic_matrix","text":"","code":"stochastic_matrix( graph, column.wise = FALSE, sparse = igraph_opt(\"sparsematrices\") )"},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stochastic matrix of a graph — stochastic_matrix","text":"graph input graph. Must class igraph. column.wise FALSE, rows stochastic matrix sum one; otherwise columns. sparse Logical scalar, whether return sparse matrix. Matrix package needed sparse matrices.","code":""},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Stochastic matrix of a graph — stochastic_matrix","text":"regular matrix matrix class Matrix sparse argument TRUE.","code":""},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Stochastic matrix of a graph — stochastic_matrix","text":"Let \\(M\\) \\(n \\times n\\) adjacency matrix real non-negative entries. Let us define \\(D = \\textrm{diag}(\\sum_{}M_{1i}, \\dots, \\sum_{}M_{ni})\\) (row) stochastic matrix defined $$W = D^{-1}M,$$ assumed \\(D\\) non-singular. Column stochastic matrices defined symmetric way.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Stochastic matrix of a graph — stochastic_matrix","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/stochastic_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Stochastic matrix of a graph — stochastic_matrix","text":"","code":"library(Matrix) ## g is a large sparse graph g <- sample_pa(n = 10^5, power = 2, directed = FALSE) W <- stochastic_matrix(g, sparse = TRUE) ## a dense matrix here would probably not fit in the memory class(W) #> [1] \"dgCMatrix\" #> attr(,\"package\") #> [1] \"Matrix\" ## may not be exactly 1, due to numerical errors max(abs(rowSums(W)) - 1) #> [1] 5.651035e-13"},{"path":"https://r.igraph.org/reference/strength.html","id":null,"dir":"Reference","previous_headings":"","what":"Strength or weighted vertex degree — strength","title":"Strength or weighted vertex degree — strength","text":"Summing edge weights adjacent edges vertex.","code":""},{"path":"https://r.igraph.org/reference/strength.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Strength or weighted vertex degree — strength","text":"","code":"strength( graph, vids = V(graph), mode = c(\"all\", \"out\", \"in\", \"total\"), loops = TRUE, weights = NULL )"},{"path":"https://r.igraph.org/reference/strength.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Strength or weighted vertex degree — strength","text":"graph input graph. vids vertices strength calculated. mode Character string, “” -degree, “” -degree “” sum two. undirected graphs argument ignored. loops Logical; whether loop edges also counted. weights Weight vector. graph weight edge attribute, used default. graph weight edge attribute argument NULL, degree() called. NA, edge weights used (even graph weight edge attribute).","code":""},{"path":"https://r.igraph.org/reference/strength.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Strength or weighted vertex degree — strength","text":"numeric vector giving strength vertices.","code":""},{"path":"https://r.igraph.org/reference/strength.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Strength or weighted vertex degree — strength","text":"Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras, Alessandro Vespignani: architecture complex weighted networks, Proc. Natl. Acad. Sci. USA 101, 3747 (2004)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/strength.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Strength or weighted vertex degree — strength","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/strength.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Strength or weighted vertex degree — strength","text":"","code":"g <- make_star(10) E(g)$weight <- seq(ecount(g)) strength(g) #> [1] 45 1 2 3 4 5 6 7 8 9 strength(g, mode = \"out\") #> [1] 0 1 2 3 4 5 6 7 8 9 strength(g, mode = \"in\") #> [1] 45 0 0 0 0 0 0 0 0 0 # No weights g <- make_ring(10) strength(g) #> [1] 2 2 2 2 2 2 2 2 2 2"},{"path":"https://r.igraph.org/reference/sub-.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Query and manipulate a graph as it were an adjacency matrix — [.igraph","title":"Query and manipulate a graph as it were an adjacency matrix — [.igraph","text":"Query manipulate graph adjacency matrix","code":""},{"path":"https://r.igraph.org/reference/sub-.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query and manipulate a graph as it were an adjacency matrix — [.igraph","text":"","code":"# S3 method for class 'igraph' `[`( x, i, j, ..., from, to, sparse = igraph_opt(\"sparsematrices\"), edges = FALSE, drop = TRUE, attr = if (is_weighted(x)) \"weight\" else NULL )"},{"path":"https://r.igraph.org/reference/sub-.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query and manipulate a graph as it were an adjacency matrix — [.igraph","text":"x graph. Index. Vertex ids names logical vectors. See details . j Index. Vertex ids names logical vectors. See details . ... Currently ignored. numeric character vector giving vertex ids names. Together argument, can used query/set sequence edges. See details . argument present together j arguments present, argument must present well. numeric character vector giving vertex ids names. Together argument, can used query/set sequence edges. See details . argument present together j arguments present, argument must present well. sparse Logical scalar, whether return sparse matrices. edges Logical scalar, whether return edge ids. drop Ignored. attr NULL, name edge attribute. attribute queried returned.","code":""},{"path":"https://r.igraph.org/reference/sub-.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query and manipulate a graph as it were an adjacency matrix — [.igraph","text":"scalar matrix. See details .","code":""},{"path":"https://r.igraph.org/reference/sub-.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Query and manipulate a graph as it were an adjacency matrix — [.igraph","text":"single bracket indexes (possibly weighted) adjacency matrix graph. can : Check whether edge two vertices (\\(v\\) \\(w\\)) graph: numeric scalar returned, one edge exists, zero otherwise. Extract (sparse) adjacency matrix graph, part : first variants returns full adjacency matrix, two return part . arguments can used check existence many edges. case, must present must length. must contain vertex ids names. numeric vector returned, length , contains ones existing edges edges zeros non-existing ones. Example: . weighted graphs, [ operator returns edge weights. non-esistent edges zero weights returned. edge attributes can queried well, giving attr argument. Querying edge ids instead existance edges edge attributes. E.g. returns id edge vertices 1 2, zero edge. Adding one edges graph. element(s) imaginary adjacency matrix must set non-zero numeric value (TRUE): affect edges already present graph, .e. multiple edges created. Adding weighted edges graph. attr argument contains name edge attribute set, ‘weight’: edge already present network, weights attribute updated. graph already weighted, attr=\"weight\" setting implicit, one need give explicitly. Deleting edges. replacement syntax allow deletion edges, specifying FALSE NULL replacement value: removes edge vertex \\(v\\) vertex \\(w\\). can used delete edges two sets vertices, either pairwise: : \\(v\\) \\(w\\) vectors edge ids names. ‘[’ allows logical indices negative indices well, usual R semantics. E.g. adds edge every isolate vertex vertex one, creates star graph. course, indexing operators support vertex names, instead numeric vertex id vertex can also given ‘[’ ‘[[’.","code":"graph[v, w] graph[] graph[1:3,5:6] graph[c(1,3,5),] graph[from=1:3, to=c(2,3,5)] graph[1, 2, edges=TRUE] graph[1, 2] <- 1 graph[1:3,1] <- 1 graph[from=1:3, to=c(2,3,5)] <- TRUE graph[1, 2, attr=\"weight\"]<- 5 graph[from=1:3, to=c(2,3,5)] <- c(1,-1,4) graph[v, w] <- FALSE graph[from=v, to=w] <- FALSE graph[v, w] <- FALSE graph[degree(graph)==0, 1] <- 1 G <- make_empty_graph(10) G[-1,1] <- TRUE"},{"path":[]},{"path":"https://r.igraph.org/reference/sub-sub-.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Query and manipulate a graph as it were an adjacency list — [[.igraph","title":"Query and manipulate a graph as it were an adjacency list — [[.igraph","text":"Query manipulate graph adjacency list","code":""},{"path":"https://r.igraph.org/reference/sub-sub-.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query and manipulate a graph as it were an adjacency list — [[.igraph","text":"","code":"# S3 method for class 'igraph' x[[i, j, from, to, ..., directed = TRUE, edges = FALSE, exact = TRUE]]"},{"path":"https://r.igraph.org/reference/sub-sub-.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query and manipulate a graph as it were an adjacency list — [[.igraph","text":"x graph. Index, integer, character logical, see details . j Index, integer, character logical, see details . numeric character vector giving vertex ids names. Together argument, can used query/set sequence edges. See details . argument present together j arguments present, argument must present well. numeric character vector giving vertex ids names. Together argument, can used query/set sequence edges. See details . argument present together j arguments present, argument must present well. ... Additional arguments used currently. directed Logical scalar, whether consider edge directions directed graphs. ignored undirected graphs. edges Logical scalar, whether return edge ids. exact Ignored.","code":""},{"path":"https://r.igraph.org/reference/sub-sub-.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Query and manipulate a graph as it were an adjacency list — [[.igraph","text":"double bracket operator indexes (imaginary) adjacency list graph. can used following operations: Querying adjacent vertices one vertices: first form gives successors, second predecessors 1:3 vertices. (undirected graphs equivalent.) Querying incident edges one vertices, edges argument set TRUE: Querying edge ids two sets vertices, indices used. E.g. gives edge ids edges exist vertices \\(v\\) vertices \\(w\\). alternative argument names can used instead usual j, make code readable: ‘[[’ operators allows logical indices negative indices well, usual R semantics. Vertex names also supported, instead numeric vertex id vertex can also given ‘[’ ‘[[’.","code":"graph[[1:3,]] graph[[,1:3]] graph[[1:3, , edges=TRUE]] graph[[, 1:3, edges=TRUE]] graph[[v, w, edges=TRUE]] graph[[from = 1:3]] graph[[from = v, to = w, edges = TRUE]]"},{"path":[]},{"path":"https://r.igraph.org/reference/subcomponent.html","id":null,"dir":"Reference","previous_headings":"","what":"In- or out- component of a vertex — subcomponent","title":"In- or out- component of a vertex — subcomponent","text":"Finds vertices reachable given vertex, opposite: vertices given vertex reachable via directed path.","code":""},{"path":"https://r.igraph.org/reference/subcomponent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"In- or out- component of a vertex — subcomponent","text":"","code":"subcomponent(graph, v, mode = c(\"all\", \"out\", \"in\"))"},{"path":"https://r.igraph.org/reference/subcomponent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"In- or out- component of a vertex — subcomponent","text":"graph graph analyze. v vertex start search . mode Character string, either “”, “” “”. “” vertices v reachable listed. “” vertices reachable v returned. “” returns union . ignored undirected graphs.","code":""},{"path":"https://r.igraph.org/reference/subcomponent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"In- or out- component of a vertex — subcomponent","text":"Numeric vector, ids vertices component v.","code":""},{"path":"https://r.igraph.org/reference/subcomponent.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"In- or out- component of a vertex — subcomponent","text":"breadth-first search conducted starting vertex v.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/subcomponent.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"In- or out- component of a vertex — subcomponent","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/subcomponent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"In- or out- component of a vertex — subcomponent","text":"","code":"g <- sample_gnp(100, 1 / 200) subcomponent(g, 1, \"in\") #> + 1/100 vertex, from d393a64: #> [1] 1 subcomponent(g, 1, \"out\") #> + 1/100 vertex, from d393a64: #> [1] 1 subcomponent(g, 1, \"all\") #> + 1/100 vertex, from d393a64: #> [1] 1"},{"path":"https://r.igraph.org/reference/subgraph.centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Find subgraph centrality scores of network positions — subgraph.centrality","title":"Find subgraph centrality scores of network positions — subgraph.centrality","text":"subgraph.centrality() renamed subgraph_centrality() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/subgraph.centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find subgraph centrality scores of network positions — subgraph.centrality","text":"","code":"subgraph.centrality(graph, diag = FALSE)"},{"path":"https://r.igraph.org/reference/subgraph.centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find subgraph centrality scores of network positions — subgraph.centrality","text":"graph input graph, undirected, implementation check currently. diag Boolean scalar, whether include diagonal adjacency matrix analysis. Giving FALSE effectively eliminates loops edges graph calculation.","code":""},{"path":"https://r.igraph.org/reference/subgraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Subgraph of a graph — subgraph","title":"Subgraph of a graph — subgraph","text":"subgraph() creates subgraph graph, containing specified vertices edges among .","code":""},{"path":"https://r.igraph.org/reference/subgraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subgraph of a graph — subgraph","text":"","code":"subgraph(graph, vids) induced_subgraph( graph, vids, impl = c(\"auto\", \"copy_and_delete\", \"create_from_scratch\") ) subgraph.edges(graph, eids, delete.vertices = TRUE)"},{"path":"https://r.igraph.org/reference/subgraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subgraph of a graph — subgraph","text":"graph original graph. vids Numeric vector, vertices original graph form subgraph. impl Character scalar, choose two implementation subgraph calculation. ‘copy_and_delete’ copies graph first, deletes vertices edges included result graph. ‘create_from_scratch’ searches vertices edges must kept uses create graph scratch. ‘auto’ chooses two implementations automatically, using heuristics based size original result graph. eids edge ids edges kept result graph. delete.vertices Logical scalar, whether remove vertices adjacent edges eids.","code":""},{"path":"https://r.igraph.org/reference/subgraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subgraph of a graph — subgraph","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/subgraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Subgraph of a graph — subgraph","text":"induced_subgraph() calculates induced subgraph set vertices graph. means exactly specified vertices edges kept result graph. subgraph.edges() calculates subgraph graph. function one can specify vertices edges keep. function renamed subgraph() next major version igraph. subgraph() function currently induced_subgraph() (assuming ‘auto’ impl argument), behaviour deprecated. next major version, subgraph() overtake functionality subgraph.edges().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/subgraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subgraph of a graph — subgraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/subgraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subgraph of a graph — subgraph","text":"","code":"g <- make_ring(10) g2 <- induced_subgraph(g, 1:7) g3 <- subgraph.edges(g, 1:5)"},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":null,"dir":"Reference","previous_headings":"","what":"Find subgraph centrality scores of network positions — subgraph_centrality","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"Subgraph centrality vertex measures number subgraphs vertex participates , weighting according size.","code":""},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"","code":"subgraph_centrality(graph, diag = FALSE)"},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"graph input graph, undirected, implementation check currently. diag Boolean scalar, whether include diagonal adjacency matrix analysis. Giving FALSE effectively eliminates loops edges graph calculation.","code":""},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"numeric vector, subgraph centrality scores vertices.","code":""},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"subgraph centrality vertex defined number closed loops originating vertex, longer loops exponentially downweighted. Currently calculation performed explicitly calculating eigenvalues eigenvectors adjacency matrix graph. effectively means measure can calculated small graphs.","code":""},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"Ernesto Estrada, Juan . Rodriguez-Velazquez: Subgraph centrality Complex Networks. Physical Review E 71, 056103 (2005).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"Gabor Csardi csardi.gabor@gmail.com based Matlab code Ernesto Estrada","code":""},{"path":"https://r.igraph.org/reference/subgraph_centrality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find subgraph centrality scores of network positions — subgraph_centrality","text":"","code":"g <- sample_pa(100, m = 4, dir = FALSE) sc <- subgraph_centrality(g) cor(degree(g), sc) #> [1] 0.929038"},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":null,"dir":"Reference","previous_headings":"","what":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"Decide graph subgraph isomorphic another one","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"","code":"subgraph_isomorphic(pattern, target, method = c(\"auto\", \"lad\", \"vf2\"), ...) is_subgraph_isomorphic_to( pattern, target, method = c(\"auto\", \"lad\", \"vf2\"), ... )"},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"pattern smaller graph, might directed undirected. Undirected graphs treated directed graphs mutual edges. target bigger graph, might directed undirected. Undirected graphs treated directed graphs mutual edges. method method use. Possible values: ‘auto’, ‘lad’, ‘vf2’. See details . ... Additional arguments, passed various methods.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"Logical scalar, TRUE pattern isomorphic (possibly induced) subgraph target.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"-auto-method","dir":"Reference","previous_headings":"","what":"‘auto’ method","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"method currently selects ‘lad’, always, seems superior graphs.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"-lad-method","dir":"Reference","previous_headings":"","what":"‘lad’ method","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"LAD algorithm Solnon, see reference . following extra arguments: domains NULL, specifies matching restrictions. must list target vertex sets, given numeric vertex ids symbolic vertex names. length list must vcount(pattern) vertex pattern gives allowed matching vertices target. Defaults NULL. induced Logical scalar, whether search induced subgraph. FALSE default. time.limit processor time limit computation, seconds. defaults Inf, means limit.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"-vf-method","dir":"Reference","previous_headings":"","what":"‘vf2’ method","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"method uses VF2 algorithm Cordella, Foggia et al., see references . supports vertex edge colors following extra arguments: vertex.color1, vertex.color2 Optional integer vectors giving colors vertices colored graph isomorphism. given, graph “color” vertex attribute, used. want ignore attributes, supply NULL arguments. See also examples . edge.color1, edge.color2 Optional integer vectors giving colors edges edge-colored (sub)graph isomorphism. given, graph “color” edge attribute, used. want ignore attributes, supply NULL arguments.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"LP Cordella, P Foggia, C Sansone, M Vento: improved algorithm matching large graphs, Proc. 3rd IAPR TC-15 Workshop Graphbased Representations Pattern Recognition, 149–159, 2001. C. Solnon: AllDifferent-based Filtering Subgraph Isomorphism, Artificial Intelligence 174(12-13):850–864, 2010.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/subgraph_isomorphic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decide if a graph is subgraph isomorphic to another one — subgraph_isomorphic","text":"","code":"# A LAD example pattern <- make_graph( ~ 1:2:3:4:5, 1 - 2:5, 2 - 1:5:3, 3 - 2:4, 4 - 3:5, 5 - 4:2:1 ) target <- make_graph( ~ 1:2:3:4:5:6:7:8:9, 1 - 2:5:7, 2 - 1:5:3, 3 - 2:4, 4 - 3:5:6:8:9, 5 - 1:2:4:6:7, 6 - 7:5:4:9, 7 - 1:5:6, 8 - 4:9, 9 - 6:4:8 ) domains <- list( `1` = c(1, 3, 9), `2` = c(5, 6, 7, 8), `3` = c(2, 4, 6, 7, 8, 9), `4` = c(1, 3, 9), `5` = c(2, 4, 8, 9) ) subgraph_isomorphisms(pattern, target) #> [[1]] #> + 5/9 vertices, named, from ca21702: #> [1] 2 1 7 6 5 #> #> [[2]] #> + 5/9 vertices, named, from ca21702: #> [1] 1 2 3 4 5 #> #> [[3]] #> + 5/9 vertices, named, from ca21702: #> [1] 6 4 3 2 5 #> #> [[4]] #> + 5/9 vertices, named, from ca21702: #> [1] 8 4 5 6 9 #> #> [[5]] #> + 5/9 vertices, named, from ca21702: #> [1] 5 4 8 9 6 #> #> [[6]] #> + 5/9 vertices, named, from ca21702: #> [1] 9 4 5 7 6 #> #> [[7]] #> + 5/9 vertices, named, from ca21702: #> [1] 1 5 4 6 7 #> #> [[8]] #> + 5/9 vertices, named, from ca21702: #> [1] 1 5 4 3 2 #> #> [[9]] #> + 5/9 vertices, named, from ca21702: #> [1] 4 5 1 7 6 #> #> [[10]] #> + 5/9 vertices, named, from ca21702: #> [1] 7 5 4 9 6 #> #> [[11]] #> + 5/9 vertices, named, from ca21702: #> [1] 6 5 2 3 4 #> #> [[12]] #> + 5/9 vertices, named, from ca21702: #> [1] 6 5 2 1 7 #> #> [[13]] #> + 5/9 vertices, named, from ca21702: #> [1] 2 5 6 7 1 #> #> [[14]] #> + 5/9 vertices, named, from ca21702: #> [1] 9 6 7 5 4 #> #> [[15]] #> + 5/9 vertices, named, from ca21702: #> [1] 5 6 9 8 4 #> #> [[16]] #> + 5/9 vertices, named, from ca21702: #> [1] 4 6 7 1 5 #> #> [[17]] #> + 5/9 vertices, named, from ca21702: #> [1] 7 6 9 4 5 #> #> [[18]] #> + 5/9 vertices, named, from ca21702: #> [1] 1 7 6 4 5 #> #> [[19]] #> + 5/9 vertices, named, from ca21702: #> [1] 6 7 1 2 5 #> #> [[20]] #> + 5/9 vertices, named, from ca21702: #> [1] 8 9 6 5 4 #> subgraph_isomorphisms(pattern, target, induced = TRUE) #> [[1]] #> + 5/9 vertices, named, from ca21702: #> [1] 1 2 3 4 5 #> #> [[2]] #> + 5/9 vertices, named, from ca21702: #> [1] 6 4 3 2 5 #> #> [[3]] #> + 5/9 vertices, named, from ca21702: #> [1] 6 5 2 3 4 #> #> [[4]] #> + 5/9 vertices, named, from ca21702: #> [1] 1 5 4 3 2 #> subgraph_isomorphisms(pattern, target, domains = domains) #> [[1]] #> + 5/9 vertices, named, from ca21702: #> [1] 1 5 4 3 2 #> # Directed LAD example pattern <- make_graph(~ 1:2:3, 1 -+ 2:3) dring <- make_ring(10, directed = TRUE) subgraph_isomorphic(pattern, dring) #> [1] FALSE"},{"path":"https://r.igraph.org/reference/subgraph_isomorphisms.html","id":null,"dir":"Reference","previous_headings":"","what":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","title":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","text":"isomorphic mappings graph subgraphs another graph","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphisms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","text":"","code":"subgraph_isomorphisms(pattern, target, method = c(\"lad\", \"vf2\"), ...)"},{"path":"https://r.igraph.org/reference/subgraph_isomorphisms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","text":"pattern smaller graph, might directed undirected. Undirected graphs treated directed graphs mutual edges. target bigger graph, might directed undirected. Undirected graphs treated directed graphs mutual edges. method method use. Possible values: ‘auto’, ‘lad’, ‘vf2’. See details . ... Additional arguments, passed various methods.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphisms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","text":"list vertex sequences, corresponding mappings first graph second.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphisms.html","id":"-lad-method","dir":"Reference","previous_headings":"","what":"‘lad’ method","title":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","text":"LAD algorithm Solnon, see reference . following extra arguments: domains NULL, specifies matching restrictions. must list target vertex sets, given numeric vertex ids symbolic vertex names. length list must vcount(pattern) vertex pattern gives allowed matching vertices target. Defaults NULL. induced Logical scalar, whether search induced subgraph. FALSE default. time.limit processor time limit computation, seconds. defaults Inf, means limit.","code":""},{"path":"https://r.igraph.org/reference/subgraph_isomorphisms.html","id":"-vf-method","dir":"Reference","previous_headings":"","what":"‘vf2’ method","title":"All isomorphic mappings between a graph and subgraphs of another graph — subgraph_isomorphisms","text":"method uses VF2 algorithm Cordella, Foggia et al., see references . supports vertex edge colors following extra arguments: vertex.color1, vertex.color2 Optional integer vectors giving colors vertices colored graph isomorphism. given, graph “color” vertex attribute, used. want ignore attributes, supply NULL arguments. See also examples . edge.color1, edge.color2 Optional integer vectors giving colors edges edge-colored (sub)graph isomorphism. given, graph “color” edge attribute, used. want ignore attributes, supply NULL arguments.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/tail_of.html","id":null,"dir":"Reference","previous_headings":"","what":"Tails of the edge(s) in a graph — tail_of","title":"Tails of the edge(s) in a graph — tail_of","text":"undirected graphs, head tail defined. case tail_of() returns vertices incident supplied edges, head_of() returns end(s) edge(s).","code":""},{"path":"https://r.igraph.org/reference/tail_of.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tails of the edge(s) in a graph — tail_of","text":"","code":"tail_of(graph, es)"},{"path":"https://r.igraph.org/reference/tail_of.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tails of the edge(s) in a graph — tail_of","text":"graph input graph. es edges query.","code":""},{"path":"https://r.igraph.org/reference/tail_of.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tails of the edge(s) in a graph — tail_of","text":"vertex sequence tail(s) edge(s).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/tkigraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Experimental basic igraph GUI — tkigraph","title":"Experimental basic igraph GUI — tkigraph","text":"functions starts experimental GUI igraph functions. GUI written Tcl/Tk, cross platform.","code":""},{"path":"https://r.igraph.org/reference/tkigraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Experimental basic igraph GUI — tkigraph","text":"","code":"tkigraph()"},{"path":"https://r.igraph.org/reference/tkigraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Experimental basic igraph GUI — tkigraph","text":"Returns NULL, invisibly.","code":""},{"path":"https://r.igraph.org/reference/tkigraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Experimental basic igraph GUI — tkigraph","text":"tkigraph() online help system, please see details use .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/tkigraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Experimental basic igraph GUI — tkigraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/tkplot.canvas.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.canvas","title":"Interactive plotting of graphs — tkplot.canvas","text":"tkplot.canvas() renamed tk_canvas() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.canvas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.canvas","text":"","code":"tkplot.canvas(tkp.id)"},{"path":"https://r.igraph.org/reference/tkplot.canvas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.canvas","text":"tkp.id id tkplot window close/reshape/etc.","code":""},{"path":"https://r.igraph.org/reference/tkplot.center.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.center","title":"Interactive plotting of graphs — tkplot.center","text":"tkplot.center() renamed tk_center() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.center.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.center","text":"","code":"tkplot.center(tkp.id)"},{"path":"https://r.igraph.org/reference/tkplot.center.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.center","text":"tkp.id id tkplot window close/reshape/etc.","code":""},{"path":"https://r.igraph.org/reference/tkplot.close.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.close","title":"Interactive plotting of graphs — tkplot.close","text":"tkplot.close() renamed tk_close() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.close.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.close","text":"","code":"tkplot.close(tkp.id, window.close = TRUE)"},{"path":"https://r.igraph.org/reference/tkplot.close.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.close","text":"tkp.id id tkplot window close/reshape/etc. window.close Leave default value.","code":""},{"path":"https://r.igraph.org/reference/tkplot.export.postscript.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.export.postscript","title":"Interactive plotting of graphs — tkplot.export.postscript","text":"tkplot.export.postscript() renamed tk_postscript() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.export.postscript.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.export.postscript","text":"","code":"tkplot.export.postscript(tkp.id)"},{"path":"https://r.igraph.org/reference/tkplot.export.postscript.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.export.postscript","text":"tkp.id id tkplot window close/reshape/etc.","code":""},{"path":"https://r.igraph.org/reference/tkplot.fit.to.screen.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.fit.to.screen","title":"Interactive plotting of graphs — tkplot.fit.to.screen","text":"tkplot.fit..screen() renamed tk_fit() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.fit.to.screen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.fit.to.screen","text":"","code":"tkplot.fit.to.screen(tkp.id, width = NULL, height = NULL)"},{"path":"https://r.igraph.org/reference/tkplot.fit.to.screen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.fit.to.screen","text":"tkp.id id tkplot window close/reshape/etc. width width rectangle generating new coordinates. height height rectangle generating new coordinates.","code":""},{"path":"https://r.igraph.org/reference/tkplot.getcoords.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.getcoords","title":"Interactive plotting of graphs — tkplot.getcoords","text":"tkplot.getcoords() renamed tk_coords() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.getcoords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.getcoords","text":"","code":"tkplot.getcoords(tkp.id, norm = FALSE)"},{"path":"https://r.igraph.org/reference/tkplot.getcoords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.getcoords","text":"tkp.id id tkplot window close/reshape/etc. norm Logical, norm coordinates.","code":""},{"path":"https://r.igraph.org/reference/tkplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot","title":"Interactive plotting of graphs — tkplot","text":"tkplot() companion functions serve interactive graph drawing facility. parameters plot can changed interactively right now though, e.g. colors vertices, edges, also others pre-defined.","code":""},{"path":"https://r.igraph.org/reference/tkplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot","text":"","code":"tkplot(graph, canvas.width = 450, canvas.height = 450, ...) tk_close(tkp.id, window.close = TRUE) tk_off() tk_fit(tkp.id, width = NULL, height = NULL) tk_center(tkp.id) tk_reshape(tkp.id, newlayout, ..., params) tk_postscript(tkp.id) tk_coords(tkp.id, norm = FALSE) tk_set_coords(tkp.id, coords) tk_rotate(tkp.id, degree = NULL, rad = NULL) tk_canvas(tkp.id)"},{"path":"https://r.igraph.org/reference/tkplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot","text":"graph graph plot. canvas.width, canvas.height size tkplot drawing area. ... Additional plotting parameters. See igraph.plotting complete list. tkp.id id tkplot window close/reshape/etc. window.close Leave default value. width width rectangle generating new coordinates. height height rectangle generating new coordinates. newlayout new layout, see layout parameter tkplot. params Extra parameters list, pass layout function. norm Logical, norm coordinates. coords Two-column numeric matrix, new coordinates vertices, absolute coordinates. degree degree rotate plot. rad degree rotate plot, radian.","code":""},{"path":"https://r.igraph.org/reference/tkplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Interactive plotting of graphs — tkplot","text":"tkplot() returns integer, id plot, can used manipulate command line. tk_canvas() returns tkwin object, Tk canvas. tk_coords() returns matrix coordinates. tk_close(), tk_off(), tk_fit(), tk_reshape(), tk_postscript(), tk_center() tk_rotate() return NULL invisibly.","code":""},{"path":"https://r.igraph.org/reference/tkplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Interactive plotting of graphs — tkplot","text":"tkplot() interactive graph drawing facility. well developed stage, still useful. handling quite straightforward time, remarks hints. different popup menus, activated right mouse button, vertices edges. operate current selection vertex/edge cursor part selection operate vertex/edge cursor . One selection can active time, either vertex edge selection. vertex/edge can added selection holding control key clicking left mouse button. deselect vertex/edge. Selections can made also \"Select\" menu. \"Select vertices\" dialog allows give expression vertices selected: can list numeric R expessions separated commas, like 1,2:10,12,14,15 example. Similarly \"Select edges\" dialog two lists can given edges connecting vertex first list one second list selected. color dialog color name like 'orange' RGB notation can also used. tkplot() command creates new Tk window graphical representation graph. command returns integer number, tkplot id. commands utilize id able query manipulate plot. tk_close() closes Tk plot id tkp.id. tk_off() closes Tk plots. tk_fit() fits plot given rectangle (width height), NULL actual physical width od height plot window used. tk_reshape() applies new layout plot, optional parameters collected list analogous layout.par. tk_postscript() creates dialog window saving plot postscript format. tk_canvas() returns Tk canvas object belongs graph plot. canvas can directly manipulated , e.g. labels can added, saved file programmatically, etc. See example . tk_coords() returns coordinates vertices matrix. row corresponds one vertex. tk_set_coords() sets coordinates vertices. two-column matrix specifies new positions, row corresponding single vertex. tk_center() shifts figure center plot window. tk_rotate() rotates figure, parameter can given either degrees radians. tkplot.center tkplot.rotate","code":""},{"path":"https://r.igraph.org/reference/tkplot.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Interactive plotting of graphs — tkplot","text":"","code":"g <- make_ring(10) tkplot(g) ## Saving a tkplot() to a file programmatically g <- make_star(10, center=10) E(g)$width <- sample(1:10, ecount(g), replace=TRUE) lay <- layout_nicely(g) id <- tkplot(g, layout=lay) canvas <- tk_canvas(id) tcltk::tkpostscript(canvas, file=\"/tmp/output.eps\") tk_close(id) ## Setting the coordinates and adding a title label g <- make_ring(10) id <- tkplot(make_ring(10), canvas.width=450, canvas.height=500) canvas <- tk_canvas(id) padding <- 20 coords <- norm_coords(layout_in_circle(g), 0+padding, 450-padding, 50+padding, 500-padding) tk_set_coords(id, coords) width <- as.numeric(tkcget(canvas, \"-width\")) height <- as.numeric(tkcget(canvas, \"-height\")) tkcreate(canvas, \"text\", width/2, 25, text=\"My title\", justify=\"center\", font=tcltk::tkfont.create(family=\"helvetica\", size=20,weight=\"bold\"))"},{"path":[]},{"path":"https://r.igraph.org/reference/tkplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Interactive plotting of graphs — tkplot","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/tkplot.off.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.off","title":"Interactive plotting of graphs — tkplot.off","text":"tkplot.() renamed tk_off() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.off.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.off","text":"","code":"tkplot.off()"},{"path":"https://r.igraph.org/reference/tkplot.reshape.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.reshape","title":"Interactive plotting of graphs — tkplot.reshape","text":"tkplot.reshape() renamed tk_reshape() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.reshape.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.reshape","text":"","code":"tkplot.reshape(tkp.id, newlayout, ..., params)"},{"path":"https://r.igraph.org/reference/tkplot.reshape.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.reshape","text":"tkp.id id tkplot window close/reshape/etc. newlayout new layout, see layout parameter tkplot. ... Additional plotting parameters. See igraph.plotting complete list. params Extra parameters list, pass layout function.","code":""},{"path":"https://r.igraph.org/reference/tkplot.rotate.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.rotate","title":"Interactive plotting of graphs — tkplot.rotate","text":"tkplot.rotate() renamed tk_rotate() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.rotate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.rotate","text":"","code":"tkplot.rotate(tkp.id, degree = NULL, rad = NULL)"},{"path":"https://r.igraph.org/reference/tkplot.rotate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.rotate","text":"tkp.id id tkplot window close/reshape/etc. degree degree rotate plot. rad degree rotate plot, radian.","code":""},{"path":"https://r.igraph.org/reference/tkplot.setcoords.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive plotting of graphs — tkplot.setcoords","title":"Interactive plotting of graphs — tkplot.setcoords","text":"tkplot.setcoords() renamed tk_set_coords() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/tkplot.setcoords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive plotting of graphs — tkplot.setcoords","text":"","code":"tkplot.setcoords(tkp.id, coords)"},{"path":"https://r.igraph.org/reference/tkplot.setcoords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive plotting of graphs — tkplot.setcoords","text":"tkp.id id tkplot window close/reshape/etc. coords Two-column numeric matrix, new coordinates vertices, absolute coordinates.","code":""},{"path":"https://r.igraph.org/reference/to_prufer.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a tree graph to its Prüfer sequence — to_prufer","title":"Convert a tree graph to its Prüfer sequence — to_prufer","text":"to_prufer() converts tree graph Prüfer sequence.","code":""},{"path":"https://r.igraph.org/reference/to_prufer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a tree graph to its Prüfer sequence — to_prufer","text":"","code":"to_prufer(graph)"},{"path":"https://r.igraph.org/reference/to_prufer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a tree graph to its Prüfer sequence — to_prufer","text":"graph graph convert Prüfer sequence","code":""},{"path":"https://r.igraph.org/reference/to_prufer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a tree graph to its Prüfer sequence — to_prufer","text":"Prüfer sequence graph, represented numeric vector vertex IDs sequence.","code":""},{"path":"https://r.igraph.org/reference/to_prufer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert a tree graph to its Prüfer sequence — to_prufer","text":"Prüfer sequence tree graph n labeled vertices sequence n-2 numbers, constructed follows. graph two vertices, find vertex degree one, remove tree add label vertex connected sequence. Repeat two vertices remaining graph.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/to_prufer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a tree graph to its Prüfer sequence — to_prufer","text":"","code":"g <- make_tree(13, 3) to_prufer(g) #> [1] 2 2 2 1 3 3 3 1 4 4 4"},{"path":"https://r.igraph.org/reference/topo_sort.html","id":null,"dir":"Reference","previous_headings":"","what":"Topological sorting of vertices in a graph — topo_sort","title":"Topological sorting of vertices in a graph — topo_sort","text":"topological sorting directed acyclic graph linear ordering nodes node comes nodes edges.","code":""},{"path":"https://r.igraph.org/reference/topo_sort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Topological sorting of vertices in a graph — topo_sort","text":"","code":"topo_sort(graph, mode = c(\"out\", \"all\", \"in\"))"},{"path":"https://r.igraph.org/reference/topo_sort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Topological sorting of vertices in a graph — topo_sort","text":"graph input graph, directed mode Specifies use direction edges. “”, sorting order ensures node comes nodes edges, nodes incoming edges go first. “”, quite opposite: node comes nodes receives edges. Nodes outgoing edges go first.","code":""},{"path":"https://r.igraph.org/reference/topo_sort.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Topological sorting of vertices in a graph — topo_sort","text":"vertex sequence (default, see return.vs.es option igraph_options()) containing vertices topologically sorted order.","code":""},{"path":"https://r.igraph.org/reference/topo_sort.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Topological sorting of vertices in a graph — topo_sort","text":"Every DAG least one topological sort, may many. function returns possible topological sort among . graph acyclic (least one cycle), partial topological sort returned warning issued.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/topo_sort.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Topological sorting of vertices in a graph — topo_sort","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com R interface","code":""},{"path":"https://r.igraph.org/reference/topo_sort.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Topological sorting of vertices in a graph — topo_sort","text":"","code":"g <- sample_pa(100) topo_sort(g) #> + 100/100 vertices, from 0ab15a3: #> [1] 6 9 12 13 18 19 20 22 23 24 30 31 32 34 35 36 37 38 #> [19] 39 40 41 44 46 47 50 51 52 53 54 55 56 60 61 62 63 64 #> [37] 66 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 #> [55] 85 86 87 88 89 90 91 92 93 94 95 97 98 99 100 14 28 15 #> [73] 45 10 48 4 67 17 29 16 59 33 58 49 43 42 65 11 96 57 #> [91] 3 21 26 8 25 27 7 5 2 1"},{"path":"https://r.igraph.org/reference/topological.sort.html","id":null,"dir":"Reference","previous_headings":"","what":"Topological sorting of vertices in a graph — topological.sort","title":"Topological sorting of vertices in a graph — topological.sort","text":"topological.sort() renamed topo_sort() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/topological.sort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Topological sorting of vertices in a graph — topological.sort","text":"","code":"topological.sort(graph, mode = c(\"out\", \"all\", \"in\"))"},{"path":"https://r.igraph.org/reference/topological.sort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Topological sorting of vertices in a graph — topological.sort","text":"graph input graph, directed mode Specifies use direction edges. “”, sorting order ensures node comes nodes edges, nodes incoming edges go first. “”, quite opposite: node comes nodes receives edges. Nodes outgoing edges go first.","code":""},{"path":"https://r.igraph.org/reference/transitivity.html","id":null,"dir":"Reference","previous_headings":"","what":"Transitivity of a graph — transitivity","title":"Transitivity of a graph — transitivity","text":"Transitivity measures probability adjacent vertices vertex connected. sometimes also called clustering coefficient.","code":""},{"path":"https://r.igraph.org/reference/transitivity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transitivity of a graph — transitivity","text":"","code":"transitivity( graph, type = c(\"undirected\", \"global\", \"globalundirected\", \"localundirected\", \"local\", \"average\", \"localaverage\", \"localaverageundirected\", \"barrat\", \"weighted\"), vids = NULL, weights = NULL, isolates = c(\"NaN\", \"zero\") )"},{"path":"https://r.igraph.org/reference/transitivity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transitivity of a graph — transitivity","text":"graph graph analyze. type type transitivity calculate. Possible values: \"global\" global transitivity undirected graph. simply ratio count triangles connected triples graph. directed graphs, edge directions ignored. \"local\" local transitivity undirected graph. calculated vertex given vids argument. local transitivity vertex ratio count triangles connected vertex triples centered vertex. directed graphs, edge directions ignored. \"undirected\" global. \"globalundirected\" global. \"localundirected\" local. \"barrat\" weighted transitivity defined . Barrat. See details . \"weighted\" barrat. vids vertex ids local transitivity calculated. ignored global transitivity types. default value NULL, case vertices considered. slightly faster supply NULL V(graph). weights Optional weights weighted transitivity. ignored transitivity measures. NULL (default) graph weight edge attribute, used automatically. isolates Character scalar, local versions transitivity, defines treat vertices degree zero one. ‘NaN’ local transitivity reported NaN included averaging, transitivity types calculate average. vertices degree two higher, averaging still result NaN. ‘zero’, report 0 transitivity , included averaging, average calculated. global transitivity, controls handle graphs connected triplets: NaN zero returned according respective setting.","code":""},{"path":"https://r.igraph.org/reference/transitivity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Transitivity of a graph — transitivity","text":"‘global’ single number, NaN connected triples graph. ‘local’ vector transitivity scores, one vertex ‘vids’.","code":""},{"path":"https://r.igraph.org/reference/transitivity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Transitivity of a graph — transitivity","text":"Note essentially two classes transitivity measures, one vertex-level, graph level property. several generalizations transitivity weighted graphs, use definition . Barrat, local vertex-level quantity, formula $$C_i^w=\\frac{1}{s_i(k_i-1)}\\sum_{j,h}\\frac{w_{ij}+w_{ih}}{2}a_{ij}a_{ih}a_{jh}$$ \\(s_i\\) strength vertex \\(\\), see strength(), \\(a_{ij}\\) elements adjacency matrix, \\(k_i\\) vertex degree, \\(w_{ij}\\) weights. formula gives back normal -weighted local transitivity edge weights . barrat type transitivity work graphs multiple /loop edges. want calculate directed graph, call .undirected() collapse mode first.","code":""},{"path":"https://r.igraph.org/reference/transitivity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Transitivity of a graph — transitivity","text":"Wasserman, S., Faust, K. (1994). Social Network Analysis: Methods Applications. Cambridge: Cambridge University Press. Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras, Alessandro Vespignani: architecture complex weighted networks, Proc. Natl. Acad. Sci. USA 101, 3747 (2004)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/transitivity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Transitivity of a graph — transitivity","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/transitivity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Transitivity of a graph — transitivity","text":"","code":"g <- make_ring(10) transitivity(g) #> [1] 0 g2 <- sample_gnp(1000, 10 / 1000) transitivity(g2) # this is about 10/1000 #> [1] 0.01046946 # Weighted version, the figure from the Barrat paper gw <- graph_from_literal(A - B:C:D:E, B - C:D, C - D) E(gw)$weight <- 1 E(gw)[V(gw)[name == \"A\"] %--% V(gw)[name == \"E\"]]$weight <- 5 transitivity(gw, vids = \"A\", type = \"local\") #> A #> 0.5 transitivity(gw, vids = \"A\", type = \"weighted\") #> A #> 0.25 # Weighted reduces to \"local\" if weights are the same gw2 <- sample_gnp(1000, 10 / 1000) E(gw2)$weight <- 1 t1 <- transitivity(gw2, type = \"local\") t2 <- transitivity(gw2, type = \"weighted\") all(is.na(t1) == is.na(t2)) #> [1] TRUE all(na.omit(t1 == t2)) #> [1] FALSE"},{"path":"https://r.igraph.org/reference/triad.census.html","id":null,"dir":"Reference","previous_headings":"","what":"Triad census, subgraphs with three vertices — triad.census","title":"Triad census, subgraphs with three vertices — triad.census","text":"triad.census() renamed triad_census() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/triad.census.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Triad census, subgraphs with three vertices — triad.census","text":"","code":"triad.census(graph)"},{"path":"https://r.igraph.org/reference/triad.census.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Triad census, subgraphs with three vertices — triad.census","text":"graph input graph, directed. undirected graph results warning, undefined results.","code":""},{"path":"https://r.igraph.org/reference/triad_census.html","id":null,"dir":"Reference","previous_headings":"","what":"Triad census, subgraphs with three vertices — triad_census","title":"Triad census, subgraphs with three vertices — triad_census","text":"function counts different induced subgraphs three vertices graph.","code":""},{"path":"https://r.igraph.org/reference/triad_census.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Triad census, subgraphs with three vertices — triad_census","text":"","code":"triad_census(graph)"},{"path":"https://r.igraph.org/reference/triad_census.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Triad census, subgraphs with three vertices — triad_census","text":"graph input graph, directed. undirected graph results warning, undefined results.","code":""},{"path":"https://r.igraph.org/reference/triad_census.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Triad census, subgraphs with three vertices — triad_census","text":"numeric vector, subgraph counts, order given description.","code":""},{"path":"https://r.igraph.org/reference/triad_census.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Triad census, subgraphs with three vertices — triad_census","text":"Triad census defined David Leinhardt (see References ). Every triple vertices (, B, C) classified 16 possible states: 003 ,B,C, empty graph. 012 ->B, C, graph single directed edge. 102 <->B, C, graph mutual connection two vertices. 021D <-B->C, -star. 021U ->B<-C, -star. 021C ->B->C, directed line. 111D <->B<-C. 111U <->B->C. 030T ->B<-C, ->C. 030C <-B<-C, ->C. 201 <->B<->C. 120D <-B->C, <->C. 120U ->B<-C, <->C. 120C ->B->C, <->C. 210 ->B<->C, <->C. 300 <->B<->C, <->C, complete graph. functions uses RANDESU motif finder algorithm find count subgraphs, see motifs().","code":""},{"path":"https://r.igraph.org/reference/triad_census.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Triad census, subgraphs with three vertices — triad_census","text":"See also Davis, J.. Leinhardt, S. (1972). Structure Positive Interpersonal Relations Small Groups. J. Berger (Ed.), Sociological Theories Progress, Volume 2, 218-251. Boston: Houghton Mifflin.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/triad_census.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Triad census, subgraphs with three vertices — triad_census","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/triad_census.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Triad census, subgraphs with three vertices — triad_census","text":"","code":"g <- sample_gnm(15, 45, directed = TRUE) triad_census(g) #> [1] 90 198 21 20 21 57 11 15 12 5 0 2 1 2 0 0"},{"path":"https://r.igraph.org/reference/unfold.tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a general graph into a forest — unfold.tree","title":"Convert a general graph into a forest — unfold.tree","text":"unfold.tree() renamed unfold_tree() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/unfold.tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a general graph into a forest — unfold.tree","text":"","code":"unfold.tree(graph, mode = c(\"all\", \"out\", \"in\", \"total\"), roots)"},{"path":"https://r.igraph.org/reference/unfold.tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a general graph into a forest — unfold.tree","text":"graph input graph, can either directed undirected. mode Character string, defined types paths used breadth-first search. “” follows outgoing, “” incoming edges, “” “total” . argument ignored undirected graphs. roots vector giving vertices breadth-first search performed. Typically contains one vertex per component.","code":""},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a general graph into a forest — unfold_tree","title":"Convert a general graph into a forest — unfold_tree","text":"Perform breadth-first search graph convert tree forest replicating vertices found .","code":""},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a general graph into a forest — unfold_tree","text":"","code":"unfold_tree(graph, mode = c(\"all\", \"out\", \"in\", \"total\"), roots)"},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a general graph into a forest — unfold_tree","text":"graph input graph, can either directed undirected. mode Character string, defined types paths used breadth-first search. “” follows outgoing, “” incoming edges, “” “total” . argument ignored undirected graphs. roots vector giving vertices breadth-first search performed. Typically contains one vertex per component.","code":""},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a general graph into a forest — unfold_tree","text":"list two components: tree result, igraph object, tree forest. vertex_index numeric vector, gives mapping vertices new graph vertices old graph.","code":""},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert a general graph into a forest — unfold_tree","text":"forest graph, whose components trees. roots vector can calculated simply topological sort components graph, see examples .","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert a general graph into a forest — unfold_tree","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/unfold_tree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a general graph into a forest — unfold_tree","text":"","code":"g <- make_tree(10) %du% make_tree(10) V(g)$id <- seq_len(vcount(g)) - 1 roots <- sapply(decompose(g), function(x) { V(x)$id[topo_sort(x)[1] + 1] }) tree <- unfold_tree(g, roots = roots)"},{"path":"https://r.igraph.org/reference/union.html","id":null,"dir":"Reference","previous_headings":"","what":"Union of two or more sets — union","title":"Union of two or more sets — union","text":"S3 generic function. See methods(\"union\") actual implementations various S3 classes. Initially implemented igraph graphs igraph vertex edge sequences. See union.igraph(), union.igraph.vs().","code":""},{"path":"https://r.igraph.org/reference/union.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Union of two or more sets — union","text":"","code":"union(...)"},{"path":"https://r.igraph.org/reference/union.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Union of two or more sets — union","text":"... Arguments, number interpretation depends function implements union().","code":""},{"path":"https://r.igraph.org/reference/union.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Union of two or more sets — union","text":"Depends function implements method.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/union.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Union of edge sequences — union.igraph.es","title":"Union of edge sequences — union.igraph.es","text":"Union edge sequences","code":""},{"path":"https://r.igraph.org/reference/union.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Union of edge sequences — union.igraph.es","text":"","code":"# S3 method for class 'igraph.es' union(...)"},{"path":"https://r.igraph.org/reference/union.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Union of edge sequences — union.igraph.es","text":"... edge sequences take union .","code":""},{"path":"https://r.igraph.org/reference/union.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Union of edge sequences — union.igraph.es","text":"edge sequence contains edges given sequences, exactly .","code":""},{"path":"https://r.igraph.org/reference/union.igraph.es.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Union of edge sequences — union.igraph.es","text":"must belong graph. Note function ‘set’ semantics multiplicity edges lost result. (match behavior based unique function.)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/union.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Union of edge sequences — union.igraph.es","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) union(E(g)[1:6], E(g)[5:9], E(g)[\"A|J\"]) #> + 10/10 edges from 3d9a691 (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J"},{"path":"https://r.igraph.org/reference/union.igraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Union of graphs — union.igraph","title":"Union of graphs — union.igraph","text":"union two graphs created. graphs may identical overlapping vertex sets.","code":""},{"path":"https://r.igraph.org/reference/union.igraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Union of graphs — union.igraph","text":"","code":"# S3 method for class 'igraph' union(..., byname = \"auto\")"},{"path":"https://r.igraph.org/reference/union.igraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Union of graphs — union.igraph","text":"... Graph objects lists graph objects. byname logical scalar, character scalar auto. Whether perform operation based symbolic vertex names. auto, means TRUE graphs named FALSE otherwise. warning generated auto () graphs named.","code":""},{"path":"https://r.igraph.org/reference/union.igraph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Union of graphs — union.igraph","text":"new graph object.","code":""},{"path":"https://r.igraph.org/reference/union.igraph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Union of graphs — union.igraph","text":"union() creates union two graphs. Edges included least one graph part new graph. function can also used via %u% operator. byname argument TRUE (auto graphs named), operation performed symbolic vertex names instead internal numeric vertex ids. union() keeps attributes graphs. graph, vertex edge attributes copied result. attribute present multiple graphs result name clash, attribute renamed adding suffixes: _1, _2, etc. name vertex attribute treated specially operation performed based symbolic vertex names. case name must present graphs, renamed result graph. error generated input graphs directed others undirected.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/union.igraph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Union of graphs — union.igraph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/union.igraph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Union of graphs — union.igraph","text":"","code":"## Union of two social networks with overlapping sets of actors net1 <- graph_from_literal( D - A:B:F:G, A - C - F - A, B - E - G - B, A - B, F - G, H - F:G, H - I - J ) net2 <- graph_from_literal(D - A:F:Y, B - A - X - F - H - Z, F - Y) print_all(net1 %u% net2) #> IGRAPH 6ced123 UN-- 13 21 -- #> + attr: name (v/c) #> + vertex attributes: #> | name #> | [1] D #> | [2] A #> | [3] B #> | [4] F #> | [5] G #> | [6] C #> | [7] E #> | [8] H #> | [9] I #> | [10] J #> | [11] Y #> | [12] X #> | [13] Z #> + edges from 6ced123 (vertex names): #> [1] I--J H--Z H--I G--H G--E F--X F--Y F--H F--C F--G B--E B--G A--X A--C A--F #> [16] A--B D--Y D--G D--F D--B D--A"},{"path":"https://r.igraph.org/reference/union.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Union of vertex sequences — union.igraph.vs","title":"Union of vertex sequences — union.igraph.vs","text":"Union vertex sequences","code":""},{"path":"https://r.igraph.org/reference/union.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Union of vertex sequences — union.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' union(...)"},{"path":"https://r.igraph.org/reference/union.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Union of vertex sequences — union.igraph.vs","text":"... vertex sequences take union .","code":""},{"path":"https://r.igraph.org/reference/union.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Union of vertex sequences — union.igraph.vs","text":"vertex sequence contains vertices given sequences, exactly .","code":""},{"path":"https://r.igraph.org/reference/union.igraph.vs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Union of vertex sequences — union.igraph.vs","text":"must belong graph. Note function ‘set’ semantics multiplicity vertices lost result. (match behavior based unique function.)","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/union.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Union of vertex sequences — union.igraph.vs","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) union(V(g)[1:6], V(g)[5:10]) #> + 10/10 vertices, named, from cb1f999: #> [1] A B C D E F G H I J"},{"path":"https://r.igraph.org/reference/unique.igraph.es.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove duplicate edges from an edge sequence — unique.igraph.es","title":"Remove duplicate edges from an edge sequence — unique.igraph.es","text":"Remove duplicate edges edge sequence","code":""},{"path":"https://r.igraph.org/reference/unique.igraph.es.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove duplicate edges from an edge sequence — unique.igraph.es","text":"","code":"# S3 method for class 'igraph.es' unique(x, incomparables = FALSE, ...)"},{"path":"https://r.igraph.org/reference/unique.igraph.es.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove duplicate edges from an edge sequence — unique.igraph.es","text":"x edge sequence. incomparables vector values compared. Passed base function duplicated. See details . ... Passed base function duplicated().","code":""},{"path":"https://r.igraph.org/reference/unique.igraph.es.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove duplicate edges from an edge sequence — unique.igraph.es","text":"edge sequence duplicate vertices removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/unique.igraph.es.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove duplicate edges from an edge sequence — unique.igraph.es","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) E(g)[1, 1:5, 1:10, 5:10] #> + 22/10 edges from ff1f91d (vertex names): #> [1] A--B A--B B--C C--D D--E E--F A--B B--C C--D D--E E--F F--G G--H H--I I--J #> [16] A--J E--F F--G G--H H--I I--J A--J E(g)[1, 1:5, 1:10, 5:10] %>% unique() #> + 10/10 edges from ff1f91d (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J"},{"path":"https://r.igraph.org/reference/unique.igraph.vs.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove duplicate vertices from a vertex sequence — unique.igraph.vs","title":"Remove duplicate vertices from a vertex sequence — unique.igraph.vs","text":"Remove duplicate vertices vertex sequence","code":""},{"path":"https://r.igraph.org/reference/unique.igraph.vs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove duplicate vertices from a vertex sequence — unique.igraph.vs","text":"","code":"# S3 method for class 'igraph.vs' unique(x, incomparables = FALSE, ...)"},{"path":"https://r.igraph.org/reference/unique.igraph.vs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove duplicate vertices from a vertex sequence — unique.igraph.vs","text":"x vertex sequence. incomparables vector values compared. Passed base function duplicated. See details . ... Passed base function duplicated().","code":""},{"path":"https://r.igraph.org/reference/unique.igraph.vs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove duplicate vertices from a vertex sequence — unique.igraph.vs","text":"vertex sequence duplicate vertices removed.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/unique.igraph.vs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove duplicate vertices from a vertex sequence — unique.igraph.vs","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) V(g)[1, 1:5, 1:10, 5:10] #> + 22/10 vertices, named, from 9d7998b: #> [1] A A B C D E A B C D E F G H I J E F G H I J V(g)[1, 1:5, 1:10, 5:10] %>% unique() #> + 10/10 vertices, named, from 9d7998b: #> [1] A B C D E F G H I J"},{"path":"https://r.igraph.org/reference/upgrade_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"igraph data structure versions — upgrade_graph","title":"igraph data structure versions — upgrade_graph","text":"igraph's internal data representation changes sometimes versions. means possible use igraph objects created (possibly saved file) older igraph version.","code":""},{"path":"https://r.igraph.org/reference/upgrade_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"igraph data structure versions — upgrade_graph","text":"","code":"upgrade_graph(graph)"},{"path":"https://r.igraph.org/reference/upgrade_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"igraph data structure versions — upgrade_graph","text":"graph input graph.","code":""},{"path":"https://r.igraph.org/reference/upgrade_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"igraph data structure versions — upgrade_graph","text":"graph current format.","code":""},{"path":"https://r.igraph.org/reference/upgrade_graph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"igraph data structure versions — upgrade_graph","text":"graph_version() queries current data format, data format possibly older igraph graph. upgrade_graph() can convert older data format current one.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex.connectivity.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex connectivity — vertex.connectivity","title":"Vertex connectivity — vertex.connectivity","text":"vertex.connectivity() renamed vertex_connectivity() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/vertex.connectivity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex connectivity — vertex.connectivity","text":"","code":"vertex.connectivity(graph, source = NULL, target = NULL, checks = TRUE)"},{"path":"https://r.igraph.org/reference/vertex.connectivity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex connectivity — vertex.connectivity","text":"source id source vertex, vertex_connectivity() can NULL, see details . target id target vertex, vertex_connectivity() can NULL, see details . checks Logical constant. Whether check graph connected also degree vertices. graph (strongly) connected connectivity obviously zero. Otherwise minimum degree one vertex connectivity also one. good idea perform checks, can done quickly compared connectivity calculation . suggested Peter McMahan, thanks Peter.","code":""},{"path":"https://r.igraph.org/reference/vertex.disjoint.paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex connectivity — vertex.disjoint.paths","title":"Vertex connectivity — vertex.disjoint.paths","text":"vertex.disjoint.paths() renamed vertex_disjoint_paths() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/vertex.disjoint.paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex connectivity — vertex.disjoint.paths","text":"","code":"vertex.disjoint.paths(graph, source = NULL, target = NULL)"},{"path":"https://r.igraph.org/reference/vertex.disjoint.paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex connectivity — vertex.disjoint.paths","text":"source id source vertex, vertex_connectivity() can NULL, see details . target id target vertex, vertex_connectivity() can NULL, see details .","code":""},{"path":"https://r.igraph.org/reference/vertex.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper function for adding and deleting vertices — vertex","title":"Helper function for adding and deleting vertices — vertex","text":"helper function simplifies adding deleting vertices /graphs.","code":""},{"path":"https://r.igraph.org/reference/vertex.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper function for adding and deleting vertices — vertex","text":"","code":"vertex(...) vertices(...)"},{"path":"https://r.igraph.org/reference/vertex.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper function for adding and deleting vertices — vertex","text":"... See details .","code":""},{"path":"https://r.igraph.org/reference/vertex.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper function for adding and deleting vertices — vertex","text":"special object can used together igraph graphs plus minus operators.","code":""},{"path":"https://r.igraph.org/reference/vertex.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Helper function for adding and deleting vertices — vertex","text":"vertices() alias vertex(). adding vertices via +, unnamed arguments interpreted vertex names new vertices. Named arguments interpreted vertex attributes new vertices. deleting vertices via -, arguments vertex() (vertices()) concatenated via c() passed delete_vertices().","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper function for adding and deleting vertices — vertex","text":"","code":"g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) + vertices(\"X\", \"Y\") g #> IGRAPH 0b4b2c1 UN-- 12 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c) #> + edges from 0b4b2c1 (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J plot(g)"},{"path":"https://r.igraph.org/reference/vertex.shape.pie.html","id":null,"dir":"Reference","previous_headings":"","what":"Using pie charts as vertices in graph plots — Pie charts as vertices","title":"Using pie charts as vertices in graph plots — Pie charts as vertices","text":"complex vertex images can used express addtional information vertices. E.g. pie charts can used vertices, denote vertex classes, fuzzy classification vertices, etc.","code":""},{"path":"https://r.igraph.org/reference/vertex.shape.pie.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Using pie charts as vertices in graph plots — Pie charts as vertices","text":"vertex shape ‘pie’ makes igraph draw pie chart every vertex. extra graphical vertex parameters specify pie charts look like: pie Numeric vector, gives sizes pie slices. pie.color list color vectors use pies. list single vector, used pies. color vector shorter number areas pie, recycled. pie.angle slope shading lines, given angle degrees (counter-clockwise). pie.density density shading lines, lines per inch. Non-positive values inhibit drawing shading lines. pie.lty line type border slices.","code":""},{"path":"https://r.igraph.org/reference/vertex.shape.pie.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Using pie charts as vertices in graph plots — Pie charts as vertices","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex.shape.pie.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Using pie charts as vertices in graph plots — Pie charts as vertices","text":"","code":"g <- make_ring(10) values <- lapply(1:10, function(x) sample(1:10,3)) if (interactive()) { plot(g, vertex.shape=\"pie\", vertex.pie=values, vertex.pie.color=list(heat.colors(5)), vertex.size=seq(10,30,length.out=10), vertex.label=NA) }"},{"path":"https://r.igraph.org/reference/vertex.shapes.html","id":null,"dir":"Reference","previous_headings":"","what":"Various vertex shapes when plotting igraph graphs — vertex.shapes","title":"Various vertex shapes when plotting igraph graphs — vertex.shapes","text":"vertex.shapes() renamed shapes() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/vertex.shapes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Various vertex shapes when plotting igraph graphs — vertex.shapes","text":"","code":"vertex.shapes(shape = NULL)"},{"path":"https://r.igraph.org/reference/vertex.shapes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Various vertex shapes when plotting igraph graphs — vertex.shapes","text":"shape Character scalar, name vertex shape. NULL shapes(), names defined vertex shapes returned.","code":""},{"path":"https://r.igraph.org/reference/vertex_attr-set.html","id":null,"dir":"Reference","previous_headings":"","what":"Set one or more vertex attributes — vertex_attr<-","title":"Set one or more vertex attributes — vertex_attr<-","text":"Set one vertex attributes","code":""},{"path":"https://r.igraph.org/reference/vertex_attr-set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set one or more vertex attributes — vertex_attr<-","text":"","code":"vertex_attr(graph, name, index = V(graph)) <- value"},{"path":"https://r.igraph.org/reference/vertex_attr-set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set one or more vertex attributes — vertex_attr<-","text":"graph graph. name name vertex attribute set. missing, value must named list, entries set vertex attributes. index optional vertex sequence set attributes subset vertices. value new value attribute(s) (index) vertices.","code":""},{"path":"https://r.igraph.org/reference/vertex_attr-set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set one or more vertex attributes — vertex_attr<-","text":"graph, vertex attribute(s) added set.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex_attr-set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set one or more vertex attributes — vertex_attr<-","text":"","code":"g <- make_ring(10) vertex_attr(g) <- list( name = LETTERS[1:10], color = rep(\"yellow\", gorder(g)) ) vertex_attr(g, \"label\") <- V(g)$name g #> IGRAPH 518e605 UN-- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l), name (v/c), color #> | (v/c), label (v/c) #> + edges from 518e605 (vertex names): #> [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J plot(g)"},{"path":"https://r.igraph.org/reference/vertex_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Query vertex attributes of a graph — vertex_attr","title":"Query vertex attributes of a graph — vertex_attr","text":"Query vertex attributes graph","code":""},{"path":"https://r.igraph.org/reference/vertex_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query vertex attributes of a graph — vertex_attr","text":"","code":"vertex_attr(graph, name, index = V(graph))"},{"path":"https://r.igraph.org/reference/vertex_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query vertex attributes of a graph — vertex_attr","text":"graph graph. name Name attribute query. missing, vertex attributes returned list. index optional vertex sequence query attribute vertices.","code":""},{"path":"https://r.igraph.org/reference/vertex_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query vertex attributes of a graph — vertex_attr","text":"value vertex attribute, list vertex attributes, name missing.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query vertex attributes of a graph — vertex_attr","text":"","code":"g <- make_ring(10) %>% set_vertex_attr(\"color\", value = \"red\") %>% set_vertex_attr(\"label\", value = letters[1:10]) vertex_attr(g, \"label\") #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" vertex_attr(g) #> $color #> [1] \"red\" \"red\" \"red\" \"red\" \"red\" \"red\" \"red\" \"red\" \"red\" \"red\" #> #> $label #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" #> plot(g)"},{"path":"https://r.igraph.org/reference/vertex_attr_names.html","id":null,"dir":"Reference","previous_headings":"","what":"List names of vertex attributes — vertex_attr_names","title":"List names of vertex attributes — vertex_attr_names","text":"List names vertex attributes","code":""},{"path":"https://r.igraph.org/reference/vertex_attr_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List names of vertex attributes — vertex_attr_names","text":"","code":"vertex_attr_names(graph)"},{"path":"https://r.igraph.org/reference/vertex_attr_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List names of vertex attributes — vertex_attr_names","text":"graph graph.","code":""},{"path":"https://r.igraph.org/reference/vertex_attr_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List names of vertex attributes — vertex_attr_names","text":"Character vector, names vertex attributes.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex_attr_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List names of vertex attributes — vertex_attr_names","text":"","code":"g <- make_ring(10) %>% set_vertex_attr(\"name\", value = LETTERS[1:10]) %>% set_vertex_attr(\"color\", value = rep(\"green\", 10)) vertex_attr_names(g) #> [1] \"name\" \"color\" plot(g)"},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertex connectivity — vertex_connectivity","title":"Vertex connectivity — vertex_connectivity","text":"vertex connectivity graph two vertices, recently also called group cohesion.","code":""},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertex connectivity — vertex_connectivity","text":"","code":"vertex_connectivity(graph, source = NULL, target = NULL, checks = TRUE) vertex_disjoint_paths(graph, source = NULL, target = NULL) # S3 method for class 'igraph' cohesion(x, checks = TRUE, ...)"},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertex connectivity — vertex_connectivity","text":"graph, x input graph. source id source vertex, vertex_connectivity() can NULL, see details . target id target vertex, vertex_connectivity() can NULL, see details . checks Logical constant. Whether check graph connected also degree vertices. graph (strongly) connected connectivity obviously zero. Otherwise minimum degree one vertex connectivity also one. good idea perform checks, can done quickly compared connectivity calculation . suggested Peter McMahan, thanks Peter. ... Ignored.","code":""},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Vertex connectivity — vertex_connectivity","text":"scalar real value.","code":""},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Vertex connectivity — vertex_connectivity","text":"vertex connectivity two vertices (source target) graph minimum number vertices must deleted eliminate (directed) paths source target. vertex_connectivity() calculates quantity source target arguments given NULL. vertex connectivity pair number different (.e. node-independent) paths source target, assuming direct edges . vertex connectivity graph minimum vertex connectivity (ordered) pairs vertices graph. words minimum number vertices needed remove make graph strongly connected. (graph strongly connected zero.) vertex_connectivity() calculates quantity neither source target arguments given. (.e. NULL.) set vertex disjoint directed paths source vertex set directed paths whose vertices contain common vertices (apart source target). maximum number vertex disjoint paths two vertices vertex connectivity cases (two vertices connected edge). cohesion graph (defined White Harary, see references), vertex connectivity graph. calculated cohesion(). three functions essentially calculate measure(s), precisely vertex_connectivity() general, two included ease using descriptive function names.","code":""},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Vertex connectivity — vertex_connectivity","text":"White, Douglas R Frank Harary 2001. Cohesiveness Blocks Social Networks: Node Connectivity Conditional Density. Sociological Methodology 31 (1) : 305-359.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Vertex connectivity — vertex_connectivity","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/vertex_connectivity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Vertex connectivity — vertex_connectivity","text":"","code":"g <- sample_pa(100, m = 1) g <- delete_edges(g, E(g)[100 %--% 1]) g2 <- sample_pa(100, m = 5) g2 <- delete_edges(g2, E(g2)[100 %--% 1]) vertex_connectivity(g, 100, 1) #> [1] 1 vertex_connectivity(g2, 100, 1) #> [1] 5 vertex_disjoint_paths(g2, 100, 1) #> [1] 5 g <- sample_gnp(50, 5 / 50) g <- as.directed(g) g <- induced_subgraph(g, subcomponent(g, 1)) cohesion(g) #> [1] 2"},{"path":"https://r.igraph.org/reference/voronoi_cells.html","id":null,"dir":"Reference","previous_headings":"","what":"Voronoi partitioning of a graph — voronoi_cells","title":"Voronoi partitioning of a graph — voronoi_cells","text":"function partitions vertices graph based set generator vertices. vertex assigned generator vertex () closest. groups() may used output function.","code":""},{"path":"https://r.igraph.org/reference/voronoi_cells.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Voronoi partitioning of a graph — voronoi_cells","text":"","code":"voronoi_cells( graph, generators, ..., weights = NULL, mode = c(\"out\", \"in\", \"all\", \"total\"), tiebreaker = c(\"random\", \"first\", \"last\") )"},{"path":"https://r.igraph.org/reference/voronoi_cells.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Voronoi partitioning of a graph — voronoi_cells","text":"graph graph partition Voronoi cells. generators generator vertices Voronoi cells. ... dots future extensions must empty. weights Possibly numeric vector giving edge weights. NULL graph weight edge attribute, attribute used. NA weights used (even graph weight attribute). mode Character string. directed graphs, whether compute distances generator vertices vertices (\"\"), generator vertices vertices (\"\"), ignore edge directions entirely (\"\"). Ignored undirected graphs. tiebreaker Character string specifies vertex distance multiple generators. \"random\" assigns minimal-distance generator randomly, \"first\" takes first one, \"last\" takes last one.","code":""},{"path":"https://r.igraph.org/reference/voronoi_cells.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Voronoi partitioning of a graph — voronoi_cells","text":"named list two components: membership numeric vector giving cluster id vertex belongs. distances numeric vector giving distance vertex generator","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/voronoi_cells.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Voronoi partitioning of a graph — voronoi_cells","text":"","code":"g <- make_lattice(c(10,10)) clu <- voronoi_cells(g, c(25, 43, 67)) groups(clu) #> $`0` #> [1] 2 4 5 6 7 8 9 10 11 14 15 16 17 18 19 20 23 24 25 26 27 28 29 30 35 #> [26] 36 37 40 45 55 #> #> $`1` #> [1] 1 3 12 13 21 22 31 32 33 34 41 42 43 44 51 52 53 54 61 62 63 71 72 73 81 #> [26] 82 83 84 91 92 93 94 #> #> $`2` #> [1] 38 39 46 47 48 49 50 56 57 58 59 60 64 65 66 67 68 69 70 #> [20] 74 75 76 77 78 79 80 85 86 87 88 89 90 95 96 97 98 99 100 #> plot(g, vertex.color=clu$membership)"},{"path":"https://r.igraph.org/reference/walktrap.community.html","id":null,"dir":"Reference","previous_headings":"","what":"Community structure via short random walks — walktrap.community","title":"Community structure via short random walks — walktrap.community","text":"walktrap.community() renamed cluster_walktrap() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/walktrap.community.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Community structure via short random walks — walktrap.community","text":"","code":"walktrap.community( graph, weights = NULL, steps = 4, merges = TRUE, modularity = TRUE, membership = TRUE )"},{"path":"https://r.igraph.org/reference/walktrap.community.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Community structure via short random walks — walktrap.community","text":"graph input graph, edge directions ignored directed graphs. weights weights edges. must positive numeric vector, NULL NA. NULL input graph ‘weight’ edge attribute, attribute used. NULL attribute present, edges equal weights. Set NA graph ‘weight’ edge attribute, want use community detection. Larger edge weights increase probability edge selected random walker. words, larger edge weights correspond stronger connections. steps length random walks perform. merges Logical scalar, whether include merge matrix result. modularity Logical scalar, whether include vector modularity scores result. membership argument true, always calculated. membership Logical scalar, whether calculate membership vector split corresponding highest modularity value.","code":""},{"path":"https://r.igraph.org/reference/watts.strogatz.game.html","id":null,"dir":"Reference","previous_headings":"","what":"The Watts-Strogatz small-world model — watts.strogatz.game","title":"The Watts-Strogatz small-world model — watts.strogatz.game","text":"watts.strogatz.game() renamed sample_smallworld() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/watts.strogatz.game.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Watts-Strogatz small-world model — watts.strogatz.game","text":"","code":"watts.strogatz.game(dim, size, nei, p, loops = FALSE, multiple = FALSE)"},{"path":"https://r.igraph.org/reference/watts.strogatz.game.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The Watts-Strogatz small-world model — watts.strogatz.game","text":"dim Integer constant, dimension starting lattice. size Integer constant, size lattice along dimension. nei Integer constant, neighborhood within vertices lattice connected. p Real constant zero one, rewiring probability. loops Logical scalar, whether loops edges allowed generated graph. multiple Logical scalar, whether multiple edges allowed int generated graph.","code":""},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"functions find , largest maximal weighted cliques undirected graph. weight clique sum weights vertices.","code":""},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"","code":"weighted_cliques( graph, vertex.weights = NULL, min.weight = 0, max.weight = 0, maximal = FALSE )"},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"graph input graph, directed graphs considered undirected ones, multiple edges loops ignored. vertex.weights Vertex weight vector. graph weight vertex attribute, used default. graph weight vertex attribute argument NULL, every vertex assumed weight 1. Note current implementation weighted clique finder supports positive integer weights . min.weight Numeric constant, lower limit weight cliques find. NULL means limit, .e. 0. max.weight Numeric constant, upper limit weight cliques find. NULL means limit. maximal Specifies whether look weighted cliques (FALSE) maximal ones (TRUE).","code":""},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"weighted_cliques() largest_weighted_cliques() return list containing numeric vectors vertex IDs. list element weighted clique, .e. vertex sequence class igraph.vs(). weighted_clique_num() returns integer scalar.","code":""},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"weighted_cliques() finds complete subgraphs input graph, obeying weight limitations given min max arguments. largest_weighted_cliques() finds largest weighted cliques input graph. clique largest clique whose total weight larger weight clique. weighted_clique_num() calculates weight largest weighted clique(s).","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"Tamas Nepusz ntamas@gmail.com Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/weighted_cliques.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functions to find weighted cliques, i.e. vertex-weighted complete subgraphs in a graph — weighted_cliques","text":"","code":"g <- make_graph(\"zachary\") V(g)$weight <- 1 V(g)[c(1, 2, 3, 4, 14)]$weight <- 3 weighted_cliques(g) #> [[1]] #> + 1/34 vertex, from caa4a86: #> [1] 34 #> #> [[2]] #> + 1/34 vertex, from caa4a86: #> [1] 33 #> #> [[3]] #> + 2/34 vertices, from caa4a86: #> [1] 33 34 #> #> [[4]] #> + 1/34 vertex, from caa4a86: #> [1] 8 #> #> [[5]] #> + 1/34 vertex, from caa4a86: #> [1] 9 #> #> [[6]] #> + 2/34 vertices, from caa4a86: #> [1] 9 33 #> #> [[7]] #> + 3/34 vertices, from caa4a86: #> [1] 9 33 34 #> #> [[8]] #> + 2/34 vertices, from caa4a86: #> [1] 9 34 #> #> [[9]] #> + 1/34 vertex, from caa4a86: #> [1] 32 #> #> [[10]] #> + 2/34 vertices, from caa4a86: #> [1] 32 33 #> #> [[11]] #> + 3/34 vertices, from caa4a86: #> [1] 32 33 34 #> #> [[12]] #> + 2/34 vertices, from caa4a86: #> [1] 32 34 #> #> [[13]] #> + 1/34 vertex, from caa4a86: #> [1] 22 #> #> [[14]] #> + 1/34 vertex, from caa4a86: #> [1] 20 #> #> [[15]] #> + 2/34 vertices, from caa4a86: #> [1] 20 34 #> #> [[16]] #> + 1/34 vertex, from caa4a86: #> [1] 18 #> #> [[17]] #> + 1/34 vertex, from caa4a86: #> [1] 13 #> #> [[18]] #> + 1/34 vertex, from caa4a86: #> [1] 7 #> #> [[19]] #> + 1/34 vertex, from caa4a86: #> [1] 28 #> #> [[20]] #> + 2/34 vertices, from caa4a86: #> [1] 28 34 #> #> [[21]] #> + 1/34 vertex, from caa4a86: #> [1] 11 #> #> [[22]] #> + 1/34 vertex, from caa4a86: #> [1] 6 #> #> [[23]] #> + 2/34 vertices, from caa4a86: #> [1] 6 11 #> #> [[24]] #> + 2/34 vertices, from caa4a86: #> [1] 6 7 #> #> [[25]] #> + 1/34 vertex, from caa4a86: #> [1] 31 #> #> [[26]] #> + 2/34 vertices, from caa4a86: #> [1] 9 31 #> #> [[27]] #> + 3/34 vertices, from caa4a86: #> [1] 9 31 33 #> #> [[28]] #> + 4/34 vertices, from caa4a86: #> [1] 9 31 33 34 #> #> [[29]] #> + 3/34 vertices, from caa4a86: #> [1] 9 31 34 #> #> [[30]] #> + 2/34 vertices, from caa4a86: #> [1] 31 33 #> #> [[31]] #> + 3/34 vertices, from caa4a86: #> [1] 31 33 34 #> #> [[32]] #> + 2/34 vertices, from caa4a86: #> [1] 31 34 #> #> [[33]] #> + 1/34 vertex, from caa4a86: #> [1] 29 #> #> [[34]] #> + 2/34 vertices, from caa4a86: #> [1] 29 32 #> #> [[35]] #> + 3/34 vertices, from caa4a86: #> [1] 29 32 34 #> #> [[36]] #> + 2/34 vertices, from caa4a86: #> [1] 29 34 #> #> [[37]] #> + 1/34 vertex, from caa4a86: #> [1] 12 #> #> [[38]] #> + 1/34 vertex, from caa4a86: #> [1] 10 #> #> [[39]] #> + 2/34 vertices, from caa4a86: #> [1] 10 34 #> #> [[40]] #> + 1/34 vertex, from caa4a86: #> [1] 5 #> #> [[41]] #> + 2/34 vertices, from caa4a86: #> [1] 5 11 #> #> [[42]] #> + 2/34 vertices, from caa4a86: #> [1] 5 7 #> #> [[43]] #> + 1/34 vertex, from caa4a86: #> [1] 30 #> #> [[44]] #> + 2/34 vertices, from caa4a86: #> [1] 30 33 #> #> [[45]] #> + 3/34 vertices, from caa4a86: #> [1] 30 33 34 #> #> [[46]] #> + 2/34 vertices, from caa4a86: #> [1] 30 34 #> #> [[47]] #> + 1/34 vertex, from caa4a86: #> [1] 26 #> #> [[48]] #> + 2/34 vertices, from caa4a86: #> [1] 26 32 #> #> [[49]] #> + 1/34 vertex, from caa4a86: #> [1] 27 #> #> [[50]] #> + 2/34 vertices, from caa4a86: #> [1] 27 30 #> #> [[51]] #> + 3/34 vertices, from caa4a86: #> [1] 27 30 34 #> #> [[52]] #> + 2/34 vertices, from caa4a86: #> [1] 27 34 #> #> [[53]] #> + 1/34 vertex, from caa4a86: #> [1] 25 #> #> [[54]] #> + 2/34 vertices, from caa4a86: #> [1] 25 26 #> #> [[55]] #> + 3/34 vertices, from caa4a86: #> [1] 25 26 32 #> #> [[56]] #> + 2/34 vertices, from caa4a86: #> [1] 25 28 #> #> [[57]] #> + 2/34 vertices, from caa4a86: #> [1] 25 32 #> #> [[58]] #> + 1/34 vertex, from caa4a86: #> [1] 24 #> #> [[59]] #> + 2/34 vertices, from caa4a86: #> [1] 24 26 #> #> [[60]] #> + 2/34 vertices, from caa4a86: #> [1] 24 30 #> #> [[61]] #> + 3/34 vertices, from caa4a86: #> [1] 24 30 33 #> #> [[62]] #> + 4/34 vertices, from caa4a86: #> [1] 24 30 33 34 #> #> [[63]] #> + 3/34 vertices, from caa4a86: #> [1] 24 30 34 #> #> [[64]] #> + 2/34 vertices, from caa4a86: #> [1] 24 28 #> #> [[65]] #> + 3/34 vertices, from caa4a86: #> [1] 24 28 34 #> #> [[66]] #> + 2/34 vertices, from caa4a86: #> [1] 24 33 #> #> [[67]] #> + 3/34 vertices, from caa4a86: #> [1] 24 33 34 #> #> [[68]] #> + 2/34 vertices, from caa4a86: #> [1] 24 34 #> #> [[69]] #> + 1/34 vertex, from caa4a86: #> [1] 23 #> #> [[70]] #> + 2/34 vertices, from caa4a86: #> [1] 23 33 #> #> [[71]] #> + 3/34 vertices, from caa4a86: #> [1] 23 33 34 #> #> [[72]] #> + 2/34 vertices, from caa4a86: #> [1] 23 34 #> #> [[73]] #> + 1/34 vertex, from caa4a86: #> [1] 21 #> #> [[74]] #> + 2/34 vertices, from caa4a86: #> [1] 21 33 #> #> [[75]] #> + 3/34 vertices, from caa4a86: #> [1] 21 33 34 #> #> [[76]] #> + 2/34 vertices, from caa4a86: #> [1] 21 34 #> #> [[77]] #> + 1/34 vertex, from caa4a86: #> [1] 19 #> #> [[78]] #> + 2/34 vertices, from caa4a86: #> [1] 19 33 #> #> [[79]] #> + 3/34 vertices, from caa4a86: #> [1] 19 33 34 #> #> [[80]] #> + 2/34 vertices, from caa4a86: #> [1] 19 34 #> #> [[81]] #> + 1/34 vertex, from caa4a86: #> [1] 17 #> #> [[82]] #> + 2/34 vertices, from caa4a86: #> [1] 6 17 #> #> [[83]] #> + 3/34 vertices, from caa4a86: #> [1] 6 7 17 #> #> [[84]] #> + 2/34 vertices, from caa4a86: #> [1] 7 17 #> #> [[85]] #> + 1/34 vertex, from caa4a86: #> [1] 16 #> #> [[86]] #> + 2/34 vertices, from caa4a86: #> [1] 16 33 #> #> [[87]] #> + 3/34 vertices, from caa4a86: #> [1] 16 33 34 #> #> [[88]] #> + 2/34 vertices, from caa4a86: #> [1] 16 34 #> #> [[89]] #> + 1/34 vertex, from caa4a86: #> [1] 15 #> #> [[90]] #> + 2/34 vertices, from caa4a86: #> [1] 15 33 #> #> [[91]] #> + 3/34 vertices, from caa4a86: #> [1] 15 33 34 #> #> [[92]] #> + 2/34 vertices, from caa4a86: #> [1] 15 34 #> #> [[93]] #> + 1/34 vertex, from caa4a86: #> [1] 14 #> #> [[94]] #> + 2/34 vertices, from caa4a86: #> [1] 14 34 #> #> [[95]] #> + 1/34 vertex, from caa4a86: #> [1] 4 #> #> [[96]] #> + 2/34 vertices, from caa4a86: #> [1] 4 14 #> #> [[97]] #> + 2/34 vertices, from caa4a86: #> [1] 4 13 #> #> [[98]] #> + 2/34 vertices, from caa4a86: #> [1] 4 8 #> #> [[99]] #> + 1/34 vertex, from caa4a86: #> [1] 3 #> #> [[100]] #> + 2/34 vertices, from caa4a86: #> [1] 3 4 #> #> [[101]] #> + 3/34 vertices, from caa4a86: #> [1] 3 4 14 #> #> [[102]] #> + 3/34 vertices, from caa4a86: #> [1] 3 4 8 #> #> [[103]] #> + 2/34 vertices, from caa4a86: #> [1] 3 14 #> #> [[104]] #> + 2/34 vertices, from caa4a86: #> [1] 3 10 #> #> [[105]] #> + 2/34 vertices, from caa4a86: #> [1] 3 29 #> #> [[106]] #> + 2/34 vertices, from caa4a86: #> [1] 3 28 #> #> [[107]] #> + 2/34 vertices, from caa4a86: #> [1] 3 9 #> #> [[108]] #> + 3/34 vertices, from caa4a86: #> [1] 3 9 33 #> #> [[109]] #> + 2/34 vertices, from caa4a86: #> [1] 3 8 #> #> [[110]] #> + 2/34 vertices, from caa4a86: #> [1] 3 33 #> #> [[111]] #> + 1/34 vertex, from caa4a86: #> [1] 2 #> #> [[112]] #> + 2/34 vertices, from caa4a86: #> [1] 2 3 #> #> [[113]] #> + 3/34 vertices, from caa4a86: #> [1] 2 3 4 #> #> [[114]] #> + 4/34 vertices, from caa4a86: #> [1] 2 3 4 14 #> #> [[115]] #> + 4/34 vertices, from caa4a86: #> [1] 2 3 4 8 #> #> [[116]] #> + 3/34 vertices, from caa4a86: #> [1] 2 3 14 #> #> [[117]] #> + 3/34 vertices, from caa4a86: #> [1] 2 3 8 #> #> [[118]] #> + 2/34 vertices, from caa4a86: #> [1] 2 4 #> #> [[119]] #> + 3/34 vertices, from caa4a86: #> [1] 2 4 14 #> #> [[120]] #> + 3/34 vertices, from caa4a86: #> [1] 2 4 8 #> #> [[121]] #> + 2/34 vertices, from caa4a86: #> [1] 2 14 #> #> [[122]] #> + 2/34 vertices, from caa4a86: #> [1] 2 31 #> #> [[123]] #> + 2/34 vertices, from caa4a86: #> [1] 2 18 #> #> [[124]] #> + 2/34 vertices, from caa4a86: #> [1] 2 20 #> #> [[125]] #> + 2/34 vertices, from caa4a86: #> [1] 2 22 #> #> [[126]] #> + 2/34 vertices, from caa4a86: #> [1] 2 8 #> #> [[127]] #> + 1/34 vertex, from caa4a86: #> [1] 1 #> #> [[128]] #> + 2/34 vertices, from caa4a86: #> [1] 1 2 #> #> [[129]] #> + 3/34 vertices, from caa4a86: #> [1] 1 2 3 #> #> [[130]] #> + 4/34 vertices, from caa4a86: #> [1] 1 2 3 4 #> #> [[131]] #> + 5/34 vertices, from caa4a86: #> [1] 1 2 3 4 14 #> #> [[132]] #> + 5/34 vertices, from caa4a86: #> [1] 1 2 3 4 8 #> #> [[133]] #> + 4/34 vertices, from caa4a86: #> [1] 1 2 3 14 #> #> [[134]] #> + 4/34 vertices, from caa4a86: #> [1] 1 2 3 8 #> #> [[135]] #> + 3/34 vertices, from caa4a86: #> [1] 1 2 4 #> #> [[136]] #> + 4/34 vertices, from caa4a86: #> [1] 1 2 4 14 #> #> [[137]] #> + 4/34 vertices, from caa4a86: #> [1] 1 2 4 8 #> #> [[138]] #> + 3/34 vertices, from caa4a86: #> [1] 1 2 14 #> #> [[139]] #> + 3/34 vertices, from caa4a86: #> [1] 1 2 18 #> #> [[140]] #> + 3/34 vertices, from caa4a86: #> [1] 1 2 20 #> #> [[141]] #> + 3/34 vertices, from caa4a86: #> [1] 1 2 22 #> #> [[142]] #> + 3/34 vertices, from caa4a86: #> [1] 1 2 8 #> #> [[143]] #> + 2/34 vertices, from caa4a86: #> [1] 1 3 #> #> [[144]] #> + 3/34 vertices, from caa4a86: #> [1] 1 3 4 #> #> [[145]] #> + 4/34 vertices, from caa4a86: #> [1] 1 3 4 14 #> #> [[146]] #> + 4/34 vertices, from caa4a86: #> [1] 1 3 4 8 #> #> [[147]] #> + 3/34 vertices, from caa4a86: #> [1] 1 3 14 #> #> [[148]] #> + 3/34 vertices, from caa4a86: #> [1] 1 3 9 #> #> [[149]] #> + 3/34 vertices, from caa4a86: #> [1] 1 3 8 #> #> [[150]] #> + 2/34 vertices, from caa4a86: #> [1] 1 4 #> #> [[151]] #> + 3/34 vertices, from caa4a86: #> [1] 1 4 14 #> #> [[152]] #> + 3/34 vertices, from caa4a86: #> [1] 1 4 13 #> #> [[153]] #> + 3/34 vertices, from caa4a86: #> [1] 1 4 8 #> #> [[154]] #> + 2/34 vertices, from caa4a86: #> [1] 1 14 #> #> [[155]] #> + 2/34 vertices, from caa4a86: #> [1] 1 5 #> #> [[156]] #> + 3/34 vertices, from caa4a86: #> [1] 1 5 11 #> #> [[157]] #> + 3/34 vertices, from caa4a86: #> [1] 1 5 7 #> #> [[158]] #> + 2/34 vertices, from caa4a86: #> [1] 1 12 #> #> [[159]] #> + 2/34 vertices, from caa4a86: #> [1] 1 6 #> #> [[160]] #> + 3/34 vertices, from caa4a86: #> [1] 1 6 11 #> #> [[161]] #> + 3/34 vertices, from caa4a86: #> [1] 1 6 7 #> #> [[162]] #> + 2/34 vertices, from caa4a86: #> [1] 1 11 #> #> [[163]] #> + 2/34 vertices, from caa4a86: #> [1] 1 7 #> #> [[164]] #> + 2/34 vertices, from caa4a86: #> [1] 1 13 #> #> [[165]] #> + 2/34 vertices, from caa4a86: #> [1] 1 18 #> #> [[166]] #> + 2/34 vertices, from caa4a86: #> [1] 1 20 #> #> [[167]] #> + 2/34 vertices, from caa4a86: #> [1] 1 22 #> #> [[168]] #> + 2/34 vertices, from caa4a86: #> [1] 1 32 #> #> [[169]] #> + 2/34 vertices, from caa4a86: #> [1] 1 9 #> #> [[170]] #> + 2/34 vertices, from caa4a86: #> [1] 1 8 #> weighted_cliques(g, maximal = TRUE) #> [[1]] #> + 3/34 vertices, from caa4a86: #> [1] 32 33 34 #> #> [[2]] #> + 2/34 vertices, from caa4a86: #> [1] 20 34 #> #> [[3]] #> + 4/34 vertices, from caa4a86: #> [1] 9 31 33 34 #> #> [[4]] #> + 3/34 vertices, from caa4a86: #> [1] 29 32 34 #> #> [[5]] #> + 2/34 vertices, from caa4a86: #> [1] 10 34 #> #> [[6]] #> + 3/34 vertices, from caa4a86: #> [1] 27 30 34 #> #> [[7]] #> + 3/34 vertices, from caa4a86: #> [1] 25 26 32 #> #> [[8]] #> + 2/34 vertices, from caa4a86: #> [1] 25 28 #> #> [[9]] #> + 2/34 vertices, from caa4a86: #> [1] 24 26 #> #> [[10]] #> + 4/34 vertices, from caa4a86: #> [1] 24 30 33 34 #> #> [[11]] #> + 3/34 vertices, from caa4a86: #> [1] 24 28 34 #> #> [[12]] #> + 3/34 vertices, from caa4a86: #> [1] 23 33 34 #> #> [[13]] #> + 3/34 vertices, from caa4a86: #> [1] 21 33 34 #> #> [[14]] #> + 3/34 vertices, from caa4a86: #> [1] 19 33 34 #> #> [[15]] #> + 3/34 vertices, from caa4a86: #> [1] 6 7 17 #> #> [[16]] #> + 3/34 vertices, from caa4a86: #> [1] 16 33 34 #> #> [[17]] #> + 3/34 vertices, from caa4a86: #> [1] 15 33 34 #> #> [[18]] #> + 2/34 vertices, from caa4a86: #> [1] 14 34 #> #> [[19]] #> + 2/34 vertices, from caa4a86: #> [1] 3 10 #> #> [[20]] #> + 2/34 vertices, from caa4a86: #> [1] 3 29 #> #> [[21]] #> + 2/34 vertices, from caa4a86: #> [1] 3 28 #> #> [[22]] #> + 3/34 vertices, from caa4a86: #> [1] 3 9 33 #> #> [[23]] #> + 2/34 vertices, from caa4a86: #> [1] 2 31 #> #> [[24]] #> + 5/34 vertices, from caa4a86: #> [1] 1 2 3 4 14 #> #> [[25]] #> + 5/34 vertices, from caa4a86: #> [1] 1 2 3 4 8 #> #> [[26]] #> + 3/34 vertices, from caa4a86: #> [1] 1 2 18 #> #> [[27]] #> + 3/34 vertices, from caa4a86: #> [1] 1 2 20 #> #> [[28]] #> + 3/34 vertices, from caa4a86: #> [1] 1 2 22 #> #> [[29]] #> + 3/34 vertices, from caa4a86: #> [1] 1 3 9 #> #> [[30]] #> + 3/34 vertices, from caa4a86: #> [1] 1 4 13 #> #> [[31]] #> + 3/34 vertices, from caa4a86: #> [1] 1 5 11 #> #> [[32]] #> + 3/34 vertices, from caa4a86: #> [1] 1 5 7 #> #> [[33]] #> + 2/34 vertices, from caa4a86: #> [1] 1 12 #> #> [[34]] #> + 3/34 vertices, from caa4a86: #> [1] 1 6 11 #> #> [[35]] #> + 3/34 vertices, from caa4a86: #> [1] 1 6 7 #> #> [[36]] #> + 2/34 vertices, from caa4a86: #> [1] 1 32 #> largest_weighted_cliques(g) #> [[1]] #> + 5/34 vertices, from caa4a86: #> [1] 1 2 3 4 14 #> weighted_clique_num(g) #> [1] 15"},{"path":"https://r.igraph.org/reference/which_multiple.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the multiple or loop edges in a graph — which_multiple","title":"Find the multiple or loop edges in a graph — which_multiple","text":"loop edge edge vertex . edge multiple edge exactly head tail vertices another edge. graph without multiple loop edges called simple graph.","code":""},{"path":"https://r.igraph.org/reference/which_multiple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the multiple or loop edges in a graph — which_multiple","text":"","code":"which_multiple(graph, eids = E(graph)) any_multiple(graph) count_multiple(graph, eids = E(graph)) which_loop(graph, eids = E(graph)) any_loop(graph)"},{"path":"https://r.igraph.org/reference/which_multiple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the multiple or loop edges in a graph — which_multiple","text":"graph input graph. eids edges query restricted. default edges graph.","code":""},{"path":"https://r.igraph.org/reference/which_multiple.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the multiple or loop edges in a graph — which_multiple","text":"any_loop() any_multiple() return logical scalar. which_loop() which_multiple() return logical vector. count_multiple() returns numeric vector.","code":""},{"path":"https://r.igraph.org/reference/which_multiple.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find the multiple or loop edges in a graph — which_multiple","text":"any_loop() decides whether graph loop edges. which_loop() decides whether edges graph loop edges. any_multiple() decides whether graph multiple edges. which_multiple() decides whether edges graph multiple edges. count_multiple() counts multiplicity edge graph. Note semantics which_multiple() count_multiple() different. which_multiple() gives TRUE occurrences multiple edge except one. .e. three -j edges graph which_multiple() returns TRUE two count_multiple() returns ‘3’ three. See examples getting rid multiple edges keeping original multiplicity edge attribute.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/which_multiple.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find the multiple or loop edges in a graph — which_multiple","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/which_multiple.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find the multiple or loop edges in a graph — which_multiple","text":"","code":"# Loops g <- make_graph(c(1, 1, 2, 2, 3, 3, 4, 5)) any_loop(g) #> [1] TRUE which_loop(g) #> [1] TRUE TRUE TRUE FALSE # Multiple edges g <- sample_pa(10, m = 3, algorithm = \"bag\") any_multiple(g) #> [1] TRUE which_multiple(g) #> [1] FALSE TRUE TRUE FALSE TRUE FALSE FALSE TRUE TRUE FALSE TRUE TRUE #> [13] FALSE TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE #> [25] FALSE TRUE TRUE count_multiple(g) #> [1] 3 3 3 2 2 1 3 3 3 3 3 3 3 3 3 2 1 2 3 3 3 1 1 1 3 3 3 which_multiple(simplify(g)) #> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [13] FALSE all(count_multiple(simplify(g)) == 1) #> [1] TRUE # Direction of the edge is important which_multiple(make_graph(c(1, 2, 2, 1))) #> [1] FALSE FALSE which_multiple(make_graph(c(1, 2, 2, 1), dir = FALSE)) #> [1] FALSE TRUE # Remove multiple edges but keep multiplicity g <- sample_pa(10, m = 3, algorithm = \"bag\") E(g)$weight <- count_multiple(g) g <- simplify(g, edge.attr.comb = list(weight = \"min\")) any(which_multiple(g)) #> [1] FALSE E(g)$weight #> [1] 3 3 2 1 3 1 1 1 2 1 1 1 1 2 1 2 1"},{"path":"https://r.igraph.org/reference/which_mutual.html","id":null,"dir":"Reference","previous_headings":"","what":"Find mutual edges in a directed graph — which_mutual","title":"Find mutual edges in a directed graph — which_mutual","text":"function checks reciprocal pair supplied edges.","code":""},{"path":"https://r.igraph.org/reference/which_mutual.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find mutual edges in a directed graph — which_mutual","text":"","code":"which_mutual(graph, eids = E(graph), loops = TRUE)"},{"path":"https://r.igraph.org/reference/which_mutual.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find mutual edges in a directed graph — which_mutual","text":"graph input graph. eids Edge sequence, edges probed. default includes edges order ids. loops Logical, whether consider directed self-loops mutual.","code":""},{"path":"https://r.igraph.org/reference/which_mutual.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find mutual edges in a directed graph — which_mutual","text":"logical vector length number edges supplied.","code":""},{"path":"https://r.igraph.org/reference/which_mutual.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find mutual edges in a directed graph — which_mutual","text":"directed graph (,B) edge mutual graph also includes (B,) directed edge. Note multi-graphs handled properly, .e. graph contains two copies (,B) one copy (B,), three edges considered mutual. Undirected graphs contain mutual edges definition.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/which_mutual.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find mutual edges in a directed graph — which_mutual","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/which_mutual.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find mutual edges in a directed graph — which_mutual","text":"","code":"g <- sample_gnm(10, 50, directed = TRUE) reciprocity(g) #> [1] 0.52 dyad_census(g) #> $mut #> [1] 13 #> #> $asym #> [1] 24 #> #> $null #> [1] 8 #> which_mutual(g) #> [1] FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE TRUE TRUE TRUE FALSE #> [13] TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE FALSE FALSE #> [25] FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE #> [37] FALSE TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE TRUE #> [49] TRUE TRUE sum(which_mutual(g)) / 2 == dyad_census(g)$mut #> [1] TRUE"},{"path":"https://r.igraph.org/reference/with_edge_.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor modifier to add edge attributes — with_edge_","title":"Constructor modifier to add edge attributes — with_edge_","text":"Constructor modifier add edge attributes","code":""},{"path":"https://r.igraph.org/reference/with_edge_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor modifier to add edge attributes — with_edge_","text":"","code":"with_edge_(...)"},{"path":"https://r.igraph.org/reference/with_edge_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Constructor modifier to add edge attributes — with_edge_","text":"... attributes add. must named.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/with_edge_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Constructor modifier to add edge attributes — with_edge_","text":"","code":"make_( ring(10), with_edge_( color = \"red\", weight = rep(1:2, 5) ) ) %>% plot()"},{"path":"https://r.igraph.org/reference/with_graph_.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor modifier to add graph attributes — with_graph_","title":"Constructor modifier to add graph attributes — with_graph_","text":"Constructor modifier add graph attributes","code":""},{"path":"https://r.igraph.org/reference/with_graph_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor modifier to add graph attributes — with_graph_","text":"","code":"with_graph_(...)"},{"path":"https://r.igraph.org/reference/with_graph_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Constructor modifier to add graph attributes — with_graph_","text":"... attributes add. must named.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/with_graph_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Constructor modifier to add graph attributes — with_graph_","text":"","code":"make_(ring(10), with_graph_(name = \"10-ring\")) #> IGRAPH d7486fd U--- 10 10 -- 10-ring #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from d7486fd: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10"},{"path":"https://r.igraph.org/reference/with_igraph_opt.html","id":null,"dir":"Reference","previous_headings":"","what":"Run code with a temporary igraph options setting — with_igraph_opt","title":"Run code with a temporary igraph options setting — with_igraph_opt","text":"Run code temporary igraph options setting","code":""},{"path":"https://r.igraph.org/reference/with_igraph_opt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run code with a temporary igraph options setting — with_igraph_opt","text":"","code":"with_igraph_opt(options, code)"},{"path":"https://r.igraph.org/reference/with_igraph_opt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run code with a temporary igraph options setting — with_igraph_opt","text":"options named list options change. code code run.","code":""},{"path":"https://r.igraph.org/reference/with_igraph_opt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run code with a temporary igraph options setting — with_igraph_opt","text":"result code.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/with_igraph_opt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run code with a temporary igraph options setting — with_igraph_opt","text":"","code":"with_igraph_opt( list(sparsematrices = FALSE), make_ring(10)[] ) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> [1,] 0 1 0 0 0 0 0 0 0 1 #> [2,] 1 0 1 0 0 0 0 0 0 0 #> [3,] 0 1 0 1 0 0 0 0 0 0 #> [4,] 0 0 1 0 1 0 0 0 0 0 #> [5,] 0 0 0 1 0 1 0 0 0 0 #> [6,] 0 0 0 0 1 0 1 0 0 0 #> [7,] 0 0 0 0 0 1 0 1 0 0 #> [8,] 0 0 0 0 0 0 1 0 1 0 #> [9,] 0 0 0 0 0 0 0 1 0 1 #> [10,] 1 0 0 0 0 0 0 0 1 0 igraph_opt(\"sparsematrices\") #> [1] TRUE"},{"path":"https://r.igraph.org/reference/with_vertex_.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor modifier to add vertex attributes — with_vertex_","title":"Constructor modifier to add vertex attributes — with_vertex_","text":"Constructor modifier add vertex attributes","code":""},{"path":"https://r.igraph.org/reference/with_vertex_.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor modifier to add vertex attributes — with_vertex_","text":"","code":"with_vertex_(...)"},{"path":"https://r.igraph.org/reference/with_vertex_.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Constructor modifier to add vertex attributes — with_vertex_","text":"... attributes add. must named.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/with_vertex_.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Constructor modifier to add vertex attributes — with_vertex_","text":"","code":"make_( ring(10), with_vertex_( color = \"#7fcdbb\", frame.color = \"#7fcdbb\", name = LETTERS[1:10] ) ) %>% plot()"},{"path":"https://r.igraph.org/reference/without_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Construtor modifier to remove all attributes from a graph — without_attr","title":"Construtor modifier to remove all attributes from a graph — without_attr","text":"Construtor modifier remove attributes graph","code":""},{"path":"https://r.igraph.org/reference/without_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construtor modifier to remove all attributes from a graph — without_attr","text":"","code":"without_attr()"},{"path":[]},{"path":"https://r.igraph.org/reference/without_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Construtor modifier to remove all attributes from a graph — without_attr","text":"","code":"g1 <- make_ring(10) g1 #> IGRAPH 7680e5d U--- 10 10 -- Ring graph #> + attr: name (g/c), mutual (g/l), circular (g/l) #> + edges from 7680e5d: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 g2 <- make_(ring(10), without_attr()) g2 #> IGRAPH 41990c3 U--- 10 10 -- #> + edges from 41990c3: #> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10"},{"path":"https://r.igraph.org/reference/without_loops.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor modifier to drop loop edges — without_loops","title":"Constructor modifier to drop loop edges — without_loops","text":"Constructor modifier drop loop edges","code":""},{"path":"https://r.igraph.org/reference/without_loops.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor modifier to drop loop edges — without_loops","text":"","code":"without_loops()"},{"path":[]},{"path":"https://r.igraph.org/reference/without_loops.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Constructor modifier to drop loop edges — without_loops","text":"","code":"# An artificial example make_(full_graph(5, loops = TRUE)) #> IGRAPH a33943e U--- 5 15 -- Full graph #> + attr: name (g/c), loops (g/l) #> + edges from a33943e: #> [1] 1--1 1--2 1--3 1--4 1--5 2--2 2--3 2--4 2--5 3--3 3--4 3--5 4--4 4--5 5--5 make_(full_graph(5, loops = TRUE), without_loops()) #> IGRAPH 7d47154 U--- 5 10 -- Full graph #> + attr: name (g/c), loops (g/l) #> + edges from 7d47154: #> [1] 1--2 1--3 1--4 1--5 2--3 2--4 2--5 3--4 3--5 4--5"},{"path":"https://r.igraph.org/reference/without_multiples.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor modifier to drop multiple edges — without_multiples","title":"Constructor modifier to drop multiple edges — without_multiples","text":"Constructor modifier drop multiple edges","code":""},{"path":"https://r.igraph.org/reference/without_multiples.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor modifier to drop multiple edges — without_multiples","text":"","code":"without_multiples()"},{"path":[]},{"path":"https://r.igraph.org/reference/without_multiples.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Constructor modifier to drop multiple edges — without_multiples","text":"","code":"sample_(pa(10, m = 3, algorithm = \"bag\")) #> IGRAPH 58de937 D--- 10 27 -- Barabasi graph #> + attr: name (g/c), power (g/n), m (g/n), zero.appeal (g/n), algorithm #> | (g/c) #> + edges from 58de937: #> [1] 2->1 2->1 2->1 3->2 3->2 3->1 4->1 4->3 4->1 5->3 5->1 5->3 #> [13] 6->1 6->3 6->1 7->1 7->3 7->3 8->1 8->1 8->3 9->1 9->3 9->1 #> [25] 10->1 10->1 10->2 sample_(pa(10, m = 3, algorithm = \"bag\"), without_multiples()) #> IGRAPH 2f085b3 D--- 10 16 -- Barabasi graph #> + attr: name (g/c), power (g/n), m (g/n), zero.appeal (g/n), algorithm #> | (g/c) #> + edges from 2f085b3: #> [1] 2->1 3->1 4->1 4->2 4->3 5->1 5->2 6->3 7->1 7->3 8->1 8->6 #> [13] 9->1 9->2 9->8 10->1"},{"path":"https://r.igraph.org/reference/write.graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Writing the graph to a file in some format — write.graph","title":"Writing the graph to a file in some format — write.graph","text":"write.graph() renamed write_graph() create consistent API.","code":""},{"path":"https://r.igraph.org/reference/write.graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Writing the graph to a file in some format — write.graph","text":"","code":"write.graph( graph, file, format = c(\"edgelist\", \"pajek\", \"ncol\", \"lgl\", \"graphml\", \"dimacs\", \"gml\", \"dot\", \"leda\"), ... )"},{"path":"https://r.igraph.org/reference/write.graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Writing the graph to a file in some format — write.graph","text":"graph graph export. file connection string giving file name write graph . format Character string giving file format. Right now pajek, graphml, dot, gml, edgelist, lgl, ncol dimacs implemented. igraph 0.4 argument case insensitive. ... , format specific arguments, see .","code":""},{"path":"https://r.igraph.org/reference/write_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Writing the graph to a file in some format — write_graph","title":"Writing the graph to a file in some format — write_graph","text":"write_graph() general function exporting graphs foreign file formats, however many formats implemented right now.","code":""},{"path":"https://r.igraph.org/reference/write_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Writing the graph to a file in some format — write_graph","text":"","code":"write_graph( graph, file, format = c(\"edgelist\", \"pajek\", \"ncol\", \"lgl\", \"graphml\", \"dimacs\", \"gml\", \"dot\", \"leda\"), ... )"},{"path":"https://r.igraph.org/reference/write_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Writing the graph to a file in some format — write_graph","text":"graph graph export. file connection string giving file name write graph . format Character string giving file format. Right now pajek, graphml, dot, gml, edgelist, lgl, ncol dimacs implemented. igraph 0.4 argument case insensitive. ... , format specific arguments, see .","code":""},{"path":"https://r.igraph.org/reference/write_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Writing the graph to a file in some format — write_graph","text":"NULL, invisibly.","code":""},{"path":"https://r.igraph.org/reference/write_graph.html","id":"edge-list-format","dir":"Reference","previous_headings":"","what":"Edge list format","title":"Writing the graph to a file in some format — write_graph","text":"edgelist format simple text file, one edge line, two vertex ids separated space character. file sorted first second column. format additional arguments.","code":""},{"path":"https://r.igraph.org/reference/write_graph.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Writing the graph to a file in some format — write_graph","text":"Adai , Date SV, Wieland S, Marcotte EM. LGL: creating map protein function algorithm visualizing large biological networks. J Mol Biol. 2004 Jun 25;340(1):179-90.","code":""},{"path":[]},{"path":"https://r.igraph.org/reference/write_graph.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Writing the graph to a file in some format — write_graph","text":"Gabor Csardi csardi.gabor@gmail.com","code":""},{"path":"https://r.igraph.org/reference/write_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Writing the graph to a file in some format — write_graph","text":"","code":"g <- make_ring(10) file <- tempfile(fileext = \".txt\") write_graph(g, file, \"edgelist\") if (!interactive()) { unlink(file) }"},{"path":"https://r.igraph.org/news/index.html","id":"igraph-203","dir":"Changelog","previous_headings":"","what":"igraph 2.0.3","title":"igraph 2.0.3","text":"CRAN release: 2024-03-13 See https://github.com/igraph/rigraph/blob/3299d31/src/vendor/cigraph/CHANGELOG.md complete changelog bundled C core, https://github.com/igraph/rigraph/compare/f3fa58b..3299d31#diff-aeb78e0159780a9b26daabaf6f95f450b0cfec7161fc735f27ad69145a57dc84 changes since igraph 2.0.1. (permanent link recent changelog C core used R package https://github.com/igraph/rigraph/blob/main/src/vendor/cigraph/CHANGELOG.md.)","code":""},{"path":"https://r.igraph.org/news/index.html","id":"features-2-0-3","dir":"Changelog","previous_headings":"","what":"Features","title":"igraph 2.0.3","text":"GMP longer dependency (#1256), libxml2 (#1282) glpk optional. Update vendored sources igraph/igraph@857a125069c226f266562b3781b82833fe1d59d9. New voronoi_cells() compute Voronoi partitioning graph (#1173).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-2-0-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 2.0.3","text":"Fix rglplot(edge_label = ) (#1267).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"continuous-integration-2-0-3","dir":"Changelog","previous_headings":"","what":"Continuous integration","title":"igraph 2.0.3","text":"Run examples sanitizer (#1288). Add scheduled builds.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-2-0-3","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 2.0.3","text":"Make x11() usage example happen interactive sessions (#1301). Remove misleading comment warning given warning given (#1294). Improve min_st_separators() documentation (#1264). Add link discussion forum (#1279) logo (#1280). Add code finding duplicate @seealso, use (#1270). Remove duplicate @seealso ?sample_pa (#1268). Remove incorrect claim handling complete graphs is_separator() is_min_separator() (#1263). Fix error messages mentioning mention upgrade_graph() instead nonexisting upgrade_version() (#1252). Split is_bipartite() manual page manual page (#1230). Improve bug report template. CITATION.cff contains first three version components. Install lock workflow lock stale discussions one year (#1304).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-2-0-3","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 2.0.3","text":"Replace use deprecated barabasi.game() sample_pa() (#1291). Auto-generate are_adjacent(), avoid deprecated igraph_are_connected() C function (#1254).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-202","dir":"Changelog","previous_headings":"","what":"igraph 2.0.2","title":"igraph 2.0.2","text":"CRAN release: 2024-02-17 See https://github.com/igraph/rigraph/blob/f3fa58b/src/vendor/cigraph/CHANGELOG.md complete changelog bundled C core, https://github.com/igraph/rigraph/compare/1bd2bf79..f3fa58b#diff-aeb78e0159780a9b26daabaf6f95f450b0cfec7161fc735f27ad69145a57dc84 changes since igraph 2.0.1. (permanent link recent changelog C core used R package https://github.com/igraph/rigraph/blob/main/src/vendor/cigraph/CHANGELOG.md.)","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-2-0-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 2.0.2","text":"g + vertices(1, 2, foo = 3) works , regression introduced igraph 2.0.0 (#1247). sample_pa() respects .seq .dist arguments , regression introduced igraph 2.0.0 (#1226). isomorphisms() subgraph_isomorphisims(method = \"vf2\") work , regression introduced 2.0.0 (#1219). biconnected_components() now returns edge vertex sequences , regression introduced 2.0.0 (#1213). Remove zeros order order.components returned dfs(), regression introduced 2.0.0 (#1179). Memory leaks converting data C (#1196).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"features-2-0-2","dir":"Changelog","previous_headings":"","what":"Features","title":"igraph 2.0.2","text":"realize_bipartite_degseq() creates bipartite graph two degree sequences (#1212). is_biconnected() checks graph biconnected (#1204). distances() now supports Floyd-Warshall algorithm (#1186).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-2-0-2","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 2.0.2","text":"Use culturally diverse names intro vignettes (#1246). Formatting tweaks introductory vignettes (#1243). Recommend {pak} instead {remotes} (#1228). Fix typo mean_distance() docs. Update troubleshooting document, emphasize issues Anaconda environments (#1209). Improved docs shortest path functions (#1201). Document \"dsatur\" heuristic greedy_vertex_coloring() (#1206). Remove scg related docs (#1167). Fix typo ?articulation_points (#1191). Improve installation troubleshooting instructions (#1184). Improve docs assortativity (#1151).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"testing-2-0-2","dir":"Changelog","previous_headings":"","what":"Testing","title":"igraph 2.0.2","text":"Add tests isomorphisms() subgraph_isomorphisms() (#1225).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"packaging-2-0-2","dir":"Changelog","previous_headings":"","what":"Packaging","title":"igraph 2.0.2","text":"Always use bundled mini-gmp (#1233). config.h defines HAVE___UINT128_T (#1216). rely program configuration (#1232). configure manage libxml multiple include paths (#1197). Remove empty string configure (#1235). Link Fortran runtime Windows needed arpack. (#1215). Workaround deprecated enum values supported old GCC (#1205). HAVE_GFORTRAN flag win ucrt (#1171). make_empty_graph() now fully auto-generated (#1068). Eliminate manual edits autogenerated files (#1207). Add read-comments RStudio IDE (#1152).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-2-0-2","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 2.0.2","text":"Remove unused patch files (#1234). Update stimulus 0.21.4 (#1210). Avoid duplicate objects (#1223). Eliminate compiler warning simpleraytracer (#1185).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-2011","dir":"Changelog","previous_headings":"","what":"igraph 2.0.1.1","title":"igraph 2.0.1.1","text":"CRAN release: 2024-01-30","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-2-0-1-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 2.0.1.1","text":"Avoid .R() deprecated R 4.4.0.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-201","dir":"Changelog","previous_headings":"","what":"igraph 2.0.1","title":"igraph 2.0.1","text":"CRAN release: 2024-01-29","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-2-0-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 2.0.1","text":"Use cpp11 simpleraytracer glue avoid -Wlto warnings (#1163).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-200","dir":"Changelog","previous_headings":"","what":"igraph 2.0.0","title":"igraph 2.0.0","text":"major release brings development line C core https://github.com/igraph/igraph. See https://github.com/igraph/rigraph/blob/1bd2bf79/src/vendor/cigraph/CHANGELOG.md complete changelog, particular section “Breaking changes”. (permanent link recent changelog C core used R package https://github.com/igraph/rigraph/blob/main/src/vendor/cigraph/CHANGELOG.md.) Version 1.6.0 R package used version 0.9.9 C core. changes 0.10 series C core relevant version 2.0.0 R package, C core functions exposed R interface. Changes implementation functions C core may reflected functions R package. change log summary additional changes R interface.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"breaking-changes-2-0-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"igraph 2.0.0","text":"get.edge.ids(multi = TRUE) as_adjacency_matrix(edges = ) longer supported (#1101, #1080). Remove NA padding dfs(unreachable = FALSE)$order $order.bfs(unreachable = FALSE)$order, also igraph_options(return.vs.es = FALSE) (#1062, #1124). laplacian_matrix(normalized = TRUE) uses different normalization method (#1102). fit_power_law() longer returns KS.p component. Remove default value loops argument centr_degree_tmax() (#1114). as_adjacency_matrix() longer supports attributes type character (#1072). Remove graph.isomorphic.34() (#1065, #1067). Use lifecycle::deprecate_soft() deprecated functions (#1024, #1025, #1104). system libraries GLPK, GMP, libxml2 now mandatory compiling source.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-2-0-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 2.0.0","text":"Add scalar conversion checks critical places (#1069). Check receive scalar expecting scalar C code (#1051). Check matrix sizes supported range passing R (#1066). transitivity() now produces named vector local (weighted) case (#1057). plot() correctly computes intersections edges rectangle vertices (#1021). Fix compilation Windows spaces Rtools path (#1000).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"features-2-0-0","dir":"Changelog","previous_headings":"","what":"Features","title":"igraph 2.0.0","text":"Use 30 bits R’s RNG (#1079). Breaking change: Remove NA padding dfs(unreachable = FALSE)$order $order.bfs(unreachable = FALSE)$order, also igraph_options(return.vs.es = FALSE) (#1062, #1124). New k_shortest_paths() compute first k shortest paths two vertices (#1028).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-2-0-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 2.0.0","text":"Add GitHub bug report form. New vignette(\"deprecated-dot-case\") lists deprecated functions alternatives (#1013). Move deprecation badge top doc pages. Remove usage get.adjacency() intro vignettes (#1084). Fix math formatting fit_power_law() docs. Fix incorrect usage subgraph.edges() example. Clarify Infomap considers edge directions. Improve edge connectivity docs (#1119). Add missing diacritics.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-2-0-0","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 2.0.0","text":"Use [] assignment converting matrices (#1035). Move towards autogenerating bindings (#1043). Use %||% rlang (#1112). Replace loop lapply() returning vertex edge sets (#1033). duplicate prototypes, use common header rinterface.c rinterface_extra.c (#1055). Clean auto-generation code (#1031), remove unused parts code generation (#1032), eliminate use deprecated C functions. Use integers mode enum cluster_label_prop(). Standardize handling stimulus enum types (#1064). Remove unused vectorlist / matrixlist destructors (#1070). Remove unused stimulus type VERTEXSETLIST_INT (#1049). Remove unused types (#1060). Fix Stimulus definitions (#997). Avoid deprecated R_igraph_automorphisms() (#999). Use new ARPACK_DEFAULTS symbol C core default arpack options. Ignore upstream CITATION file avoid R CMD check NOTE (#1007). Add Aviator configuration.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"testing-2-0-0","dir":"Changelog","previous_headings":"","what":"Testing","title":"igraph 2.0.0","text":"Add as_biadjacency_matrix() tests named vectors (#1154, #1155). Test transferring colors isomorphism functions (#1050).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-160","dir":"Changelog","previous_headings":"","what":"igraph 1.6.0","title":"igraph 1.6.0","text":"CRAN release: 2023-12-11","code":""},{"path":"https://r.igraph.org/news/index.html","id":"breaking-changes-1-6-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"igraph 1.6.0","text":"New arpack_defaults() replaces igraph.arpack.default arpack_defaults lists (#800), consistent usage checks (#966). Define methods ape::.phylo() instead as_phylo() generic, remove deprecated asPhylo() (#763). bfs() unreachable nodes returns zero instead NaN rank (#956), negative instead NaN dist (#926). random_walk() adds one step, resulting list vertices length steps + 1 (#934). girth() returns Inf acyclic graphs (#931). Remove behaviour / parameters deprecated 1.3 (#842). Remove scg_eps(), scg_group() scg_semi_proj(), broken longer maintained (#946).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-1-6-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 1.6.0","text":"Fix printf() warning (#975). Fix calls isSymmetric() matrix objects class (#965). Reduce frequency interruption checks (#957).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"features-1-6-0","dir":"Changelog","previous_headings":"","what":"Features","title":"igraph 1.6.0","text":"Change “incidence matrix” naming “biadjacency matrix” (#962). Add aliases using neighborhood terminology ego functions: (#950). Rename arguments assortativity(values, values.) types1 types2 (#952). Add ellipsis cluster_label_prop() (#954). Placeholders is_acyclic() is_forest(), implemented igraph 2.0.0 (#945). is_tree(details = TRUE) designates first vertex root non-trees (#935). all_shortest_paths() returns vertex list res vpaths components (#930). Improve symmetry check adjacency matrices input (#911). Warn non-symmetric undirected adjacency matrix (#904).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-1-6-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 1.6.0","text":"Remove duplicate \\seealso{} (#948). Update knnk() sir() docs. Fix formula reciprocity() docs. strength() give warning weights given. Update sample_smallworld() manual page (#895). Correct documentation weighted cliques. Update Erdos-Renyi model docs.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"testing-1-6-0","dir":"Changelog","previous_headings":"","what":"Testing","title":"igraph 1.6.0","text":"Clean tests (#967). Stabilize tests cluster_label_prop() (#932), sample_pa() (#927), cluster_louvain() (#933), SIR (#936), sample_forestfire() (#929). Hard-code graph used test (#928). Update GML test file (#925). Improve test sampling Dirichlet distribution (#923). Omit test longer holds igraph 0.10 (#922). Stabilize test preparation upgrade (#920). Stabilize plot test (#919). Fix checks.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-151","dir":"Changelog","previous_headings":"","what":"igraph 1.5.1","title":"igraph 1.5.1","text":"CRAN release: 2023-08-10","code":""},{"path":"https://r.igraph.org/news/index.html","id":"breaking-changes-1-5-1","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"igraph 1.5.1","text":"Breaking change: start deprecation estimate_betweenness(), estimate_edge_betweenness(), estimate_closeness() (#852).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-1-5-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 1.5.1","text":"identical_graphs() now correctly detects identical graphs without node edge attributes (#757).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-1-5-1","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 1.5.1","text":"Change ownership rules attribute objects (#870). R_SEXP_to_igraph() R_SEXP_to_igraph_copy() get igraph_t object external pointer (#865). Remove ETIME() call Fortran code, already CRAN version 1.5.0.1 (#858). Ensure _GNU_SOURCE always defined (#877). Fix make clean (#860). Fix generation code functions VERTEX_COLOR -arguments (#850). Use -lquadmath Makevars.win, compatibility alternative R distributions Microsoft R Open (#855). getRversion() uses strings.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-1-5-1","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 1.5.1","text":"Add cffr file GHA workflow updates automatically (#873). Undeprecate neighborhood() (#851). Remove redundant reference AUTHORS DESCRIPTION.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"refactoring-1-5-1","dir":"Changelog","previous_headings":"","what":"Refactoring","title":"igraph 1.5.1","text":"Breaking change: start deprecation estimate_betweenness(), estimate_edge_betweenness(), estimate_closeness() (#852).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-150","dir":"Changelog","previous_headings":"","what":"igraph 1.5.0","title":"igraph 1.5.0","text":"CRAN release: 2023-06-16","code":""},{"path":"https://r.igraph.org/news/index.html","id":"breaking-changes-1-5-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"igraph 1.5.0","text":"internal format graph objects changed mostly backward-compatible way, prepare upgrading C core 0.10. Details described https://github.com/igraph/rigraph/wiki/-igraph-object-format. Accessing graph objects created older igraph version give clean error message instructions (#832). new format read igraph 1.4.3 older, following error raised trying : supported remedy upgrade igraph package version 1.5.0 later. graph_version() now returns integer scalar (#832, #847), 4 igraph 1.5.0 (#835).","code":"This graph was created by an old(er) igraph version. Call upgrade_graph() on it to use with the current igraph version For now we convert it on the fly... Error in is_directed(object) : REAL() can only be applied to a 'numeric', not a 'NULL'"},{"path":"https://r.igraph.org/news/index.html","id":"features-1-5-0","dir":"Changelog","previous_headings":"","what":"Features","title":"igraph 1.5.0","text":"Vertex edge sequences converted numeric vectors used attributes (#808). New largest_component() returns largest connected component (#786, @ngmaclaren).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-1-5-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 1.5.0","text":"Fix error message make_graph() simplify = ... used non-formula (#834).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"testing-1-5-0","dir":"Changelog","previous_headings":"","what":"Testing","title":"igraph 1.5.0","text":"Add tests graph_from_literal() (#826). Reenable serialization test tests dyad_census(), stabilize tests (#809, #822, #823).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-1-5-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 1.5.0","text":"documentation R package now hosted https://r.igraph.org/ (#780). Update vignette(\"installation-troubleshooting\"). Fix use deprecated functions examples, e.g., replace gsize() ecount() (#827). Fix typos ?eigen_centrality docs (@JJ). Update CONTRIBUTING.md ORCID information (#791, #774). Add DOI CITATION (#773).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-1-5-0","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 1.5.0","text":"Add data old igraph versions constructed objects, tests (#838). Ensure ’re always using named indexes access internal data structure (#784). Prepare migration igraph/C 0.10 (#781). Update generated interface (#765).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-143","dir":"Changelog","previous_headings":"","what":"igraph 1.4.3","title":"igraph 1.4.3","text":"CRAN release: 2023-05-22","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-1-4-3","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 1.4.3","text":"Fix tests dev waldo (#779, @hadley). Fix linking Windows: gfortran needs quadmath. (#778).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-1-4-3","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 1.4.3","text":"Mention limitation Pajek reader (#776).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-142","dir":"Changelog","previous_headings":"","what":"igraph 1.4.2","title":"igraph 1.4.2","text":"CRAN release: 2023-04-07","code":""},{"path":"https://r.igraph.org/news/index.html","id":"breaking-changes-1-4-2","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"igraph 1.4.2","text":"Remove igraph.eigen.default() eigen_defaults, introduce internal eigen_defaults() function (#741). Remove broken nexus*() functions (#705), srand() (#701).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"c-core-1-4-2","dir":"Changelog","previous_headings":"","what":"C core","title":"igraph 1.4.2","text":"Update C core. ARPACK-based calculations now interruptible. shortest_paths() all_shortest_paths() longer crash invalid vertex passed weights used. See diff details.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"printing-1-4-2","dir":"Changelog","previous_headings":"","what":"Printing","title":"igraph 1.4.2","text":"Use true vertex names printing vertex sets. vertex set captures relationship vertices (e.g., father component bfs()), vertex set printed named vector (#754). Suggest restarting R session fatal error (#745).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-1-4-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 1.4.2","text":"as_long_data_frame() now correctly processes vertex attributes works graphs without vertex attributes (#748). .hclust(hrg.fit(g)) works (#721).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-1-4-2","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 1.4.2","text":"documentation now available https://igraph.org/ (#743). Reorganize function reference (#662). Replace graph() make_graph() examples (#738). Add docs .hclust.igraphHRG() (#733). Merged man page hub_score() authority_score() (#698). Refactor contributors listing (#647). Improve “family” titles (#679). Improve docs ego/neighborhood functions. Improve transitivity() docs.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-1-4-2","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 1.4.2","text":"Introduce cpp11 package improve error handling long run (#720). Avoid longjmp error handling interrupts (#751). .hclust.igraphHRG uses .Call() interface (#727).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-141","dir":"Changelog","previous_headings":"","what":"igraph 1.4.1","title":"igraph 1.4.1","text":"CRAN release: 2023-02-24","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-1-4-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 1.4.1","text":"console() now works provides Tcl/Tk based UI igraph can post status messages progress info (#664). Fix errors printing long vertex names (#677, @ahmohamed). Fix regression broke builds systems (e.g., GCC version 5 earlier), introduced igraph 1.4.0 (#670, #671). fit_hrg() crash called graph less three vertices.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"documentation-1-4-1","dir":"Changelog","previous_headings":"","what":"Documentation","title":"igraph 1.4.1","text":"Various improvements (#663, @maelle; #667).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"internal-1-4-1","dir":"Changelog","previous_headings":"","what":"Internal","title":"igraph 1.4.1","text":"Fix warning yyget_leng() returning wrong type using LTO (#676). Don’t mention C++11 C++17 best compatibility newest R older compilers, still requesting C++ compiler linking. Don’t ignore build/ building package vignette index built . Skip plot test entirely R-devel. Avoid submodules building igraph (#674). Makevars cleanup (#671). Add Zenodo configuration file.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-140","dir":"Changelog","previous_headings":"","what":"igraph 1.4.0","title":"igraph 1.4.0","text":"CRAN release: 2023-02-10","code":""},{"path":"https://r.igraph.org/news/index.html","id":"breaking-changes-1-4-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"igraph 1.4.0","text":"Breaking change: Allow change attribute type setting attribute vertices edges; attributes length 1 length target set allowed (#633).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"added-1-4-0","dir":"Changelog","previous_headings":"","what":"Added","title":"igraph 1.4.0","text":"tkplot() gained palette argument now using palette plot() default, sake consistency. plot.igraph() gained loop.size argument can used scale common radius loop edges.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"fixed-1-4-0","dir":"Changelog","previous_headings":"","what":"Fixed","title":"igraph 1.4.0","text":"default maximum number iterations ARPACK increased 3000 match igraph C core. Rare convergence problems corrected cluster_leading_eigen(). ARPACK-based functions now respect random seeds set R generating random starting vector. igraph_version() returned invalid value 1.3.4, now corrected. value par(xpd=...) now restored plotting graph. Fixed bug .dendrogram.communities() large dendrograms, thanks @pkharchenko (see PR #292). Fixed two bugs graph_from_incidence_matrix() prevented creation directed graphs mode=\"\" dense sparse matrices. dfs() accidentally returned zero-based root vertex indices result object; now fixed indices now 1-based. as_graphnel() duplicate loop edges . as_graphnel() now checks input graph multi-edges. Multi-edges supported graphNEL class. convex_hull() now returns vertices convex hull 1-based indexing. rgl.*() function calls codebase replaced equivalent *3d() function calls preparation upcoming deprecations rgl (see PR #619) plot.igraph() use frame=... partial argument calling plot.default(). default NULL value frame.plot now also handled correctly. hub_score() authority_score() considered self-loops diagonal adjacency matrix undirected graphs, thus result identical obtained eigen_centrality() loopy undirected graphs. now corrected. distances() longer ignores mode parameter algorithm='johnson'.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"deprecated-1-4-0","dir":"Changelog","previous_headings":"","what":"Deprecated","title":"igraph 1.4.0","text":"automorphisms() renamed count_automorphisms(); old name still available, deprecated.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"other-1-4-0","dir":"Changelog","previous_headings":"","what":"Other","title":"igraph 1.4.0","text":"Documentation improvements. Github repository now moved single-branch setup package can built main branch directly. Added igraph extended tutorial R vignette (#587). igraph now homepage based pkgdown thanks @maelle (see #645). eventually become official homepage.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-135","dir":"Changelog","previous_headings":"","what":"igraph 1.3.5","title":"igraph 1.3.5","text":"CRAN release: 2022-09-22 Added: mark.groups=... argument plot.igraph() now accepts communities objects Fixed: Negative degree exponents allowed sample_pa() sample_aging_pa(). Package updated compatible Matrix 1.5. : Documentation improvements fixes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-134","dir":"Changelog","previous_headings":"","what":"igraph 1.3.4","title":"igraph 1.3.4","text":"CRAN release: 2022-07-19 Added: sample_asym_pref() now returns generated types vertices vertex attributes named outtype intype. Fixed: layout_nicely() recurse infinitely assigned layout attribute graph layout_nicely() now ignores edge weights non-positive edge weights. needed igraph 1.3.3 started validating edge weights layout_with_fr() layout_with_drl(), resulting errors layout_nicely() used weighted graphs negative weights. Since layout_nicely() default layout algorithm plot(), users even aware using FR DrL layouts behind scenes. Now policy layout_nicely() attempts get job done without errors possible, even means edge weights must ignored. warning printed case.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-133","dir":"Changelog","previous_headings":"","what":"igraph 1.3.3","title":"igraph 1.3.3","text":"CRAN release: 2022-07-14 Added: reverse_edges() reverses specific edges graph. Single-bracket indexing V() E() resolves attribute names indexing expressions default (instance, E(g)[weight > x] matches edges weight larger threshold). can problematic attribute masks one variables local evaluation context. now pronoun called .env (similarly rlang::.env) allows force attribute name lookup calling environment. sake completeness, also provide .data (similarly rlang::.data) force attribute name lookup vertex / edge attributes . pronouns automatically injected environment indexing expression evaluated. Deprecated: Names functions can used inside V() E() indexing start dot since igraph 1.1.1; however, old dotless names print deprecation warning may gone unnoticed years. introducting deprecation warning nei(), innei(), outnei(), inc(), () () inside single-bracket indexing vertex edge sequences remove old variants soon.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-132","dir":"Changelog","previous_headings":"","what":"igraph 1.3.2","title":"igraph 1.3.2","text":"CRAN release: 2022-06-13 C core updated 0.9.9, fixing range bugs. Fixed: length size-zero communities objects now reported correctly. layout_with_kk() fail produce reasonable results default initial coordinates. corrected, however, function longer produces precisely output given graph . restore previous behaviour, use layout_with_kk(g, coord=layout_in_circle(g)) 2D layout_with_kk(g, dim=3, coord=layout_on_sphere(g)) 3D. Indexing igraph.vs object v[x, na_ok=T] now correctly handles na_ok argument cases; previous versions ignored x single number. : Documentation improvements fixes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-131","dir":"Changelog","previous_headings":"","what":"igraph 1.3.1","title":"igraph 1.3.1","text":"CRAN release: 2022-04-20 Fixed: graph_from_adjacency_matrix() now works sparse matrices even cell values sparse matrix unspecified. Fixed crash cluster_walktrap() modularity=FALSE membership=FALSE. cluster_walktrap() longer accepts invalid weight vectors. cluster_walktrap() longer returns modularity vector invalid length disconnected graphs. also fixes rare failures function weighted disconnected graphs. edge_attr() ignore index=... argument . automorphisms(), automorphism_group() canonical_permutation() now allow possible values supported C core sh argument. Earlier versions supported \"fm\". vertex.frame.width plotting parameter now allows zero negative values; simply remove outline corresponding vertex. documentation sh argument BLISS isomorphism algorithm isomorphic() fixed; earlier versions incorrectly referred sh1 sh2. dominator_tree() now conforms documentation respect dom component result: contains indices dominator vertices vertex -1 root dominator tree. Mentions \"power\" algorithm page_rank() removed documentation, method longer available. Several documentation fixes bring docs date new behaviours igraph 1.3.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-130","dir":"Changelog","previous_headings":"","what":"igraph 1.3.0","title":"igraph 1.3.0","text":"CRAN release: 2022-04-01 C core updated 0.9.7, fixing range bugs introducing number new functions. Added: has_eulerian_path() has_eulerian_cycle() decides whether Eulerian path cycle graph. eulerian_path() eulerian_cycle() returns edges vertices Eulerian path cycle graph. any_loop() checks whether graph contains least one loop edge. is_tree() checks whether graph tree also finds possible root to_prufer() converts tree graph Prufer sequence make_from_prufer() creates tree graph Prufer sequence sample_tree() sample labelled trees uniformly random sample_spanning_tree() sample spanning trees undirected graph uniformly random automorphisms() canonical_permutation() now supports vertex colors random_edge_walk() record edges traversed random walk harmonic_centrality() calculates harmonic centrality vertices, optionally cutoff path lengths mean_distance() now supports edge weights can also return number unconnected vertex pairs details=TRUE passed argument greedy_vertex_coloring() finds vertex colorings based simple greedy algorithm. bridges() finds bridges (cut-edges) graph frame width circle, rectangle square vertex shapes can now adjusted plots frame.width vertex attribute vertex.frame.width keyword argument, thanks @simoncarrignon . See PR #500 details. automorphism_group() returns possible (necessarily minimal) generating set automorphism group graph. global_efficiency() calculates global efficiency graph. local_efficiency() calculates local efficiency vertex graph. average_local_efficiency() calculates average local efficiency across set vertices graph. rewire(each_edge(...)) now supports rewiring one endpoint edge. realize_degseq() generates graphs degree sequences deterministic manner. also available make_(degseq(..., deterministic=TRUE)). clique_size_counts() counts cliques different sizes without storing . feedback_arc_set() finds minimum-weight feedback arc set graph, either exact integer programming algorithm linear-time approximation. make_bipartite_graph() now handles vertices names. shortest_paths() now supports graphs negative edge weights. min_cut() now supports s-t mincuts even value.=FALSE. .matrix() now supports converting igraph graph adjacency edge list matrix representation. See .matrix.igraph() details. function migrated intergraph; thanks Michal Bojanowski. Fixed: is_connected() now returns FALSE null graph Calling length() graph now returns number vertices make consistent indexing graph [[. diameter() now corrently returns infinity disconnected graphs unconnected=FALSE. Previous versions returned number vertices plus one, clearly invalid weighted graphs. mean_distance() now correctly treats path length disconnected vertices infinite unconnected=FALSE. Previous versions used number vertices plus one, adding bias towards number, even graph weighted number vertices plus one path length safely considered longer “valid” path. layout_with_sugiyama() now handles case exactly one extra virtual node correctly; fixes #85 bfs() dfs() callback functions now correctly receive 1-based vertex indices ranks; used zero-based earlier versions Accidentally returning non-logical value bfs() dfs() callback crash R Calling print() graph small max.lines value (smaller number lines needed print attribute list header) raise error ; fixes #179 as_adjacency_matrix(edges=TRUE, sparse=TRUE) now consistently returns last edge ID cell matrix instead summing . Using + - operators path() object consisting two vertices now handled correctly; fixes #355 topo_sort() now throws error input graph acyclic instead returning incorrect partial ordering. Weighted transitivity calculations (.e. transitivity(mode=\"barrat\") now throw error multigraphs; implementation work correctly multigraphs earlier versions warn . Changed: neimode argument bfs() dfs() renamed mode sake consistency functions. old argument name deprecated removed 1.4.0. bfs() dfs() callback functions now correctly receive 1-based vertex indices ranks; used zero-based earlier versions. (actually bugfix ’s also mentioned “Fixed” section). closeness(), betweenness() edge_betweenness() now take cutoff argument . estimate_closeness(), estimate_betweenness() estimate_edge_betweenness() became aliases, identical signature. deprecated implementation might change future versions provide proper estimation schemes instead simple cutoff-based approximation. explicitly need cutoffs want results reproducible future versions, use closeness(), betweenness() edge_betweenness() code cutoff argument. closeness() now considers reachable vertices calculation; words, closeness centrality now calculated per-component basis disconnected graphs. Earlier versions considered vertices. Deprecated: Using cutoff=0 closeness(), betweenness() edge_betweenness() deprecated; want exact scores, use negative cutoff. cutoff=0 interpreted literally igraph 1.4.0. centr_degree_tmax() now prints warning invoked without explicit loops argument. loops mandatory igraph 1.4.0. nexus_list(), nexus_info(), nexus_get() nexus_search() functions now return error informing user Nexus graph repository taken offline (actually, several years ago). functions removed 1.4.0. edges argument as_adjacency_matrix() deprecated; removed igraph 1.4.0. Removed: deprecated page_rank_old() function deprecated power method page_rank() removed.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-1211","dir":"Changelog","previous_headings":"","what":"igraph 1.2.11","title":"igraph 1.2.11","text":"CRAN release: 2022-01-04 Dec 27, 2021 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-1210","dir":"Changelog","previous_headings":"","what":"igraph 1.2.10","title":"igraph 1.2.10","text":"CRAN release: 2021-12-15 Dec 14, 2021 Fixed: macOS versions igraph accidentally built without GraphML support CRAN; now fixed.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-129","dir":"Changelog","previous_headings":"","what":"igraph 1.2.9","title":"igraph 1.2.9","text":"CRAN release: 2021-11-23 Nov 22, 2021 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-128","dir":"Changelog","previous_headings":"","what":"igraph 1.2.8","title":"igraph 1.2.8","text":"CRAN release: 2021-11-07 Oct 26, 2021 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-127","dir":"Changelog","previous_headings":"","what":"igraph 1.2.7","title":"igraph 1.2.7","text":"CRAN release: 2021-10-15 Oct 15, 2021 C core updated 0.8.5, fixing range bugs introducing number new functions. Added: cluster_leiden added (#399). cluster_fluid_communities added (#454) Fixed: make_lattice() correctly rounds length nearest integer printing warning (#115). make_empty_graph(NULL) now prints error instead producing invalid graph (#404). make_graph(c()) now produces empty graph instead printing misleading error message (#431). Printing graph edges NA names endpoints produce misleading error message (#410). types argument functions related bipartite graphs now prints warning types coerced booleans (#476). Betweenness normalisation longer overflows (#442). layout_with_sugiyama() returns layout type matrix even one vertex graph (#408). Plotting null graph (.e. graph vertices) throw error (#387). Deprecated: membership argument modularity.matrix() now deprecated function never needed anyway. modularity() now prints warning applied directed graph implementation igraph’s C core support directed graphs version 0.8.5. warning turned error next minor (1.3.0) version R interface; error removed later C core updated version supports modularity directed networks. transitivity() now prints warning local variant (type=\"local\") called directed graph graph multiple edges beecause implementation C core igraph work reliably cases version 0.8.5. warning turned error next minor (1.3.0) version R interface; error removed later C core updated version supports transitivity networks multiple edges. Misc: Documentation improvements.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-126","dir":"Changelog","previous_headings":"","what":"igraph 1.2.6","title":"igraph 1.2.6","text":"CRAN release: 2020-10-06 Oct 5, 2020 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-125","dir":"Changelog","previous_headings":"","what":"igraph 1.2.5","title":"igraph 1.2.5","text":"CRAN release: 2020-03-19 Mar 27, 2020 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-124","dir":"Changelog","previous_headings":"","what":"igraph 1.2.4","title":"igraph 1.2.4","text":"CRAN release: 2019-02-13 Feb 13, 2019 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-123","dir":"Changelog","previous_headings":"","what":"igraph 1.2.3","title":"igraph 1.2.3","text":"CRAN release: 2019-02-10 Jan 27, 2019 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-122","dir":"Changelog","previous_headings":"","what":"igraph 1.2.2","title":"igraph 1.2.2","text":"CRAN release: 2018-07-27 Jul 27, 2018 user visible changes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-121","dir":"Changelog","previous_headings":"","what":"igraph 1.2.1","title":"igraph 1.2.1","text":"CRAN release: 2018-03-10 GLPK library optional, available, cluster_optimal() function work. Unfortunately bundle GLPK library igraph CRAN , CRAN maintainers forbid pragmas source code. Removed NMF package dependency, related functions. Fix compilation without libxml2","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-112","dir":"Changelog","previous_headings":"","what":"igraph 1.1.2","title":"igraph 1.1.2","text":"CRAN release: 2017-07-21 Jul 20, 2017 Fix compilation Solaris","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-111","dir":"Changelog","previous_headings":"","what":"igraph 1.1.1","title":"igraph 1.1.1","text":"CRAN release: 2017-07-16 Jul 13, 2017 Graph id printed header, graph_id function added Fix edge_attr index values Fix bfs() bug, restricted argument zero-based match_vertices exported now %>% re-exported better way, avoid interference packages ego_ functions default order = 1 now New function igraph_with_opt run code temporary igraph options settings Fix broken sample_asym_pref function Fix curve_multiple avoid warnings graphs self-loops. NMF package suggested now, hard dependency Fix gen_uid.c _SVID_SOURCE issues Avoid drawing straight lines Bezier curves Use pkgconfig package options. allows setting options per-package basis. E.g. package using igraph can set return.vs.es FALSE .onLoad() function, igraph return plain numeric vectors instead vertex/edge sequences called package. igraph_options() returns old values updated options, actually useful, returning new values . with_igraph_opt() function temporarily change values igraph options. get.edge() deprecated, use ends() instead. (already case igraph 1.0.0, forgot add NEWS point .) redefine .Call(), make native calls faster. Speed special cases indexing vertex sequences. Removed anyNA() call, compatible older R versions. Fixed fast-greedy community finding bug, https://github.com/igraph/igraph/issues/836 Fixed head_of() tail_of(), mixed . Plot: make label.dist independent label lengths, fixes #63. Plot: error unknown graphical parameters. Import functions base packages, eliminate R CMD check NOTEs. Re-add support edge weights Fruchterman-Reingold layout Check membership vector modularity(). Rename str.igraph() print_all(). Use igraph version exported graphs, instead @VERSION@ #75. Functions can used inside V() E() indexing now begin dot. Old names deprecated. New names: .nei(), .innei(), .outnei(), .inc(), .(), .(). #22 Fix packages convert graphs graph::graphNEL: don’t need attach ‘graph’ manually . Fix bugs layout_with_dh, layout_with_gem layout_with_sugiyama. crashed cases.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-101","dir":"Changelog","previous_headings":"","what":"igraph 1.0.1","title":"igraph 1.0.1","text":"CRAN release: 2015-06-26 June 26, 2015 minor updates: Documentation fixes. require C++-11 compiler . Fedora, Solaris Windows compilation fixes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-100","dir":"Changelog","previous_headings":"","what":"igraph 1.0.0","title":"igraph 1.0.0","text":"CRAN release: 2015-06-24 June 21, 2015","code":""},{"path":"https://r.igraph.org/news/index.html","id":"release-notes-1-0-0","dir":"Changelog","previous_headings":"","what":"Release notes","title":"igraph 1.0.0","text":"new major version igraph, call 1.0.0. mean ready, ’ll never ready. biggest changes release - new function names. functions renamed make consistent readable. (Relax, old names can still used, need update code.) - Better operations vertex edge sequences. functions return proper vertex/edge sequences instead numeric ids. - versatile make_() make_graph() functions create graphs.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"major-changes-1-0-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"igraph 1.0.0","text":"Many functions renamed. Old names documented, can still used. generic make_graph() function create graphs. generic layout_() (underscore!) function create graph layouts, see also add_layout_(). igraph data type changed. need call upgrade_graph() graphs created previous igraph versions. Vertex edge sequence operations: union, intersection, etc. Vertex edge sequences can used graphs belong . now strictly checked. functions return (sub)set vertices edges return vertex edge sequences instead. Vertex edge sequences [[ operator now, easy viewing vertex/edge metadata. Vertex edge sequences implemented weak references. See also as_ids() function convert simple ids. Vertex order can specified circle layout now. Davidson-Harel layout algorithm layout_with_dh(). GEM layout algorithm layout_with_gem(). Neighborhood functions mindist parameter smallest distance consider. all_simple_paths() function list simple paths graph. triangles() lists triangles graph. Fruchterman-Reingold Kamada-Kawai layout algorithms rewritten scratch. much faster follow original publications closely. Nicer printing graphs, vertex edge sequences. local_scan() function calculates scan statistics. Embeddings: embed_adjacency_matrix() embed_laplacian_matrix(). Product operator: *, graph multiple times. Can also used rep(). Better default colors, color palettes vertices. Random walk graph: random_walk() adjacent_vertices() incident_edges() functions, vectorized, opposed neighhors() incident(). Convert graph long data frame as_long_data_frame().","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bug-fixes-1-0-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"igraph 1.0.0","text":"many list. Please try issue fixed (re-)report . Thanks!","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-071","dir":"Changelog","previous_headings":"","what":"igraph 0.7.1","title":"igraph 0.7.1","text":"CRAN release: 2014-04-22 April 21, 2014","code":""},{"path":"https://r.igraph.org/news/index.html","id":"release-notes-0-7-1","dir":"Changelog","previous_headings":"","what":"Release Notes","title":"igraph 0.7.1","text":"bug fixes, make sure code included ‘Statistical Analysis Network Data R’ works. See https://github.com/kolaczyk/sand","code":""},{"path":"https://r.igraph.org/news/index.html","id":"detailed-changes-0-7-1","dir":"Changelog","previous_headings":"","what":"Detailed changes:","title":"igraph 0.7.1","text":"Graph drawing: fix labels curved edges, issue #181. Graph drawing: allow fixing edge labels given positions, issue #181. Drop ‘type’ vertex attribute bipartite projection, projections bipartite , issue #255. Print logical attributes header properly (.e. encoded l, x, complex attributes. Issue #578. Add constructor communities objects, see create.communities(). Issue #547. Better error handling GraphML parser. GraphML reader bit lenient now; makes possible read GraphML files saved yWorks apps. Fixed bug constaint(), issue #580. Bipartite projection now detects invalid edges instead giving cryptic error, issue #543. Fixed simplify argument graph.formula(), broken, issue #586. function crossing() adds better names result, fixes issue #587. sir() function gives error input graph simple, fixes issue #582. Calling igraph functions igraph callbacks allowed now, fixes issue #571.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-070","dir":"Changelog","previous_headings":"","what":"igraph 0.7.0","title":"igraph 0.7.0","text":"CRAN release: 2014-02-05 February 4, 2014","code":""},{"path":"https://r.igraph.org/news/index.html","id":"release-notes-0-7-0","dir":"Changelog","previous_headings":"","what":"Release Notes","title":"igraph 0.7.0","text":"bunch new features library , important changes life project. Thanks everyone sending code reporting bugs!","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph--github-0-7-0","dir":"Changelog","previous_headings":"Release Notes","what":"igraph @ github","title":"igraph 0.7.0","text":"igraph’s development moved Launchpad github. actually happened several month ago, never announced officially. place reporting bugs https://github.com/igraph/igraph/issues.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-homepage-0-7-0","dir":"Changelog","previous_headings":"Release Notes","what":"New homepage","title":"igraph 0.7.0","text":"igraph’s homepage now hosted http://igraph.org, brand new. wanted make easier use modern.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"better-nightly-downloads-0-7-0","dir":"Changelog","previous_headings":"Release Notes","what":"Better nightly downloads","title":"igraph 0.7.0","text":"can download nightly builds igraph http://igraph.org/nightly. Source binary R packages (windows OSX), built.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-features-and-bug-fixes-0-7-0","dir":"Changelog","previous_headings":"","what":"New features and bug fixes","title":"igraph 0.7.0","text":"Added demo hierarchical random graphs, invoke via demo(hrg). Make attribute prefixes optional writing GraphML file. Added function mod.matrix(). Support edge weights leading eigenvector community detection. Added LAD library checking (sub)graph isomorphism, version 1. Logical attributes. Added layout.bipartite() function, simple two-column layout bipartite graphs. Support incidence matrices bipartite Pajek files. Pajek files matrix format now directed default, unless bipartite. Support weighted (signed) networks Pajek file matrix format. Fixed bug barabasi.game(), algorithm psumtree-multiple just froze. Function layout.mds() default returns layout matrix now. Added support Boolean attributes GraphML GML readers writer. Change MDS layout coordinates, first dim according first eigenvalue, etc. plot.communities() (plot.igraph(), really) draws border around marked groups default. printing graphs now converts name graph attribute character Convenience functions query set attributes : vertex.attriubutes(), graph.attributes() edge.attributes(). Function graph.disjoint.union() handles attributes now. Rewrite graph.union() handle attributes properly. rewire(): now supports generation destruction loops. Erdos-Renyi type bipartite random graphs: bipartite.random.game(). Support new options (predecessors inbound_edges) get_shortest_paths(), reorganized output get.shortest.paths() completely. Added graphlets() related functions. Fix modularity values multilevel community merges . Fixed bug deleting edges FALSE matrix notation. Fix bonpow() alpha.centrality() make sure sparse solver called. tkplot() news: enable setting coordinates command line via tkplot.setcoords() access canvas via tkplot.canvas(). Fixed potential crash igraph_edge_connectivity(), un-initialized variable C code. Avoiding overflow closeness() related functions. Check NAs converting ‘type’ logical bipartite.projection(). graphNEL conversion functions load ‘graph’ package loaded load end search path, minimize conflicts. Fixed bug creating graphs adjacency matrices, now convert double, case integers. Fixed invalid memory read (potential crash) infomap community detection. Fixed memory leak functions attribute combinations. Removed memory leaks SCG functions. Fixed memory leaks ray tracer. Fixed memory leak graph.bfs() graph.dfs(). Fix bug triad census set first element result NaN. Fixed crash .chordal(). Fixed bug weighted modularity calculation, sum weights truncated integer. Fixed bug weighted multilevel communtiies, maximum weight rounded integer. Fixed bug centralization.closeness.tmax(). Reimplement push-relabel maximum flow gap heuristics. Maximum flow functions now return statistics push relabel algorithm steps. Function arpack() now gives error message unknown options given. Fixed missing whitespace Pajek writer ID attribute numeric. Fixed bug caused GML reader crash ID attribute non-numeric. Fixed issue #500, potential segfault two graphs BLISS differ number vertices edges. Added igraphtest() function. Fix dyad census instability, sometimes incorrect results reported. Dyad census detects integer overflow now gives warning. Function add.edges() allow now zeros vertex set. Added function count number adjacent triangles: adjacent.triangles(). Added graph.eigen() function, eigenproblems adjacency matrices. Added workarounds functions create lot graphs, decompose.graph() graph.neighborhood() use . Fixes issue #508. Added weights support optimal.community(), closes #511. Faster maximal clique finding. Added function count maximum cliques. Set operations: union, intersection, disjoint, union, difference, compose now work based vertex names (present) keep attributes, closes #20. Removed functions graph.intersection..name(), graph.union..name(), graph.difference..name(). + operator graphs now calls graph.union() argument graphs named, calls graph.disjoint.union() otherwise. Added function igraph.version(). Generate graphs stochastic block model: sbm.game(). suggest stats, XML, jpeg png packages . Fixed set.vertex/edge.attribute bug changed graph objects, copying (#533) Fixed bug barabasi.game caused crashes. use PRPACK calculate PageRank scores see https://github.com/dgleich/prpack Added'argument bipartite.projection (#307). Add normalized argument closeness functions, fixes issue #3. R: better handling complex attributes, [[ vertex/edge sets, fixes #231. Implement start argument hrg.fit (#225). Set root vertex Reingold-Tilford layout, solves #473. Fix betweenness normalization directed graphs. Fixed bug graph.density resulted incorrect values undirected graphs loops Fixed bug many graphs created one C call (e.g. graph.decompose), causing #550. Fixed sparse graph.adjacency bugs graphs one edge, graphs zero edges. Fixed bug made Bellman-Ford shortest paths calculations fail. Fixed graph.adjacency bug undirected, weighted graphs sparse matrices. main, sub, xlab ylab proper graphics parameters now (#555). graph.data.frame coerces arguments data frame (#557). Fixed minimum cut bug weighted undirected graphs (#564). Functions simulating epidemics (SIR model) networks, see sir function. Fixed argument ordering graph.mincut related functions. Avoid copying attributes query functions print (#573), functions much faster now graphs many vertices/edges attributes. Speed writing GML GraphML files, attributes integer. really-really slow. Fix multiple root vertices graph.bfs (#575).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-066","dir":"Changelog","previous_headings":"","what":"igraph 0.6.6","title":"igraph 0.6.6","text":"CRAN release: 2013-10-28 Released Oct 28, 2013 bugs fixed: Fixed potential crash infomap.community() function. Various fixed operators work vertex names (#136). Fixed example arpack() manual page. arpack() now gives error message unknown options supplied (#492). Better arpack() error messages. Fixed missing whitespace Pajek writer ID attribute numeric. Fixed dyad census instability, sometimes incorrect results reported (#496). Fixed bug caused GML reader crash ID attribute non-numeric Fixed potential segfault two graphs BLISS differ number vertices edges (#500). Added igraphtest() function run tests R (#485). Dyad census detects integer overflow now gives warning (#497). R: add.edges() allow now zeros vertex set (#503). Add C++ namespace files didn’t one. Fixes incompatibility packages (e.g. rgl) mysterious crashes (#523). Fixed bug caused side effect set.vertex.attributes(), set.edge.attributes() set.graph.attributes() (#533). Fixed bug degree.distribution() cluster.distribution() (#257).","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-065-2","dir":"Changelog","previous_headings":"","what":"igraph 0.6.5-2","title":"igraph 0.6.5-2","text":"CRAN release: 2013-05-23 Released May 16, 2013 Worked two CRAN check problems, gfortran bug (string bound checking work code called C without string length arguments “right” place). Otherwise identical 0.6.5-1.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-065-1","dir":"Changelog","previous_headings":"","what":"igraph 0.6.5-1","title":"igraph 0.6.5-1","text":"CRAN release: 2013-02-28 Released February 27, 2013 Fixing annoying bug, broke two packages CRAN: Setting graph attributes failed sometimes, attributes lists complex objects.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-065","dir":"Changelog","previous_headings":"","what":"igraph 0.6.5","title":"igraph 0.6.5","text":"CRAN release: 2013-02-25 Released February 24, 2013 minor release, fix annoying bugs 0.6.4: igraph now work well older R versions. Eliminate gap vertex edge plotting edge without arrow. Fixes #1118448. Fixed --bounds array indexing error DrL layout, potentially caused crashes. Fixed crash weighted betweenness calculation. Plotting: fixed bug caused misplaced arrows rectangle vertex shapes.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-064","dir":"Changelog","previous_headings":"","what":"igraph 0.6.4","title":"igraph 0.6.4","text":"CRAN release: 2013-02-04 Released February 2, 2013 version number mistake, jump 0.6.4 0.6, technical reasons. version actually never really released, R packages version uploaded CRAN, include version NEW file.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-features-and-bug-fixes-0-6-4","dir":"Changelog","previous_headings":"","what":"New features and bug fixes","title":"igraph 0.6.4","text":"Added vertex shape API defining new vertex shapes, also couple new vertex shapes. Added get.data.frame() function, opposite graph.data.frame(). Added bipartite support Pajek reader writer, closes bug #1042298. degree.sequence.game() new method now: “simple_no_multiple”. Added .degree.sequence() .graphical.degree.sequence() functions. rewire() new method: “loops”, can create loop edges. Walktrap community detection now handles isolates. layout.mds() returns layout matrix now. layout.mds() uses LAPACK instead ARPACK. Handle ‘~’ character write.graph read.graph. Bug #1066986. Added k.regular.game(). Use vertex names plot labels specified function call vertex attributes. Fixes issue #1085431. power.law.fit() can now use C implementation. Fixed bug barabasi.game() .seq empty vector. Fixed bug made functions progress bar fail called another package. Fixed bug creating graphs weighted integer adjacency matrix via graph.adjacency(). Bug #1019624. Fixed overflow issues centralization calculations. Fixed minimal.st.separators() bug, vertex sets incorrectly reported separators. Bug #1033045. Fixed bug mishandled vertex colors VF2 isomorphism functions. Bug #1032819. Pajek exporter now always quotes strings, thanks Elena Tea Russo. Fixed bug handling small edge weights shortest paths calculation shortest.paths() (Dijkstra’s algorithm.) Thanks Martin J Reed. Weighted transitivity uses V(graph) ‘vids’ NULL. Fixed bug ‘pie’ vertices drawn together vertex shapes. Speed printing graphs. Speed attribute queries basic operations, avoiding copying graph. Bug #1043616. Fixed bug NCV setting ARPACK functions. bigger matrix size. layout.merge()’s DLA mode better defaults now. Fixed bug layout.mds() resulted vertices top . Fixed bug layout.spring(), working properly. Fixed layout.svd(), completely defunct. Fixed bug layout.graphopt() caused warnings platforms crashes. Fixed community..membership(). Bug #1022850. Fixed graph.incidence() crash called non-matrix argument. Fixed get.shortest.paths bug, output set “”. Motif finding functions return NA isomorphism classes motifs (.e. connected). Fixes bug #1050859. Fixed get.adjacency() attr given, attribute complex type. Bug #1025799. Fixed attribute name graph.adjacency() dense matrices. Bug #1066952. Fixed erratic behavior alpha.centrality(). Fixed igraph indexing, attr given. Bug #1073705. Fixed bug calculating largest cliques directed graph. Bug #1073800. Fixed bug maximal clique search, closes #1074402. Warn negative weights calculating PageRank. Fixed dense, unweighted graph.adjacency diag=FALSE. Closes issue #1077425. Fixed bug eccentricity() radius(), results often simply wrong. Fixed bug get..shortest.paths() edges zero weight. graph.data.frame() careful vertex names numbers, avoid scientific notation. Fixes issue #1082221. Better check NAs vertex names. Fixes issue #1087215 Fixed potential crash DrL layout generator. Fixed bug Reingold-Tilford layout graph directed mode != .","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-06","dir":"Changelog","previous_headings":"","what":"igraph 0.6","title":"igraph 0.6","text":"CRAN release: 2012-06-14 Released June 11, 2012 See also release notes http://igraph.sf.net/relnotes-0.6.html","code":""},{"path":"https://r.igraph.org/news/index.html","id":"r-major-new-features-0-6","dir":"Changelog","previous_headings":"","what":"R: Major new features","title":"igraph 0.6","text":"Vertices edges numbered 1 instead 0. Note makes old R igraph code incompatible igraph 0.6. want use old code, please use igraph0 package. See http://igraph.sf.net/relnotes-0.6.html. ‘[’ ‘[[’ operators can now used igraph graphs, ‘[’ graph behaves adjacency matrix, ‘[[’ treated adjacency list. also much simpler manipulate graph structure, .e. add/remove edges vertices, new operators. See ?graph.structure. functions take vector list vertices edges, vertex/edge names can given instead numeric ids. New package ‘igraphdata’, contains number data sets can used directly igraph. Igraph now supports loading graphs Nexus online data repository, see nexus.get(), nexus.info(), nexus.list() nexus.search(). community structure finding algorithm return ‘communities’ object now, bunch useful operations, see ?communities details. Vertex edge attributes handled much better now. kept whenever possible, can combined via flexible API. See ?attribute.combination. R now prints igraph graphs screen structured informative way. output summary() also updated accordingly.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"r-other-new-features-0-6","dir":"Changelog","previous_headings":"","what":"R: Other new features","title":"igraph 0.6","text":"possible mark vertex groups plots, via shading. Communities cohesive blocks plotted using default. igraph demos now available, see list via ‘demo(package=“igraph”)’. igraph now tries select optimal layout algorithm, plotting graph. Added simple console, using Tcl/Tk. contains text area status messages also status bar. See igraph.console(). Reimplemented igraph options support, see igraph.options() getIgraphOpt(). Igraph functions can now print status messages.","code":""},{"path":[]},{"path":"https://r.igraph.org/news/index.html","id":"community-detection-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Community detection","title":"igraph 0.6","text":"multi-level modularity optimization community structure detection algorithm Blondel et al. added, see multilevel.community(). Distance two community structures: compare.communities(). Community structure via exact modularity optimization, optimal.community(). Hierarchical random graphs community finding, porting code Aaron Clauset. See hrg.game(), hrg.fit(), etc. Added InfoMAP community finding method, thanks Emmanuel Navarro code. See infomap.community().","code":""},{"path":"https://r.igraph.org/news/index.html","id":"shortest-paths-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Shortest paths","title":"igraph 0.6","text":"Eccentricity (eccentricity()), radius (radius()) calculations. Shortest path calculations get.shortest.paths() can now return edges along shortest paths. get..shortest.paths() now supports edge weights.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"centrality-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Centrality","title":"igraph 0.6","text":"Centralization scores degree, closeness, betweenness eigenvector centrality. See centralization.scores(). Personalized Page-Rank scores, see page.rank(). Subgraph centrality, subgraph.centrality(). Authority (authority.score()) hub (hub.score()) scores support edge weights now. Support edge weights betweenness closeness calculations. bonpow(), Bonacich’s power centrality alpha.centrality(), Alpha centrality calculations now use sparse matrices default. Eigenvector centrality calculation, evcent() now works directed graphs. Betweenness calculation can now use arbitrarily large integers, required lattice-like graphs avoid overflow.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"inputoutput-and-file-formats-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Input/output and file formats","title":"igraph 0.6","text":"Support DL file format graph.read(). See http://www.analytictech.com/networks/dataentry.htm. Support writing LEDA file format write.graph().","code":""},{"path":"https://r.igraph.org/news/index.html","id":"plotting-and-layouts-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Plotting and layouts","title":"igraph 0.6","text":"Star layout: layout.star(). Layout based multidimensional scaling, layout.mds(). New layouts layout.grid() layout.grid.3d(). Sugiyama layout algorithm layered directed acyclic graphs, layout.sugiyama().","code":""},{"path":"https://r.igraph.org/news/index.html","id":"graph-generators-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Graph generators","title":"igraph 0.6","text":"New graph generators: static.fitness.game(), static.power.law.game(). barabasi.game() rewritten supports three algorithms now, default algorithm generate multiple loop edges. graph generation process can now start supplied graph. Watts-Strogatz graph generator, igraph_watts_strogatz() can now create graphs without loop edges.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"others-0-6","dir":"Changelog","previous_headings":"R: New or updated functions","what":"Others","title":"igraph 0.6","text":"Added Spectral Coarse Graining algorithm, see scg(). cohesive.blocks() function rewritten C, much faster now. nicer API, . See demo(“cohesive”). Added generic breadth-first depth-first search implementations many callbacks, graph.bfs() graph_dfs(). Support vertex edge coloring VF2 (sub)graph isomorphism functions (graph.isomorphic.vf2(), graph.count.isomorphisms.vf2(), graph.get.isomorphisms.vf2(), graph.subisomorphic.vf2(), graph.count.subisomorphisms.vf2(), graph.get.subisomorphisms.vf2()). Assortativity coefficient, assortativity(), assortativity.nominal() assortativity.degree(). Vertex operators work vertex names: graph.intersection..name(), graph.union..name(), graph.difference..name(). Thanks Magnus Torfason contributing code! Function calculate non-induced subgraph: subgraph.edges(). comprehensive maximum flow minimum cut calculation, see functions graph.maxflow(), graph.mincut(), stCuts(), stMincuts(). Check whether directed graph DAG, .dag(). .multiple() decide whether graph multiple edges. Added function calculate diversity score vertices, graph.diversity(). Graph Laplacian calculation (graph.laplacian()) supports edge weights now. Biconnected component calculation, biconnected.components() now returns components . bipartite.projection() calculates multiplicity edges. Maximum cardinality search: maximum.cardinality.search() chordality test: .chordal() Convex hull computation, convex.hull(). Contract vertices, contract.vertices().","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-053","dir":"Changelog","previous_headings":"","what":"igraph 0.5.3","title":"igraph 0.5.3","text":"CRAN release: 2009-11-22 Released November 22, 2009","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bugs-corrected-in-the-r-interface-0-5-3","dir":"Changelog","previous_headings":"","what":"Bugs corrected in the R interface","title":"igraph 0.5.3","text":"small changes make ‘R CMD check’ clean Fixed bug graph.incidence, ‘directed’ ‘mode’ arguments handled correctly Betweenness edge betweenness functions work graphs many shortest paths now (limit long long int) compiling package, configure script fails C compiler available igraph..graphNEL creates right number loop edges now Fixed bug bipartite.projection() caused occasional crashes systems","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-052","dir":"Changelog","previous_headings":"","what":"igraph 0.5.2","title":"igraph 0.5.2","text":"CRAN release: 2009-04-14 Released April 10, 2009 See also release notes http://igraph.sf.net/relnotes-0.5.2.html","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-in-the-r-interface-0-5-2","dir":"Changelog","previous_headings":"","what":"New in the R interface","title":"igraph 0.5.2","text":"Added progress bar support beweenness() betweenness.estimate(), layout.drl() Speeded betweenness estimation Speeded .connected() Johnson’s shortest paths algorithm added shortest.paths() now ‘algorithm’ argument choose various implementations manually Always quote symbolic vertex names printing graphs edges Average nearest neighbor degree calculation, graph.knn() Weighted degree (also called strength) calculation, graph.strength() new functions support bipartite graphs: graph.bipartite(), .bipartite(), get.incidence(), graph.incidence(), bipartite.projection(), bipartite.projection.size() Support plotting curved edges plot.igraph() tkplot() Added support weighted graphs alpha.centrality() Added label propagation community detection algorithm Raghavan et al., label.propagation.community() cohesive.blocks() now ‘cutsetHeuristic’ argument choose two cutset algorithms Added function “unfold” tree, unfold.tree() New tkplot() arguments change drawing area Added minimal GUI, invoke tkigraph() DrL layout generator, layout.drl() three dimensional mode now.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bugs-corrected-in-the-r-interface-0-5-2","dir":"Changelog","previous_headings":"","what":"Bugs corrected in the R interface","title":"igraph 0.5.2","text":"Fixed bug VF2 graph isomorphism functions Fixed bug sparse adjacency matrix requested get.adjacency() graph named VL graph generator degree.sequence.game() checks now sum degrees even Many fixes supporting various compilers, e.g. GCC 4.4 Sun’s C compiler Fixed memory leaks graph.automorphisms(), Bellman-Ford shortest.paths(), independent.vertex.sets() Fix bug graph imported LGL exported NCOL format (#289596) cohesive.blocks() creates temporary file session temporary directory write.graph() read.graph() now give error messages unknown arguments given GraphML reader checks name attributes avoid adding duplicate ‘id’ attribute possible change ‘ncv’ ARPACK parameter leading.eigenvector.community() Fixed bug path.length.hist(), ‘unconnected’ wrong unconnected undirected graphs Better handling attribute assingment via iterators, now also clarified manual Better error messages unknown vertex shapes Make R package unload cleanly unloadNamespace() used Fixed bug plotting square shaped vertices (#325244) Fixed bug graph.adjacency() matrix sparse matrix class “dgTMatrix”","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-051","dir":"Changelog","previous_headings":"","what":"igraph 0.5.1","title":"igraph 0.5.1","text":"CRAN release: 2008-07-12 Released July 14, 2008 See also release notes http://igraph.sf.net/relnotes-0.5.1.html","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-in-the-r-interface-0-5-1","dir":"Changelog","previous_headings":"","what":"New in the R interface","title":"igraph 0.5.1","text":"new layout generator called DrL. Uniform sampling random connected undirected graphs given degree sequence. Edge labels plotted 1/3 edge, better graph mutual edges. Initial experimental vertex shape support ‘plot’. New function, ‘graph.adjlist’ creates igraph graphs adjacency lists. Conversion /graphNEL graphs, ‘graph’ R package. Fastgreedy community detection can utilize edge weights now, missing R interface. ‘arrow.width’ graphical parameter added. graph.data.frame new argument ‘vertices’. graph.adjacency get.adjacency support sparse matrices, ‘Matrix’ package required use functionality. graph.adjacency adds column/row names ‘name’ attribute. Weighted shortest paths using Dijkstra’s Belmann-Ford algorithm. Shortest path functions return ‘Inf’ unreachable vertices. New function ‘.mutual’ find mutual edges directed graph. Added inverse log-weighted similarity measure (.k.. Adamic/Adar similarity). preference.game asymmetric.preference.game rewritten, O(|V|+|E|) now, instead O(|V|^2). Edge weight support function ‘get.shortest.paths’, uses Dijkstra’s algorithm.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bugs-corrected-in-the-r-interface-0-5-1","dir":"Changelog","previous_headings":"","what":"Bugs corrected in the R interface","title":"igraph 0.5.1","text":"bug corrected write.pajek.bgraph. Several bugs corrected graph.adjacency. Pajek reader bug corrected, used segfault ’*Vertices’ missing. Directedness handled correctly writing GML files. (note ‘correct’ conflicts standard .) Corrected bug calculating weighted, directed PageRank undirected graph. (make sense anyway.) Several bugs fixed Reingold-Tilford layout avoid edge crossings. bug fixed GraphML reader, value graph attribute specified. Fixed bug graph isomorphism routine small (3-4 vertices) graphs. Corrected random sampling implementation (igraph_random_sample), now always generates unique numbers. affects Gnm Erdos-Renyi generator, always generates simple graphs now. basic igraph constructor (igraph_empty_attrs, functions expected call internally) now checks whether number vertices finite. LGL, NCOL Pajek graph readers handle errors properly now. non-symmetric ARPACK solver returns results consistent form now. fast greedy community detection routine now checks graph simple. LGL NCOL parsers corrected work kinds end--line encodings. Hub & authority score calculations initialize ARPACK parameters now. Fixed bug Walktrap community detection routine, applied unconnected graphs. Several small memory leaks removed, big one Spinglass community structure detection function","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-05","dir":"Changelog","previous_headings":"","what":"igraph 0.5","title":"igraph 0.5","text":"CRAN release: 2008-02-13 Released February 14, 2008 See also release notes http://igraph.sf.net/relnotes-0.5.html","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-in-the-r-interface-0-5","dir":"Changelog","previous_headings":"","what":"New in the R interface","title":"igraph 0.5","text":"‘rescale’, ‘asp’ ‘frame’ graphical parameters added Create graphs formula notation (graph.formula) Handle graph attributes properly Calculate actual minimum cut undirected graphs Adjacency lists, get.adjlist get.adjedgelist added Eigenvector centrality computation much faster now Proper R warnings, instead writing warning terminal R checks graphical parameters now, unknown ones just ignored, error message given plot.igraph ‘add’ argument now compose plots multiple graphs plot.igraph supports ‘main’ ‘sub’ arguments layout.norm public now, can normalize layout possible supply startup positions layout generators Always free memory CTRL+C/ESC pressed, operating systems plot.igraph can plot square vertices now, see ‘shape’ parameter graph.adjacency rewritten creating weighted graphs use match.arg whenever possible. means character scalar options can abbreviated always case insensitive VF2 graph isomorphism routines can check subgraph isomorphism now, able return matching(s) BLISS graph isomorphism algorithm included igraph now. See canonical.permutation, graph.isomorphic.bliss use ARPACK eigenvalue/eigenvector calculation. means following functions rewritten: page.rank, leading.eigenvector.community.*, evcent. New functions based ARPACK: hub.score, authority.score, arpack. Edge weights Fruchterman-Reingold layout (layout.fruchterman.reingold). Line graph calculation (line.graph) Kautz de Bruijn graph generators (graph.kautz, graph.de.bruijn) Support writing graphs DOT format Jaccard Dice similarity coefficients added (similarity.jaccard, similarity.dice) Counting multiplicity edges (count.multiple) graphopt layout algorithm added, layout.graphopt Generation “famous” graphs (graph.famous). Create graphs LCF notation (graph.cf). Dyad census triad cencus functions (dyad.census, triad.census) Cheking simple graphs (.simple) Create full citation networks (graph.full.citation) Create histogram path lengths (path.length.hist) Forest fire model added (forest.fire.game) DIMACS reader can handle different file types now Biconnected components articulation points (biconnected.components, articulation.points) Kleinberg’s hub authority scores (hub.score, authority.score) .undirected handles attributes now Geometric random graph generator (grg.game) can return coordinates vertices Function added convert leading eigenvector community structure result membership vector (community.le..membership) Weighted fast greedy community detection Weighted page rank calculation Functions estimating closeness, betweenness, edge betweenness introducing cutoff path lengths (closeness.estimate, betweenness.estimate, edge.betweenness.estimate) Weighted modularity calculation Function permuting vertices (permute.vertices) Betweenness closeness calculations speeded read.graph can handle possible line terminators now ( , , Error handling rewritten walktrap community detection, calculation can interrupted now maxflow/mincut functions allow supply NULL pointer edge capacities, implying unit capacities edges","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bugs-corrected-in-the-r-interface-0-5","dir":"Changelog","previous_headings":"","what":"Bugs corrected in the R interface","title":"igraph 0.5","text":"Fixed bug cohesive.blocks, cohesive blocks sometimes calculated correctly","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-045","dir":"Changelog","previous_headings":"","what":"igraph 0.4.5","title":"igraph 0.4.5","text":"CRAN release: 2007-12-22 Released January 1, 2008 New: - Cohesive block finding R interface, thanks Peter McMahan contributing code. See James Moody Douglas R. White, 2003, Structural Cohesion Embeddedness: Hierarchical Conception Social Groups American Sociological Review 68(1):1-25 - Biconnected components articulation points. - R interface: better printing attributes. - R interface: graph attributes can used via ‘$’. Bug fixed: - Erdos-Renyi random graph generators rewritten.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-044","dir":"Changelog","previous_headings":"","what":"igraph 0.4.4","title":"igraph 0.4.4","text":"CRAN release: 2007-10-03 Released October 3, 2007 release work seamlessly new R 2.6.0 version. bugs also fixed: - bug fixed Erdos-Renyi graph generator, sometimes added extra vertex.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-043","dir":"Changelog","previous_headings":"","what":"igraph 0.4.3","title":"igraph 0.4.3","text":"CRAN release: 2007-08-09 Released August 13, 2007 next one sequence bugfix releases. Thanks many people sending bug reports. changes: - memory leaks removed using attributes R Python. - GraphML parser: entities character data multiple chunks now handled correctly. - bug corrected edge betweenness community structure detection, failed called many times program/session. - Edge betweeness community structure: handle unconnected graphs properly. - Fixed bug related fast greedy community detection unconnected graphs. - Use different kind parser (Push) reading GraphML files. almost invisible users fixed nondeterministic bug reading GraphML files. - R interface: plot now handles properly called vector edge.width argument directed graphs. - R interface: bug (typo) corrected walktrap.community weighted graphs.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-042","dir":"Changelog","previous_headings":"","what":"igraph 0.4.2","title":"igraph 0.4.2","text":"CRAN release: 2007-06-06 Released June 7, 2007 another bugfix release, serious bug R package previous version: read write graphs files format MS Windows. bits added: - circular Reingold-Tilford layout generator trees - corrected bug, Pajek files written properly MS Windows now. - arrow.size graphical edge parameter added R interface.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-041","dir":"Changelog","previous_headings":"","what":"igraph 0.4.1","title":"igraph 0.4.1","text":"CRAN release: 2007-05-23 Released May 23, 2007 minor release, corrects number bugs, mostly R package.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-04","dir":"Changelog","previous_headings":"","what":"igraph 0.4","title":"igraph 0.4","text":"CRAN release: 2007-05-21 Released May 21, 2007 major new additions release bunch community detection algorithms support GML file format. complete list changes:","code":""},{"path":"https://r.igraph.org/news/index.html","id":"new-in-the-r-interface-0-4","dir":"Changelog","previous_headings":"","what":"New in the R interface","title":"igraph 0.4","text":"internal representation changed, graphs stored ‘save’ older igraph version read back new version reliably. neighbors returns ordered lists .loop .multiple added topological sorting VF2 isomorphism algorithm support reading graphs Graph Database isomorphism graph.mincut can calculate actual minimum cut girth calculation added, thanks Keith Briggs support reading writing GML files Walktrap community detection algorithm added, thanks Matthieu Latapy Pascal Pons edge betweenness based community detection algorithm added fast greedy algorithm community detection Clauset et al. added thanks Aaron Clauset sharing code leading eigenvector community detection algorithm Mark Newman added functions creating dendrograms output community detection algorithms added community.membership supporting function added, creates membership vector community structure merge tree modularity calculation added graphics parameter handling completely rewritten, uniform handling colors fonts, make sure read ?igraph.plotting new plotting parameter edges: arrow.mode bug corrected playing nonlinear barabasi.game better looking plotting 3d using rglplot: edges 3d rglplot layout allowed two dimensional now rglplot suspends updates drawing, makes faster loop edges correctly plotted three plotting functions better printing attributes printing graphs summary graph prints attribute names .igraph rewritten make possible inherit ‘igraph’ class somewhat better looking progress meter functions support ","code":""},{"path":"https://r.igraph.org/news/index.html","id":"others-0-4","dir":"Changelog","previous_headings":"","what":"Others","title":"igraph 0.4","text":"many functions benefit new internal representation faster now: transitivity, reciprocity, graph operator functions like intersection union, etc.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bugs-corrected-0-4","dir":"Changelog","previous_headings":"","what":"Bugs corrected","title":"igraph 0.4","text":"corrected bug reading Pajek files: directed graphs read undirected","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-032","dir":"Changelog","previous_headings":"","what":"igraph 0.3.2","title":"igraph 0.3.2","text":"CRAN release: 2006-12-14 Released Dec 19, 2006 new major release, contains many new things:","code":""},{"path":"https://r.igraph.org/news/index.html","id":"changes-in-the-r-interface-0-3-2","dir":"Changelog","previous_headings":"","what":"Changes in the R interface","title":"igraph 0.3.2","text":"bonpow function ported SNA calculate Bonacich power centrality get.adjacency supports attributes now, means sets colnames rownames attributes can return attribute values matrix instead 0/1 grg.game, geometric random graphs graph.density, graph density calculation edge vertex attributes can added easily now added new edges add.edges new vertices add.vertices graph.data.frame creates graph data frames, can used create graphs edge attributes easily plot.igraph tkplot can plot self-loop edges now graph.edgelist create graph edge list, can also handle edge lists symbolic names get.edgelist now ‘names’ argument can return symbolic vertex names instead vertex ids, default id uses ‘name’ vertex attribute returned printing graphs screen also prints symbolic symbolic names (‘name’ attribute present) maximum flow minimum cut functions: graph.maxflow, graph.mincut vertex edge connectivity: edge.connectivity, vertex.connectivity edge vertex disjoint paths: edge.disjoint.paths, vertex.disjoint.paths White’s cohesion adhesion measure: graph.adhesion, graph.cohesion dimacs file format added .directed handles attributes now constraint corrected, handles weighted graphs well now weighted attribute graph.adjacency spinglass-based community structure detection, Joerg Reichardt – Stefan Bornholdt algorithm added: spinglass.community graph.extended.chordal.ring, extended chordal ring generation .clusters calculates number clusters without calculating clusters minimum spanning tree functions updated keep attributes transitivity can calculate local transitivity well neighborhood related functions added: neighborhood, neighborhood.size, graph.neighborhood new graph generators based vertex types: preference.game asymmetric.preference.game","code":""},{"path":"https://r.igraph.org/news/index.html","id":"bugs-corrected-0-3-2","dir":"Changelog","previous_headings":"","what":"Bugs corrected","title":"igraph 0.3.2","text":"attribute handling bug deleting edges corrected GraphML escaping NaN handling corrected bug corrected make possible compile R package without libxml2 library bug Erdos-Renyi graph generation corrected: problems generating large directed graphs bug constraint calculation corrected, works well now fixed memory leaks GraphML reader error handling bug corrected GraphML reader bug corrected R version graph.laplacian normalized Laplacian requested memory leak corrected get..shortest.paths R package","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-021","dir":"Changelog","previous_headings":"","what":"igraph 0.2.1","title":"igraph 0.2.1","text":"CRAN release: 2006-08-24 Released Aug 23, 2006 bug-fix release. Bugs fixed: - reciprocity corrected avoid segfaults - docs updates - various R package updates make conform CRAN rules","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-02","dir":"Changelog","previous_headings":"","what":"igraph 0.2","title":"igraph 0.2","text":"CRAN release: 2006-08-23 Released Aug 18, 2006 Release time last! many new things igraph 0.2, important ones: - reading writing Pajek GraphML formats attributes (Pajek GraphML files supported, see documentation details) - RANDEDU fast motif search algorithm implemented - many new graph generators, games regular graphs - many new structural properties: transitivity, reciprocity, etc. - graph operators: union, intersection, difference, structural holes, etc. - conversion directed undirected graphs - new layout algorithms trees large graphs, 3D layouts many . New things specifically R package: - support CTRL+C - new functions: Graph Laplacian, Burt’s constraint, etc. - vertex/edge sequences totally rewritten, smart indexing (see manual) - new R manual tutorial: `Network Analysis igraph’, still development useful - basic 3D plotting using OpenGL Although release somewhat tested Linux, MS Windows, Mac OSX, Solaris 8 FreeBSD, heavy testing done, might contain bugs, kindly ask send bug reports make igraph better.","code":""},{"path":"https://r.igraph.org/news/index.html","id":"igraph-01","dir":"Changelog","previous_headings":"","what":"igraph 0.1","title":"igraph 0.1","text":"Released Jan 30, 2006 year development first “official” release igraph library. release considered beta software, useful general. Please send questions comments.","code":""}]
diff --git a/sitemap.xml b/sitemap.xml
index bdb123fd2c..eb9ae2d102 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -36,12 +36,9 @@
https://r.igraph.org/reference/as.directed.html
https://r.igraph.org/reference/as.igraph.html
https://r.igraph.org/reference/as.matrix.igraph.html
-https://r.igraph.org/reference/as.undirected.html
-https://r.igraph.org/reference/as_adj.html
https://r.igraph.org/reference/as_adj_list.html
https://r.igraph.org/reference/as_adjacency_matrix.html
https://r.igraph.org/reference/as_biadjacency_matrix.html
-https://r.igraph.org/reference/as_directed.html
https://r.igraph.org/reference/as_edgelist.html
https://r.igraph.org/reference/as_graphnel.html
https://r.igraph.org/reference/as_ids.html
@@ -168,11 +165,7 @@
https://r.igraph.org/reference/diversity.html
https://r.igraph.org/reference/dominator.tree.html
https://r.igraph.org/reference/dominator_tree.html
-https://r.igraph.org/reference/dot-apply_modifiers.html
https://r.igraph.org/reference/dot-data.html
-https://r.igraph.org/reference/dot-extract_constructor_and_modifiers.html
-https://r.igraph.org/reference/dot-igraph.progress.html
-https://r.igraph.org/reference/dot-igraph.status.html
https://r.igraph.org/reference/dyad.census.html
https://r.igraph.org/reference/dyad_census.html
https://r.igraph.org/reference/each_edge.html
@@ -213,7 +206,6 @@
https://r.igraph.org/reference/get.data.frame.html
https://r.igraph.org/reference/get.diameter.html
https://r.igraph.org/reference/get.edge.attribute.html
-https://r.igraph.org/reference/get.edge.html
https://r.igraph.org/reference/get.edge.ids.html
https://r.igraph.org/reference/get.edgelist.html
https://r.igraph.org/reference/get.graph.attribute.html
@@ -222,23 +214,19 @@
https://r.igraph.org/reference/get.stochastic.html
https://r.igraph.org/reference/get.vertex.attribute.html
https://r.igraph.org/reference/getIgraphOpt.html
-https://r.igraph.org/reference/get_edge_ids.html
https://r.igraph.org/reference/girth.html
https://r.igraph.org/reference/global_efficiency.html
https://r.igraph.org/reference/gorder.html
https://r.igraph.org/reference/graph.adhesion.html
https://r.igraph.org/reference/graph.adjacency.html
https://r.igraph.org/reference/graph.adjlist.html
-https://r.igraph.org/reference/graph.atlas.html
https://r.igraph.org/reference/graph.automorphisms.html
https://r.igraph.org/reference/graph.bfs.html
-https://r.igraph.org/reference/graph.bipartite.html
https://r.igraph.org/reference/graph.cohesion.html
https://r.igraph.org/reference/graph.complementer.html
https://r.igraph.org/reference/graph.compose.html
https://r.igraph.org/reference/graph.coreness.html
https://r.igraph.org/reference/graph.data.frame.html
-https://r.igraph.org/reference/graph.de.bruijn.html
https://r.igraph.org/reference/graph.density.html
https://r.igraph.org/reference/graph.dfs.html
https://r.igraph.org/reference/graph.difference.html
@@ -246,39 +234,24 @@
https://r.igraph.org/reference/graph.diversity.html
https://r.igraph.org/reference/graph.edgelist.html
https://r.igraph.org/reference/graph.eigen.html
-https://r.igraph.org/reference/graph.empty.html
-https://r.igraph.org/reference/graph.extended.chordal.ring.html
-https://r.igraph.org/reference/graph.famous.html
-https://r.igraph.org/reference/graph.formula.html
-https://r.igraph.org/reference/graph.full.bipartite.html
-https://r.igraph.org/reference/graph.full.citation.html
-https://r.igraph.org/reference/graph.full.html
https://r.igraph.org/reference/graph.graphdb.html
-https://r.igraph.org/reference/graph.html
https://r.igraph.org/reference/graph.incidence.html
https://r.igraph.org/reference/graph.intersection.html
https://r.igraph.org/reference/graph.isocreate.html
-https://r.igraph.org/reference/graph.kautz.html
https://r.igraph.org/reference/graph.knn.html
https://r.igraph.org/reference/graph.laplacian.html
-https://r.igraph.org/reference/graph.lattice.html
-https://r.igraph.org/reference/graph.lcf.html
https://r.igraph.org/reference/graph.maxflow.html
https://r.igraph.org/reference/graph.mincut.html
https://r.igraph.org/reference/graph.motifs.est.html
https://r.igraph.org/reference/graph.motifs.html
https://r.igraph.org/reference/graph.motifs.no.html
https://r.igraph.org/reference/graph.neighborhood.html
-https://r.igraph.org/reference/graph.ring.html
-https://r.igraph.org/reference/graph.star.html
https://r.igraph.org/reference/graph.strength.html
-https://r.igraph.org/reference/graph.tree.html
https://r.igraph.org/reference/graph.union.html
https://r.igraph.org/reference/graph_.html
https://r.igraph.org/reference/graph_attr-set.html
https://r.igraph.org/reference/graph_attr.html
https://r.igraph.org/reference/graph_attr_names.html
-https://r.igraph.org/reference/graph_center.html
https://r.igraph.org/reference/graph_from_adj_list.html
https://r.igraph.org/reference/graph_from_adjacency_matrix.html
https://r.igraph.org/reference/graph_from_atlas.html
@@ -307,7 +280,6 @@
https://r.igraph.org/reference/has_eulerian_path.html
https://r.igraph.org/reference/head_of.html
https://r.igraph.org/reference/head_print.html
-https://r.igraph.org/reference/hits_scores.html
https://r.igraph.org/reference/hrg-methods.html
https://r.igraph.org/reference/hrg.consensus.html
https://r.igraph.org/reference/hrg.create.html
@@ -339,8 +311,10 @@
https://r.igraph.org/reference/igraph.version.html
https://r.igraph.org/reference/igraph_demo.html
https://r.igraph.org/reference/igraph_options.html
+https://r.igraph.org/reference/igraph_test.html
https://r.igraph.org/reference/igraph_version.html
https://r.igraph.org/reference/igraphdemo.html
+https://r.igraph.org/reference/igraphtest.html
https://r.igraph.org/reference/incident.html
https://r.igraph.org/reference/incident_edges.html
https://r.igraph.org/reference/indent_print.html
@@ -349,7 +323,6 @@
https://r.igraph.org/reference/index.html
https://r.igraph.org/reference/induced.subgraph.html
https://r.igraph.org/reference/infomap.community.html
-https://r.igraph.org/reference/inside-square-error.html
https://r.igraph.org/reference/interconnected.islands.game.html
https://r.igraph.org/reference/intersection.html
https://r.igraph.org/reference/intersection.igraph.es.html
@@ -405,23 +378,16 @@
https://r.igraph.org/reference/lastcit.game.html
https://r.igraph.org/reference/layout.auto.html
https://r.igraph.org/reference/layout.bipartite.html
-https://r.igraph.org/reference/layout.circle.html
https://r.igraph.org/reference/layout.davidson.harel.html
+https://r.igraph.org/reference/layout.deprecated.html
https://r.igraph.org/reference/layout.drl.html
https://r.igraph.org/reference/layout.fruchterman.reingold.grid.html
-https://r.igraph.org/reference/layout.fruchterman.reingold.html
https://r.igraph.org/reference/layout.gem.html
https://r.igraph.org/reference/layout.graphopt.html
-https://r.igraph.org/reference/layout.grid.3d.html
https://r.igraph.org/reference/layout.grid.html
-https://r.igraph.org/reference/layout.kamada.kawai.html
-https://r.igraph.org/reference/layout.lgl.html
https://r.igraph.org/reference/layout.mds.html
https://r.igraph.org/reference/layout.merge.html
https://r.igraph.org/reference/layout.norm.html
-https://r.igraph.org/reference/layout.random.html
-https://r.igraph.org/reference/layout.reingold.tilford.html
-https://r.igraph.org/reference/layout.sphere.html
https://r.igraph.org/reference/layout.spring.html
https://r.igraph.org/reference/layout.star.html
https://r.igraph.org/reference/layout.sugiyama.html
@@ -445,7 +411,6 @@
https://r.igraph.org/reference/layout_with_mds.html
https://r.igraph.org/reference/layout_with_sugiyama.html
https://r.igraph.org/reference/leading.eigenvector.community.html
-https://r.igraph.org/reference/line.graph.html
https://r.igraph.org/reference/list.edge.attributes.html
https://r.igraph.org/reference/list.graph.attributes.html
https://r.igraph.org/reference/list.vertex.attributes.html
@@ -475,7 +440,6 @@
https://r.igraph.org/reference/maximal.cliques.count.html
https://r.igraph.org/reference/maximal.cliques.html
https://r.igraph.org/reference/maximal.independent.vertex.sets.html
-https://r.igraph.org/reference/maximal_ivs.html
https://r.igraph.org/reference/maximum.bipartite.matching.html
https://r.igraph.org/reference/maximum.cardinality.search.html
https://r.igraph.org/reference/merge_coords.html
@@ -542,7 +506,6 @@
https://r.igraph.org/reference/running_mean.html
https://r.igraph.org/reference/sample_.html
https://r.igraph.org/reference/sample_bipartite.html
-https://r.igraph.org/reference/sample_chung_lu.html
https://r.igraph.org/reference/sample_correlated_gnp.html
https://r.igraph.org/reference/sample_correlated_gnp_pair.html
https://r.igraph.org/reference/sample_degseq.html
@@ -584,10 +547,7 @@
https://r.igraph.org/reference/shapes.html
https://r.igraph.org/reference/shortest.paths.html
https://r.igraph.org/reference/showtrace.html
-https://r.igraph.org/reference/similarity.dice.html
https://r.igraph.org/reference/similarity.html
-https://r.igraph.org/reference/similarity.invlogweighted.html
-https://r.igraph.org/reference/similarity.jaccard.html
https://r.igraph.org/reference/simplified.html
https://r.igraph.org/reference/simplify.html
https://r.igraph.org/reference/sir.html
@@ -606,7 +566,6 @@
https://r.igraph.org/reference/sub-sub-.igraph.html
https://r.igraph.org/reference/subcomponent.html
https://r.igraph.org/reference/subgraph.centrality.html
-https://r.igraph.org/reference/subgraph.edges.html
https://r.igraph.org/reference/subgraph.html
https://r.igraph.org/reference/subgraph_centrality.html
https://r.igraph.org/reference/subgraph_isomorphic.html