From cd99d318b280d614fb5fc1b031fb715886cd0c08 Mon Sep 17 00:00:00 2001
From: "aviator-app[bot]" Creating a graphWe can print the graph to get a summary of its nodes and edges:
g
## IGRAPH d3f69ad UN-- 10 2 --
+## IGRAPH 1812b81 UN-- 10 2 --
## + attr: name (v/c)
-## + edges from d3f69ad (vertex names):
+## + edges from 1812b81 (vertex names):
## [1] 1--2 1--5
This means: Undirected Named graph
with 10 vertices and 2 edges, with the
@@ -169,7 +169,7 @@
Creating a graph
summary(g)
-## IGRAPH d3f69ad UN-- 10 2 --
+## IGRAPH 1812b81 UN-- 10 2 --
## + attr: name (v/c)
The same function make_graph
can create some notable
graphs by just specifying their name. For example you can create the
@@ -247,9 +247,9 @@
Adding/deleting vertices and edgesg <- g %>% add_edges(edges=c(1,34)) %>% add_vertices(3) %>%
add_edges(edges=c(38,39, 39,40, 40,38, 40,37))
g
-## IGRAPH 7f79014 U--- 40 86 -- Zachary
+## IGRAPH 89e7c57 U--- 40 86 -- Zachary
## + attr: name (g/c)
-## + edges from 7f79014:
+## + edges from 89e7c57:
## [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
@@ -332,7 +332,7 @@ Constructing graphs
graph1 <- make_tree(127, 2, mode = "undirected")
summary(g)
-## IGRAPH c1d8067 U--- 5 3 -- Ring graph
+## IGRAPH 983e665 U--- 5 3 -- Ring graph
## + attr: name (g/c), mutual (g/l), circular (g/l)
This generates a regular tree graph with 127 vertices, each vertex
having two children. No matter how many times you call
@@ -349,7 +349,7 @@
Constructing graphs
graph1 <- sample_grg(100, 0.2)
summary(graph1)
-## IGRAPH 26fe2b4 U--- 100 508 -- Geometric random graph
+## IGRAPH c17258b U--- 100 519 -- Geometric random graph
## + attr: name (g/c), radius (g/n), torus (g/l)
This generates a geometric random graph: n points are chosen
randomly and uniformly inside the unit square and pairs of points closer
@@ -400,7 +400,7 @@
Setting and retrieving attributesV(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 e8c4e4b UN-- 7 9 --
+## IGRAPH deccbb0 UN-- 7 9 --
## + attr: name (v/c), age (v/n), gender (v/c), is_formal (e/l)
V
and E
are the standard way to obtain a
sequence of all vertices and edges, respectively. This assigns an
@@ -442,7 +442,7 @@
Setting and retrieving attributes
V(g)$name[1:3] <- c("Alejandra", "Bruno", "Carmina")
V(g)
-## + 7/7 vertices, named, from e8c4e4b:
+## + 7/7 vertices, named, from deccbb0:
## [1] Alejandra Bruno Carmina Frank Dennis Esther George
To delete attributes:
@@ -554,12 +554,12 @@ Selecting vertices
seq <- V(graph)[2, 3, 7]
seq
-## + 3/10 vertices, from e853541:
+## + 3/10 vertices, from 1a8fed2:
## [1] 2 3 7
seq <- seq[1, 3] # filtering an existing vertex set
seq
-## + 2/10 vertices, from e853541:
+## + 2/10 vertices, from 1a8fed2:
## [1] 2 7
Selecting a vertex that does not exist results in an error:
@@ -655,12 +655,12 @@ Selecting edges
E(g)[.from(3)]
-## + 4/9 edges from e8c4e4b (vertex names):
+## + 4/9 edges from deccbb0 (vertex names):
## [1] Alejandra--Carmina Carmina --Frank Carmina --Dennis Carmina --Esther
Of course it also works with vertex names:
E(g)[.from("Carmina")]
-## + 4/9 edges from e8c4e4b (vertex names):
+## + 4/9 edges from deccbb0 (vertex names):
## [1] Alejandra--Carmina Carmina --Frank Carmina --Dennis Carmina --Esther
Using .to
filters edge sequences based on the target
vertices. This is different from .from
if the graph is
@@ -675,7 +675,7 @@
Selecting edges
-## + 3/9 edges from e8c4e4b (vertex names):
+## + 3/9 edges from deccbb0 (vertex names):
## [1] Carmina--Dennis Carmina--Esther Dennis --Esther
To make the %--%
operator work with names, you can build
string vectors containing the names and then use these vectors as
@@ -694,7 +694,7 @@
Selecting edges## [1] "Alejandra" "Carmina" "Esther"
-## + 5/9 edges from e8c4e4b (vertex names):
+## + 5/9 edges from deccbb0 (vertex names):
## [1] Alejandra--Bruno Alejandra--Frank Carmina --Frank Carmina --Dennis
## [5] Dennis --Esther
diff --git a/articles/igraph_ES.html b/articles/igraph_ES.html
index cd2fd0b25d..d7b12673ab 100644
--- a/articles/igraph_ES.html
+++ b/articles/igraph_ES.html
@@ -159,9 +159,9 @@ Crear un grafo
g
-## IGRAPH 4f73d75 UN-- 10 2 --
+## IGRAPH 83286a9 UN-- 10 2 --
## + attr: name (v/c)
-## + edges from 4f73d75 (vertex names):
+## + edges from 83286a9 (vertex names):
## [1] 1--2 1--5
Esto significa: grafo no dirigido (Undirected) con
10 vértices y 2 aristas, que se
@@ -173,7 +173,7 @@
Crear un grafo
summary(g)
-## IGRAPH 4f73d75 UN-- 10 2 --
+## IGRAPH 83286a9 UN-- 10 2 --
## + attr: name (v/c)
También make_graph
puede crear algunos grafos destacados
con sólo especificar su nombre. Por ejemplo, puedes generar el grafo que
@@ -257,9 +257,9 @@
Añadir y borrar vértices y arist
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 8d77067 U--- 40 86 -- Zachary
+## IGRAPH 9114ecb U--- 40 86 -- Zachary
## + attr: name (g/c)
-## + edges from 8d77067:
+## + edges from 9114ecb:
## [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
@@ -346,7 +346,7 @@ Construcción de grafos
graph1 <- make_tree(127, 2, mode = "undirected")
summary(g)
-## IGRAPH 5af70f3 U--- 5 3 -- Ring graph
+## IGRAPH 85d5454 U--- 5 3 -- Ring graph
## + attr: name (g/c), mutual (g/l), circular (g/l)
Esto genera un grafo regular en forma de árbol con 127 vértices, cada
vértice con dos hijos. No importa cuántas veces llames a
@@ -363,7 +363,7 @@
Construcción de grafos
graph1 <- sample_grg(100, 0.2)
summary(graph1)
-## IGRAPH d0221c0 U--- 100 546 -- Geometric random graph
+## IGRAPH 96b21f7 U--- 100 471 -- Geometric random graph
## + attr: name (g/c), radius (g/n), torus (g/l)
Esto genera un grafo geométrico aleatorio: Se eligen n
puntos de forma aleatoria y uniforme dentro del espacio métrico, y los
@@ -416,7 +416,7 @@
Establecer y recuperar atributosV(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 816870d UN-- 7 9 --
+## IGRAPH e977f5d UN-- 7 9 --
## + attr: name (v/c), age (v/n), gender (v/c), is_formal (e/l)
V
y E
son la forma estándar de obtener una
secuencia de todos los vértices y aristas respectivamente. Esto asigna
@@ -460,7 +460,7 @@
Establecer y recuperar atributos
V(g)$name[1:3] <- c("Alejandra", "Bruno", "Carmina")
V(g)
-## + 7/7 vertices, named, from 816870d:
+## + 7/7 vertices, named, from e977f5d:
## [1] Alejandra Bruno Carmina Frank Dennis Esther George
Para eliminar atributos:
@@ -575,12 +575,12 @@ Selección de vértices
seq <- V(graph)[2, 3, 7]
seq
-## + 3/10 vertices, from 0336316:
+## + 3/10 vertices, from 77c94f5:
## [1] 2 3 7
seq <- seq[1, 3] # filtrar un conjunto de vértices existente
seq
-## + 2/10 vertices, from 0336316:
+## + 2/10 vertices, from 77c94f5:
## [1] 2 7
Al seleccionar un vértice que no existe se produce un error:
@@ -674,12 +674,12 @@ Selección de aristas
E(g)[.from(3)]
-## + 4/9 edges from 816870d (vertex names):
+## + 4/9 edges from e977f5d (vertex names):
## [1] Alejandra--Carmina Carmina --Frank Carmina --Dennis Carmina --Esther
Por supuesto, también funciona con nombres de vértices:
E(g)[.from("Carmina")]
-## + 4/9 edges from 816870d (vertex names):
+## + 4/9 edges from e977f5d (vertex names):
## [1] Alejandra--Carmina Carmina --Frank Carmina --Dennis Carmina --Esther
Al usar .to
, se filtran la serie de aristas en función
de los vértices de destino o diana. Esto es diferente de
@@ -696,7 +696,7 @@
Selección de aristas
-## + 3/9 edges from 816870d (vertex names):
+## + 3/9 edges from e977f5d (vertex names):
## [1] Carmina--Dennis Carmina--Esther Dennis --Esther
Para que el operador %--%
funcione con nombres, puedes
construir vectores de caracteres que contengan los nombres y luego
@@ -716,7 +716,7 @@
Selección de aristas## [1] "Alejandra" "Carmina" "Esther"
-## + 5/9 edges from 816870d (vertex names):
+## + 5/9 edges from e977f5d (vertex names):
## [1] Alejandra--Bruno Alejandra--Frank Carmina --Frank Carmina --Dennis
## [5] Dennis --Esther
diff --git a/articles/igraph_ES_files/figure-html/unnamed-chunk-17-1.png b/articles/igraph_ES_files/figure-html/unnamed-chunk-17-1.png
index 442713feb3e0d7df42e005dfce093d19c0ab6ad5..b62e4700b1512284c00f507f61f1feb434efdb25 100644
GIT binary patch
literal 35371
zcmeFXWmr^g)HXZ=A|hpiAc8S~D4`%A4PtGO5Rs4;6lokf2MkaV(LHo4B_-Xds5p|+
z9WpdX4?XiwR9IY}<9qS`(2;9Lj+A$_-a#?`pg(*-ExOkJkf7{^gKy5VX$tBs-Mu?^`ogEr
zy>!Q?n@sj8DXA#F)C`NhsroW>Fm9OVC?5l+7b8|N%Rp-{Cm4;^7KI2KOUFjvl>{AJPj*@AMHz;`lhz;qnDyuc67@?*LO@jKf~Gq>*H
zy`>0r5L-vK=lS<2DjD%#LWvz1lRM+G30$O~#J5RsQ(%_^Y{1WFQgbD0F=56agm2Rk
zo}H0oJf=*&Pf?>-9X7#Osl$}sGn;dN2+c8WO%~%=?3xjww?>03ma?n^x8LjKoXCBm
zV?c8nNW(Kj4K@t7i177+7jUPgo^=0)#K{3?MS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