add.verticies.active, add.edges.active
Convenience functions for adding a set of verticies (or edges) and setting them to be active in a single call
## S3 method for class 'active' add.vertices(x, nv, vattr = NULL, last.mode = TRUE, onset = NULL, terminus = NULL, length = NULL, at = NULL, ...) ## S3 method for class 'active' add.edges(x, tail, head, names.eval = NULL, vals.eval = NULL, onset = NULL, terminus = NULL, length = NULL, at = NULL, ...)
x |
an object of class |
nv |
the number of vertices to add |
tail |
a vector of vertex IDs corresponding to the tail (source, ego) of each edge to be added |
head |
a vector of vertex IDs corresponding to the head (target, alter) of each edge to be added |
onset |
an optional vector of time points that specifies the starts of the interval(s). This must be accompanied by one of |
terminus |
an optional vector of time points that specifies the ends of the interval(s). This must be accompanied by one of |
length |
an optional vector of interval lengths for the interval(s). This must be accompanied by one of |
at |
optional, one or more time points to be activated. |
names.eval |
optional list of length equal to the number of edges, with each element containing a list of names for the attributes of the corresponding edge. not currently interpreted in a dynamic context, but passed directly to |
vals.eval |
an optional list of lists of edge attribute values (matching |
vattr |
optionally, a list of attributes with one entry per new vertex. not currently interpreted in a dynamic context, but passed directly to |
last.mode |
logical; should the new vertices be added to the last (rather than the first) mode of a bipartite network? |
... |
possible future additional arguments |
Essentially a wrapper for a call to add.vertices
and activate.vertices
or add.edges
and activate.edges
when setting up a network object. These are not the S3 methods that their name appears to imply, since there is no "active" class. See add.edges.networkDynamic
, etc.
The passed in network object with class set to networkDynamic
and the specified number of new vertices or edges added and activated
Order of arguments was changed in version 1.9 for S3 method consistency. Does not currently support the multiple-vertex head- and tail-sets of add.edges
or add.edge
.
Ayn Leslie-Cook aynlc3@uw.edu
See Also as activate.vertices
, activate.edges
,add.vertices
,add.edges
nw <- network.initialize(5) activate.vertices(nw,onset=0,terminus=10) network.size(nw) # just 5 nodes # add some new nodes with times add.vertices.active(nw,2,onset=10,terminus=12) network.size(nw) # now we have 7 nodes # add 2 edges edges, and activate them add.edges(nw, tail=c(1,2),head=c(2,3)) activate.edges(nw,onset=0,terminus=10,e=1:2) # instead add and activate at the same time add.edges.active(nw, tail=c(3,4),head=c(4,5),onset=10,terminus=12)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.