Learn R Programming

vosonSML (version 0.29.13)

vosonSML::AddText.actor.youtube: Add columns containing text data to youtube actor network dataframes

Description

Text comments are added to the network as edge attributes. References to actors are detected at the beginning of comments and edges redirected to that actor instead if they differ from the top-level comment author.

Usage

# S3 method for actor.youtube
AddText(net, data, repliesFromText = FALSE, atRepliesOnly = TRUE, ...)

Value

Network as a named list of two dataframes containing $nodes and $edges

including columns containing text data.

Arguments

net

A named list of dataframes nodes and edges generated by Create.

data

A dataframe generated by Collect.

repliesFromText

Logical. If comment text for an edge begins with screen_name change the edge to be directed to screen_name - if different from the top level comment author that the reply comment was posted to. Default is FALSE.

atRepliesOnly

Logical. Comment screen_names must begin with an '@' symbol to be redirected. Default is TRUE.

...

Additional parameters passed to function. Not used in this method.

Examples

Run this code
if (FALSE) {
# add text to an actor network ignoring references to actors at the beginning of
# comment text
activityNetwork <- collectData %>% Create("activity") %>% 
                                   AddText(collectData, repliesFromText = FALSE)

# network
# activityNetwork$nodes
# activityNetwork$edges
}

Run the code above in your browser using DataLab