Skip to content

Commit 28b9b37

Browse files
docs: use more culturally diverse names in intro vignettes (#1246)
2 parents c282909 + 272083e commit 28b9b37

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

vignettes/igraph.Rmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ To demonstrate the use of attributes, let us create a simple social network:
247247

248248
```{r}
249249
g <- make_graph(
250-
~ Alice - Bob:Claire:Frank, Claire - Alice:Dennis:Frank:Esther,
251-
George - Dennis:Frank, Dennis - Esther
250+
~ Alice - Boris:Himari:Moshe, Himari - Alice:Nang:Moshe:Samira,
251+
Ibrahim - Nang:Moshe, Nang - Samira
252252
)
253253
```
254254

@@ -265,8 +265,8 @@ summary(g)
265265

266266
```{r echo = TRUE, eval=FALSE}
267267
g <- make_graph(
268-
~ Alice - Bob:Claire:Frank, Claire - Alice:Dennis:Frank:Esther,
269-
George - Dennis:Frank, Dennis - Esther
268+
~ Alice - Boris:Himari:Moshe, Himari - Alice:Nang:Moshe:Samira,
269+
Ibrahim - Nang:Moshe, Nang - Samira
270270
) %>%
271271
set_vertex_attr("age", value = c(25, 31, 18, 23, 47, 22, 50)) %>%
272272
set_vertex_attr("gender", value = c("f", "m", "f", "m", "m", "f", "m")) %>%
@@ -292,7 +292,7 @@ graph_attr(g, "date")
292292
To retrieve attributes, you can also use `graph_attr()`, `vertex_attr()`, and `edge_attr()`. To find the ID of a vertex you can use the function `match()`:
293293

294294
```{r echo = TRUE}
295-
match(c("George"), V(g)$name)
295+
match(c("Ibrahim"), V(g)$name)
296296
```
297297

298298
To assign attributes to a subset of vertices or edges, you can use:
@@ -334,7 +334,7 @@ degree(g, v = c(3, 4, 5))
334334
Most functions that accept vertex IDs also accept vertex _names_ (the values of the `name` vertex attribute) as long as the names are unique:
335335

336336
```{r echo = TRUE}
337-
degree(g, v = c("Carmina", "Frank", "Dennis"))
337+
degree(g, v = c("Carmina", "Moshe", "Nang"))
338338
```
339339

340340
It also works for single vertices:
@@ -453,7 +453,7 @@ E(g)[.from("Carmina")]
453453

454454
Using `.to()` filters edge sequences based on the target vertices. This is different from `.from()` if the graph is directed, while it gives the same answer for undirected graphs. Using `.inc()` selects only those edges that are incident on a single vertex or at least one of the vertices, irrespective of the edge directions.
455455

456-
The `%--%` operator can be used to select edges between specific groups of vertices, ignoring edge directions in directed graphs. For instance, the following expression selects all the edges between Carmina (vertex index 3), Dennis (vertex index 5) and Esther (vertex index 6):
456+
The `%--%` operator can be used to select edges between specific groups of vertices, ignoring edge directions in directed graphs. For instance, the following expression selects all the edges between Carmina (vertex index 3), Nang (vertex index 5) and Samira (vertex index 6):
457457

458458
```{r echo = TRUE}
459459
E(g)[3:5 %--% 5:6]
@@ -487,7 +487,7 @@ The adjacency matrix is another way to represent a graph. In an adjacency matrix
487487
as_adjacency_matrix(g)
488488
```
489489

490-
For example, Carmina (`1, 0, 0, 1, 1, 1, 0`) is directly connected to Alejandra (who has vertex index 1), Frank (index 4), Dennis (index 5) and Esther (index 6), but not to Bruno (index 2) or to George (index 7).
490+
For example, Carmina (`1, 0, 0, 1, 1, 1, 0`) is directly connected to Alejandra (who has vertex index 1), Moshe (index 4), Nang (index 5) and Samira (index 6), but not to Bruno (index 2) or to Ibrahim (index 7).
491491

492492
## Layouts and plotting
493493

vignettes/igraph_ES.rmd

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,10 @@ Para demostrar el uso de los atributos, creemos una red social sencilla:
255255

256256
```{r}
257257
g <- make_graph(
258-
~ Alice-Bob:Claire:Frank,
259-
Claire-Alice:Dennis:Frank:Esther,
260-
George-Dennis:Frank,
261-
Dennis-Esther
258+
~ Alice-Boris:Himari:Moshe,
259+
Himari-Alice:Nang:Moshe:Samira,
260+
Ibrahim-Nang:Moshe,
261+
Nang-Samira
262262
)
263263
```
264264

@@ -275,10 +275,10 @@ summary(g)
275275

276276
```{r echo = TRUE, eval=FALSE}
277277
g <- make_graph(
278-
~ Alice-Bob:Claire:Frank,
279-
Claire-Alice:Dennis:Frank:Esther,
280-
George-Dennis:Frank,
281-
Dennis-Esther
278+
~ Alice-Boris:Himari:Moshe,
279+
Himari-Alice:Nang:Moshe:Samira,
280+
Ibrahim-Nang:Moshe,
281+
Nang-Samira
282282
) %>%
283283
set_vertex_attr("age", value = c(25, 31, 18, 23, 47, 22, 50)) %>%
284284
set_vertex_attr("gender", value = c("f", "m", "f", "m", "m", "f", "m")) %>%
@@ -304,7 +304,7 @@ graph_attr(g, "date")
304304
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()`:
305305

306306
```{r echo = TRUE}
307-
match(c("George"), V(g)$name)
307+
match(c("Ibrahim"), V(g)$name)
308308
```
309309

310310
Para asignar atributos a un subconjunto de vértices o aristas, puedes utilizar:
@@ -346,7 +346,7 @@ degree(g, v = c(3,4,5))
346346
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:
347347

348348
```{r echo = TRUE}
349-
degree(g, v = c("Carmina", "Frank", "Dennis"))
349+
degree(g, v = c("Carmina", "Moshe", "Nang"))
350350
```
351351

352352
También funciona para vértices individuales:
@@ -465,7 +465,7 @@ E(g)[.from("Carmina")]
465465

466466
Al usar `.to()`, se filtran la serie de aristas en función de los vértices de destino o diana. Esto es diferente de `.from()` si el grafo es dirigido, mientras que da la misma respuesta para grafos no 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.
467467

468-
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), Dennis (su ID de vértice es el 5) y Esther (su ID de vértice es el 6):
468+
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):
469469

470470
```{r echo = TRUE}
471471
E(g) [ 3:5 %--% 5:6 ]
@@ -499,7 +499,7 @@ Una matriz de adyacencia es otra manera de representar un grafo. En la matriz de
499499
as_adjacency_matrix(g)
500500
```
501501

502-
Por ejemplo, Carmina (`1, 0, 0, 1, 1, 1, 0`) está directamente conectada con Alejandra (que tiene el índice 1), Frank (índice 4), Dennis (índice 5), Esther (índice 6) y , pero no con Bruno (índice 2) ni con George (índice 7).
502+
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 no con Bruno (índice 2) ni con Ibrahim (índice 7).
503503

504504
## Diseños y graficación
505505

0 commit comments

Comments
 (0)