| as_dynet.networkDynamic | R Documentation |
Converts the edge-activity spell ledger, observation support, explicit
vertex activity, weights, static vertex attributes, and static edge
attributes of a networkDynamic object. Integer vertex identifiers are
replaced by a complete unique vertex attribute. By default Dynet tries
Name, Label, and then vertex.names, in that order.
## S3 method for class 'networkDynamic'
as_dynet(
x,
name_attribute = NULL,
group_attribute = NULL,
weight_attribute = "weight",
session_attribute = NULL,
interval = NULL,
active_default = TRUE,
import_edge_attributes = TRUE,
...
)
x |
A |
name_attribute |
Optional vertex attribute holding the public node
names. |
group_attribute |
Optional static vertex attribute used as the cograph grouping variable. |
weight_attribute |
Static edge attribute used as spell weight,
|
session_attribute |
Optional static edge attribute used as the spell
session label. |
interval |
Positive measurement interval. |
active_default |
Whether legacy edges with no explicit activity spell
are active over the observation period, matching the same argument in
|
import_edge_attributes |
Whether to retain compatible static legacy
edge attributes on the raw Dynet spell ledger. |
... |
Ignored. |
Dynamic edge attributes other than activity itself are not part of the
networkDynamic spell-list interface and are therefore not imported.
Ordinary per-edge attributes are repeated onto every imported spell of the
corresponding aggregate edge, matched on the canonical endpoint order
dynet() stores, so an undirected pair carries its own attributes.
A dynet() temporal network: an object of class
c("dynet", "netobject", "cograph_network") whose spell table has one row
per imported edge-activity spell, with the legacy vertex and edge
attributes, observation support, vertex activity and censor flags carried
across. Its metadata additionally carries legacy_source = "networkDynamic", the chosen legacy_name_attribute, the retained
legacy_edge_attributes and any legacy_edge_attribute_renames.
as_dynet(), the generic.
if (requireNamespace("networkDynamic", quietly = TRUE) &&
requireNamespace("network", quietly = TRUE)) {
spells <- data.frame(onset = c(0, 1), terminus = c(2, 3),
tail = c(1, 2), head = c(2, 3))
legacy <- networkDynamic::networkDynamic(edge.spells = spells)
network::set.vertex.attribute(legacy, "Name", c("A", "B", "C"))
dn <- as_dynet(legacy)
as.data.frame(dn)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.