Learn R Programming

vosonSML (version 0.26.3)

Create.actor.twitter: Create twitter actor network

Description

Creates a twitter actor network from tweets returned from the twitter search query. Twitter users who have tweeted / retweeted or been mentioned in a tweet are actor nodes. The created network is directed with edges of different types representing retweets, quote tweets, mentions and replies to other users. Users who have tweeted without relations to other users will appear in the network graph as isolate nodes.

Usage

# S3 method for actor.twitter
Create(datasource, type, writeToFile = FALSE,
  verbose = FALSE, ...)

Arguments

datasource

Collected social media data with "datasource" and "twitter" class names.

type

Character string. Type of network to be created, set to "actor".

writeToFile

Logical. Save network data to a file in the current working directory. Default is FALSE.

verbose

Logical. Output additional information about the network creation. Default is FALSE.

...

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

Value

Named list containing dataframes with the relations between actors (directed edges) $relations, the actors (including isolates) $users and generated actor network as igraph object $graph.

Examples

Run this code
# NOT RUN {
# create a twitter actor network graph and output to console additional information 
# during network creation (verbose)
actorNetwork <- twitterData %>% Create("actor", writeToFile = TRUE, verbose = TRUE)

# igraph object
# actorNetwork$graph
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab