Query Search Interfaces

Provides a search interface to look up terms on 'Google', 'Bing', 'DuckDuckGo', 'Startpage', 'Ecosia', 'rseek', 'Twitter', 'StackOverflow', 'RStudio Community', 'GitHub', and 'BitBucket'. Upon searching, a browser window will open with the aforementioned search results.

Travis-CI BuildStatusCRANRStudio mirrordownloadsCRAN_Status_BadgeCoverageStatus

The goal of searcher is to provide a search interface directly inside of R. For example, within R, there is now the ability to look up rcpp example numeric vector or ggplot2 fix axis labels without having to open a browser, go to a search site, and type the query. By default, the search functions automatically search the last error on call.


The searcher package is available on both CRAN and GitHub. The CRAN version is considered stable while the GitHub version is in a state of development and may break. You can install the stable version of the searcher package with:


For the development version, you can opt for:




Search Terms

The search_*() functions can be used to search a query directly from R on major search engines, code repositories, and help websites. The following search platforms are supported: Google, Bing, ixquick, DuckDuckGo, StackOverflow, GitHub, and BitBucket. By default, an appropriate suffix for each platform that ensures relevant results to R is appended to all queries. This behavior can be disabled by using rlang = FALSE.

# Searching R project on major search engines
search_google("R project")
search_bing("R project")
search_ixquick("R project")
search_duckduckgo("R project")                           # or search_ddg(...)
# Searching for linear regression questions for R and in general
search_stackoverflow("linear regression")
search_stackoverflow("linear regression", rlang = FALSE) # or search_so(...)
# Searching GitHub Issues for maps in R and other languages
search_github("maps", rlang = FALSE)                     # or search_gh(...)
# Searching BitBucket for assertions in R and other languages
search_bitbucket("assertions", rlang = FALSE)            # or search_bb(...)

Search Errors

searcher offers preliminary support for automatically or manually searching errors that are generated in R. For more robust error search support and to also search warning messages, please use the errorist package.


Searching the last error automatically is possible by registering a function as R’s error handler via either searcher(site="") or one of the search_*() functions. Thus, when an error occurs, this function will automatically be called. This triggers a new browser window to open with the error term listed in verbatim.

# Using the generic search error handler
options(error = searcher("google"))
# Directly specify the search function
options(error = search_github)
options(error = search_google)


Alternatively, these functions can also be used manually so that the default error dispatch is preserved. In the manual case, you will have to explicitly call the search function. After that, a browser window will open with the last error message as the search query on the desired search portal.

search_duckduckgo()    # or search_ddg()
search_stackoverflow() # or search_so()
search_github()        # or search_gh()
search_bitbucket()     # or search_bb()


The idea for searcher began as a project to automatically search errors and warnings that occurred while working with R after a conversation among Dirk Eddelbuettel, Barry Rowlingson, and myself. However, there was no search interface that allowed querying directly from R outside of the built-in utils::RSiteSearch(), which only queries http://search.r-project.org/, and the sos package, which queries an off-site user premade database. Both of these options were focused solely on querying R documentation made available by packages. Given the nature of errors generally being undocumented, neither of these approaches could be used. Thus, searcher was unintentionally born to provide a means for errorist, which contains a robust way to automatically searching errors and warnings.

Special Thanks


GPL (>= 2)


searcher 0.0.3


  • Added search portal search_ixquick(): Searches with ixquick. (#8, #6)


  • Append r programming to major search engines by default (#11, #10)
  • Add ixquick as a valid engine to search_site(). (#8, #6)
  • Included link to repository and bug tracker to DESCRIPTION.

searcher 0.0.2


  • Added search portal functions
    • search_site(): Looks up search portal and then searches with it.
    • search_google(): Searches with Google
    • search_bing(): Searches with Bing
    • search_duckduckgo() or search_ddg(): Searches with DuckDuckGo
    • search_github() or search_gh(): Searches issues on GitHub
    • search_bitbucket() or search_bb(): Searches issues on BitBucket
    • search_stackoverflow() or search_so(): Searches questions on StackOverflow
  • Add function generator searcher() to create function objects that can be used as error handlers in option(error = ) and task call-backs.


  • Created a browse_url() that checks to see if it is in interactive mode before trying to open a web browser 0.5 seconds after call.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.0.6 by James Balamuta, 6 months ago


Report a bug at https://github.com/r-assist/searcher/issues

Browse source code at https://github.com/cran/searcher

Authors: James Balamuta [aut, cre] , Alex Rossell Hayes [ctb]

Documentation:   PDF Manual  

GPL (>= 2) license

Suggests testthat, covr, knitr, rmarkdown

Imported by SemNetCleaner, errorist.

See at CRAN