| set_vertex_spells | R Documentation |
Replace declared vertex activity
set_vertex_spells(dn, data = NULL)
dn |
A temporal network. |
data |
A vertex-spell data frame with |
A new dynet object, class
c("dynet", "netobject", "cograph_network"), whose declared vertex
activity is exactly data and whose edge spells, node attributes and
metadata are those of dn. Overlapping or adjacent spells are
canonicalised exactly as in dynet(), so canonical spell identifiers may
change. Read the result back with
as.data.frame(x, what = "vertex_spells"). Raises dynet_unknown_node
when data names a vertex the network does not have, and
dynet_bad_input for a string other than "ties".
dn <- dynet(school_contacts)
present <- data.frame(node = c("Ana", "Ben"), start = 0, end = 10)
enrolled <- set_vertex_spells(dn, present)
as.data.frame(enrolled, what = "vertex_spells")
# Present from the first contact to the last, vertex by vertex.
spanned <- set_vertex_spells(dn, "ties")
as.data.frame(spanned, what = "vertex_spells")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.