r - Search Operators in RedditExtractoR -
i'm trying set process pull down reddit posts , comments relating group of keywords. get_reddit()
function in redditextractor
package makes extremely straightforward, i'm not sure i'm using search terms properly, , haven't been able find useful detail in package documentation or online. i've tested search functions work on reddit site, below, no luck.
using below code, i've tested handful of terms, , results bit confusing. (note: in testing, actual number of results may differ based on times when queries passed.)
library(redditextractor) term <- "bank" # or "bank loan" or "bank, loan" etc. test <- get_reddit(search_terms = term, page_threshold = 10, sort_by = "new")
"bank"
returns 196 records; "loan"
gives 157. "bank, loan"
, "bank loan"
each give 2700, however; "bank or loan"
gives 31. expect "bank, loan"
/"bank loan"
give no more 196+157(=353).
what missing?
seems :
term <- "bank or loan"
is transformed bank+or+loan , explain why getting unexpected result. check line on github.
so suggest try this:
term <- "bank|loan"
now getting approx 700 results.
Comments
Post a Comment