I am using ego function to find the immediate neighbors of node i.
nbr <- ego(graph1, 1, i)
print(nbr)
The print statement outputs:
[[1]]
+ 4/1000 vertices:
[1] 119 95 237 276
How can I access an integer from the list: 119 95 237 276?
I am using ego function to find the immediate neighbors of node i.
nbr <- ego(graph1, 1, i)
print(nbr)
The print statement outputs:
[[1]]
+ 4/1000 vertices:
[1] 119 95 237 276
How can I access an integer from the list: 119 95 237 276?