Determine if specified vertices of a network have any edges (are not isolates)
has.edges.RdReturns a logical value for each specified vertex, indicating if it has any incident (in or out) edges. Checks all vertices by default
Usage
has.edges(net, v = seq_len(network.size(net)), ...)
# S3 method for class 'network'
has.edges(net, v = seq_len(network.size(net)), ...)Arguments
- net
a
networkobject to be queried- v
integer vector of vertex ids to check
- ...
additional arguments to methods
Value
returns a logical vector with the same length as v, with TRUE if the vertex is involved in any edges, FALSE if it is an isolate.
Examples
test<-network.initialize(5)
test[1,2]<-1
has.edges(test)
#> [1] TRUE TRUE FALSE FALSE FALSE
has.edges(test,v=5)
#> [1] FALSE