Check if two vertices are connected in Igraph for R
What are the functions that check if two vertices (given by their name attribute) are connected by an edge (incoming or outgoing, or both) or not? in other words, what is the name of the functions get_eid
and are_connected
of python
in igraph
in R
?
thank you in advance,
+3
academic.user
source
to share
1 answer
The R igraph library has a function are.connected()
g <- graph.ring(10)
are.connected(g, 1, 2)
# [1] TRUE
are.connected(g, 2, 4)
# [1] FALSE
for the list functions in the package, you might try looking help(package="igraph")
in the future.
+2
MrFlick
source
to share