Last chance! 50% off unlimited learning
Sale ends in
Collects comments made by users on one or more specified subreddit conversation threads and structures
the data into a dataframe with the class names "datasource"
and "reddit"
.
# S3 method for reddit
Collect(credential, threadUrls, waitTime = 5,
writeToFile = FALSE, ...)
A credential
object generated from Authenticate
with class name "reddit"
.
Character vector. Reddit thread urls to collect data from.
Numeric integer. Time in seconds to wait in-between url collection requests.
Logical. Write collected data to file. Default is FALSE
.
Additional parameters passed to function. Not used in this method.
A data.frame
object with class names "datasource"
and "reddit"
.
# NOT RUN {
# subreddit url to collect threads from
threadUrls <- c("https://www.reddit.com/r/xxxxxx/comments/xxxxxx/x_xxxx_xxxxxxxxx/")
redditData <- redditAuth %>%
Collect(threadUrls = threadUrls, waitTime = 3, writeToFile = TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab