#Install the required package install.packages("RedditExtractor") #Load the package library(RedditExtractoR) #Find subreddits subreddits<-find_subreddits("keywords") ## Look for links containing the word conspiracy in the home page links <- find_thread_urls( keywords = "conspiracy", sort_by = "top", subreddit = NA, period = "month" ) ## Look for links containing the word conspiracy in a specific subreddit links <- find_thread_urls( keywords = "conspiracy", sort_by = "new", subreddit = "conspiracy", period = "month" ) #get the content content <- get_thread_content(links$url) comments<-content$comments threads<-content$threads View(comments) View(threads) ## Create a csv dataset write.cvs2(threads,"filename.csv")