nodes_from_events | R Documentation |
A helper function for extracting a simple list of nodes based on the interactions in an event list. Extracts the character ID numbers, character names, and the number of lines spoken by each character.
The event list should be structured consistently with the format specified elsewhere in this package documentation (at least a sender ID column followed by columns containing binary dummy variables for each character).
nodes_from_events(event_list, from = 3, receivers = FALSE)
event_list |
The event list, containing at least a sender ID column and columns containing binary dummy variables for each character. |
from |
The column containing the sender IDs, followed by dummy variables for each character. |
receivers |
If TRUE, a column |
A data frame with rows corrsponding to characters and columns containing node-level variables.
tfa_events <- movienetdata::starwars_tfa$event_list
tfa_nodes <- nodes_from_events(event_list = tfa_events,
from = 3,
receivers = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.