Add nodes to a temporal network
Arguments
- dn
A temporal network from
dynet().- data
A character vector of new node names or a data frame containing a
namecolumn and optional static attributes.
Value
A new dynet object, of the same class and structure as the input,
with the added nodes represented as implicit always-active isolates until
ties or vertex activity are supplied. The input is unchanged.
Details
Existing nodes and attributes are unchanged. Missing attribute
values are filled with typed NA. If the source has a cograph grouping,
each new node must supply its group through a groups column in data
or through the source attribute from which that grouping was derived;
otherwise a condition of class dynet_missing_group is raised.
Examples
dn <- dynet(data.frame(from = "A", to = "B", start = 0, end = 1))
add_nodes(dn, "C")
#> # Temporal network (interval format, directed) | a cograph netobject
#> # 3 vertices | 1 edge spells | 1 distinct pairs
#> # observed from 0 to 1 step, binned every 1
#>
#> from to start end duration weight
#> A B 0 1 1 1