| rename_sessions | R Documentation |
Rename session walls
rename_sessions(dn, mapping)
dn |
A sessioned temporal network. |
mapping |
A named character vector from old to new labels, or an
|
A new dynet object, class
c("dynet", "netobject", "cograph_network"), with edge and vertex
session labels renamed together and the session scheme in its metadata
updated. Labels absent from mapping are left alone. Raises
dynet_unknown_session when an old label is not a session, and
dynet_bad_input when the network has no session scheme, when mapping
is malformed, or when the renaming would produce duplicate labels.
dn <- dynet(school_contacts)
weeks <- with(school_contacts, ifelse(start < 7, "week_1", "later"))
labelled <- set_tie_sessions(dn, session = weeks)
renamed <- rename_sessions(labelled, c(week_1 = "opening"))
renamed
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.