Determine Whether Two Vertices Are Adjacent
vi is adjacent to
x. Missing edges may be omitted or not, as per
an object of class
a vertex ID
a second vertex ID
logical; should missing edges be ignored when assessing adjacency?
Vertex v is said to be adjacent to vertex v' within directed network G iff there exists some edge whose tail set contains v and whose head set contains v'. In the undirected case, head and tail sets are exchangeable, and thus v is adjacent to v' if there exists an edge such that v belongs to one endpoint set and v' belongs to the other. (In dyadic graphs, these sets are of cardinality 1, but this may not be the case where hyperedges are admitted.)
If an edge which would make v and v' adjacent is marked as missing (via its
na attribute), then the behavior of
is.adjacent depends upon
na.omit==FALSE (the default), then the return value is considered to be
NA unless there is also another edge from v to v' which is not missing (in which case the two are clearly adjacent). If
na.omit==TRUE, on the other hand the missing edge is simply disregarded in assessing adjacency (i.e., it effectively treated as not present). It is important not to confuse “not present” with “missing” in this context: the former indicates that the edge in question does not belong to the network, while the latter indicates that the state of the corresponding edge is regarded as unknown. By default, all edge states are assumed “known” unless otherwise indicated (by setting the edge's
na attribute to
Adjacency can also be determined via the extraction/replacement operators. See the associated man page for details.
A logical, giving the status of the (i,j) edge
Prior to version 1.4,
na.omit was set to
TRUE by default.
Carter T. Butts email@example.com
Butts, C. T. (2008). “network: a Package for Managing Relational Data in R.” Journal of Statistical Software, 24(2). http://www.jstatsoft.org/v24/i02/
Wasserman, S. and Faust, K. 1994. Social Network Analysis: Methods and Applications. Cambridge: Cambridge University Press.
1 2 3 4 5 6 7
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.