get_reddit: Get all data attributes from search query

Description Usage Arguments Value Examples

Description

Get all data attributes from search query

Usage

1
2
3
get_reddit(search_terms = NA, regex_filter = "", subreddit = NA,
  cn_threshold = 1, page_threshold = 1, sort_by = "comments",
  wait_time = 2)

Arguments

search_terms

A string of terms to be searched on Reddit.

regex_filter

An optional regular expression filter that will remove URLs with titles that do not match the condition.

subreddit

An optional character string that will restrict the search to the specified subreddit.

cn_threshold

Comment number threshold that remove URLs with fewer comments that cn_threshold. 0 by default.

page_threshold

Page threshold that controls the number of pages is going to be searched for a given search word. 1 by default.

sort_by

Sorting parameter, either "comments" (default) or "new".

wait_time

wait time in seconds between page requests. 2 by default and it is also the minimum (API rate limit).

Value

A data frame with structure / position of the comment with respect to other comments (structure), ID (id), post / thread date (post_date), comment date (comm_date), number of comments within a post / thread (num_comments), subreddit (subreddit) upvote proportion (upvote_prop), post /thread score (post_score), author of the post / thread (author), user corresponding to the comment (user), comment score (comment_score), controversiality (controversiality), comment (comment), title (title), post / thread text (post_text), URL referenced (link) domain of the references URL (domain)

Examples

1
2
3
4
## Not run: 
reddit_data = get_reddit(search_terms = "science",subreddit = "science",cn_threshold=10)

## End(Not run)


Search within the RedditExtractoR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.