Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

has.edges

Determine if specified vertices of a network have any edges (are not isolates)


Description

Returns 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)))

Arguments

net

a network object to be queried

v

integer vector of vertex ids to check

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.

Author(s)

skyebend

Examples

test<-network.initialize(5)
test[1,2]<-1
has.edges(test)
has.edges(test,v=5)

network

Classes for Relational Data

v1.16.1
GPL (>= 2)
Authors
Carter T. Butts [aut, cre], David Hunter [ctb], Mark Handcock [ctb], Skye Bender-deMoll [ctb], Jeffrey Horner [ctb], Li Wang [ctb]
Initial release
2020-10-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.