Description Usage Arguments Value See Also Examples

This function is similar to `neighbors`

, but it queries
the adjacent vertices for multiple vertices at once.

1 | ```
adjacent_vertices(graph, v, mode = c("out", "in", "all", "total"))
``` |

`graph` |
Input graph. |

`v` |
The vertices to query. |

`mode` |
Whether to query outgoing (‘out’), incoming (‘in’) edges, or both types (‘all’). This is ignored for undirected graphs. |

A list of vertex sequences.

Other structural queries:
`[.igraph()`

,
`[[.igraph()`

,
`are_adjacent()`

,
`ends()`

,
`get.edge.ids()`

,
`gorder()`

,
`gsize()`

,
`head_of()`

,
`incident_edges()`

,
`incident()`

,
`is_directed()`

,
`neighbors()`

,
`tail_of()`

1 2 | ```
g <- make_graph("Zachary")
adjacent_vertices(g, c(1, 34))
``` |

```
Attaching package: 'igraph'
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
[[1]]
+ 16/34 vertices:
[1] 2 3 4 5 6 7 8 9 11 12 13 14 18 20 22 32
[[2]]
+ 17/34 vertices:
[1] 9 10 14 15 16 19 20 21 23 24 27 28 29 30 31 32 33
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.