reddit_urls: Returns relevant reddit URLs

Description Usage Arguments Value Examples

Description

Returns relevant reddit URLs

Usage

1
2
3
reddit_urls(search_terms = NA, regex_filter = "", subreddit = NA,
  cn_threshold = 0, page_threshold = 1, sort_by = "relevance",
  wait_time = 2)

Arguments

search_terms

A character string 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 subreddits (separated by space).

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 URLs (links), number of comments (num_comments), title (title),date (date) and subreddit (subreddit).

Examples

1
2
3
4
## Not run: 
example_urls = reddit_urls(search_terms="science")

## 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.