CreateEgoNetworkFromData: Create 'ego' networks from social media data

Description Usage Arguments Value Note Author(s) Examples

View source: R/CreateEgoNetworkFromData.R

Description

This function creates 'ego' networks from social media data as a data.frame of class dataSource.*.ego. The networks are igraph objects.

Usage

1
CreateEgoNetworkFromData(x, writeToFile)

Arguments

x

a data.frame of class dataSource.*.ego

writeToFile

logical. If TRUE then the network is saved to file in current working directory (GRAPHML format), with filename denoting the current date/time and the type of network.

Value

An igraph graph object, with directed and weighted edges.

Note

Similarly named function CreateEgoNetwork is a function of both collecting data from social media and creating ego network. The current function only creates ego network out of collected social media data.

Author(s)

Timothy Graham <timothy.graham3@uq.net.au>, Robert Ackland<robert.ackland@anu.edu.au> & Chung-hong Chan <chainsawtiney@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
myAppID <- "123456789098765"
myAppSecret <- "abc123abc123abc123abc123abc123ab"
instagram_oauth_token <- AuthenticateWithInstagramAPI(appID=myAppID,
appSecret=myAppSecret, useCachedToken=TRUE)
myUsernames <- c("senjohnmccain","obama")
instagramEgodata <- CollectEgoInstgram(username=myUsernames,
verbose=TRUE,degreeEgoNet=1,
waitForRateLimit=TRUE,getFollows=FALSE)
CreateEgoNetoworkFromData(instagramEgodata)
## the same as Create(instagramEgodata) or Create(instagramEgodata, "ego")

## End(Not run)

SocialMediaLab documentation built on May 29, 2017, 9:41 p.m.