is.adjacent {network} | R Documentation |
is.adjacent
returns TRUE
iff vi
is adjacent to vj
in x
. Missing edges may be omitted or not, as per na.omit
.
is.adjacent(x, vi, vj, na.omit = TRUE)
x |
an object of class network |
vi |
a vertex ID |
vj |
a second vertex ID |
na.omit |
logical; should missing edges count when assessing adjacency? |
A logical, giving the status of the (i,j) edge
Carter T. Butts buttsc@uci.edu
Wasserman, S. and Faust, K. 1994. Social Network Analysis: Methods and Applications. Cambridge: Cambridge University Press.
#Create a very simple graph g<-network.initialize(3) g<-add.edge(g,1,2) is.adjacent(g,1,2) #TRUE is.adjacent(g,2,1) #FALSE