valid.eids | R Documentation |
Returns a vector of valid edge ids (corresponding to non-NULL edges) for a network that may have some deleted edges.
valid.eids(x, ...)
## S3 method for class 'network'
valid.eids(x, ...)
x |
a network object, possibly with some deleted edges. |
... |
additional arguments to methods. |
The edge ids used in the network package are positional indices on the
internal "mel" list. When edges are removed using delete.edges
NULL
elements are left on the list. The function valid.eids
returns the ids of all the valid (non-null) edge ids for its network
argument.
a vector of integer ids corresponding to the non-null edges in x
If it is known that x has no deleted edges, seq_along(x$mel)
is
a faster way to generate the sequence of possible edge ids.
skyebend
See also delete.edges
net<-network.initialize(100)
add.edges(net,1:99,2:100)
delete.edges(net,eid=5:95)
# get the ids of the non-deleted edges
valid.eids(net)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.