| update_vertex_spells | R Documentation |
Update declared vertex-activity components
update_vertex_spells(dn, spells, data)
dn |
A temporal network. |
spells |
Integer positions or a logical mask over canonical vertex
activity, as returned by |
data |
A data frame with one row, or one row per selected component,
containing the fields to replace: |
A new dynet object, class
c("dynet", "netobject", "cograph_network"). Updated components are
canonicalised with the retained components, so overlaps can merge and
spell identifiers can change. Raises dynet_bad_input when spells is
not a valid selection, when data is malformed or of the wrong height,
or when it names the read-only derived columns vertex_spell,
duration or instant.
dn <- dynet(school_contacts)
present <- data.frame(node = c("Ana", "Ben"), start = 0, end = 10)
enrolled <- set_vertex_spells(dn, present)
extended <- update_vertex_spells(enrolled, spells = 1,
data = data.frame(end = 12))
as.data.frame(extended, what = "vertex_spells")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.