Creates an appropriate query string for a search engine and then opens up the resulting page in a web browser.
search_site(
query,
site = c("google", "bing", "duckduckgo", "ddg", "startpage", "sp", "qwant", "rseek",
"rstudio community", "rscom", "twitter", "stackoverflow", "so", "github", "gh",
"grep", "bitbucket", "bb"),
rlang = TRUE
)
search_google(query = geterrmessage(), rlang = TRUE)
search_bing(query = geterrmessage(), rlang = TRUE)
search_duckduckgo(query = geterrmessage(), rlang = TRUE)
search_ddg(query = geterrmessage(), rlang = TRUE)
search_ixquick(query = geterrmessage(), rlang = TRUE)
search_startpage(query = geterrmessage(), rlang = TRUE)
search_sp(query = geterrmessage(), rlang = TRUE)
search_ecosia(query = geterrmessage(), rlang = TRUE)
search_rseek(query = geterrmessage(), rlang = TRUE)
search_qwant(query = geterrmessage(), rlang = TRUE)
search_rstudio_community(query = geterrmessage(), rlang = TRUE)
search_rscom(query = geterrmessage(), rlang = TRUE)
search_twitter(query = geterrmessage(), rlang = TRUE)
search_stackoverflow(query = geterrmessage(), rlang = TRUE)
search_so(query = geterrmessage(), rlang = TRUE)
search_github(query = geterrmessage(), rlang = TRUE)
search_gh(query = geterrmessage(), rlang = TRUE)
search_grep(query = geterrmessage(), rlang = TRUE)
search_bitbucket(query = geterrmessage(), rlang = TRUE)
search_bb(query = geterrmessage(), rlang = TRUE)
Contents of string to search. Default is the error message.
Name of site to search on. Supported options:
"google"
(default), "bing"
, "duckduckgo"
, "startpage"
,
"qwant"
,"rstudio community"
, "twitter"
,"stackoverflow"
,
"github"
, "grep"
, and "bitbucket"
.
Search for results written in R. Default is TRUE
The generated search URL or an empty string.
The search_google
function searches Google using:
https://www.google.com/search?q=<query>
See https://moz.com/learn/seo/search-operators for details.
The search_bing()
function searches Bing using:
https://www.bing.com/search?q=<query>
The search_duckduckgo()
and search_ddg()
functions both search
DuckDuckGo using: https://duckduckgo.com/?q=<query>
The search_startpage()
function searches
startpage using:
https://startpage.com/do/dsearch?query=<query>
The search_ecosia()
function searches
Ecosia using:
https://www.ecosia.org/search?q=<query>
For additional details regarding Ecosia's search interface please see: https://ecosia.helpscoutdocs.com/article/502-ecosia-on-desktop
The search_rseek()
function searches Rseek using:
https://rseek.org/?q=<query>
The search_qwant()
function searches
Qwant using: https://www.qwant.com/?q=<query>
The search_rstudio_community()
and search_rscom()
functions both search
RStudio Community using:
https://community.rstudio.com/search?q=<query>
For additional details regarding RStudio Community's search interface please see the Discourse API documentation: https://docs.discourse.org/#tag/Search
The search_twitter()
functions search
Twitter using:
https://twitter.com/search?q=<query>
For additional details regarding Twitter's
search interface please see:
https://help.twitter.com/en/using-x/x-advanced-search
The search_stackoverflow()
and search_so()
functions both search
StackOverflow using:
https://stackoverflow.com/search?q=%5Br%5D+<query>
For additional details regarding StackOverflow's
search interface please see:
https://stackoverflow.com/help/searching
The search_github()
and search_gh()
functions both search
GitHub using:
https://github.com/search?q=<query>+language%3Ar+type%3Aissue&type=Issues
For additional details regarding GitHub's search interface please see: https://docs.github.com/en/enterprise-cloud@latest/search-github/getting-started-with-searching-on-github/about-searching-on-github and https://docs.github.com/en/search-github/searching-on-github/searching-code/
The search_grep()
function searches all public code on
GitHub using grep.app by
querying: https://grep.app/search?q=<query-here>&filter[lang][0]=R
The search_bitbucket()
and search_bb()
functions both search
BitBucket using:
https://bitbucket.org/search?q=lang%3Ar+<query>
For additional details regarding BitBucket's search interface please see: https://confluence.atlassian.com/bitbucket/code-search-in-bitbucket-873876782.html
search_google()
, search_bing()
, search_duckduckgo()
,
search_startpage()
, search_rseek()
, search_qwant()
, search_twitter()
,
search_rstudio_community()
, search_stackoverflow()
,
search_github()
, search_grep()
, search_bitbucket()
, and searcher()
# Search in a generic way
search_site("r-project", "google")
#> Please type into your browser:
#> https://google.com/search?q=r-project%20r%20programming
# Search Google
search_google("r-project")
#> Please type into your browser:
#> https://google.com/search?q=r-project%20r%20programming
# Search Bing
search_bing("Microsoft R")
#> Please type into your browser:
#> https://bing.com/search?q=Microsoft%20R%20r%20programming
# Search DuckDuckGo
search_duckduckgo("R language")
#> Please type into your browser:
#> https://duckduckgo.com/?q=R%20language%20r%20programming
# Search startpage
search_startpage("VS Code")
#> Please type into your browser:
#> https://startpage.com/do/dsearch?query=VS%20Code%20r%20programming
# Search Rseek
search_rseek("searcher")
#> Please type into your browser:
#> https://rseek.org/?q=searcher%20
# Search Qwant
search_qwant("Quarto")
#> Please type into your browser:
#> https://www.qwant.com/?q=Quarto%20r%20programming
# Search RStudio Community
search_rstudio_community("RStudio IDE")
#> Please type into your browser:
#> https://community.rstudio.com/search?q=RStudio%20IDE
# Search Twitter
search_twitter("searcher")
#> Please type into your browser:
#> https://twitter.com/search?q=searcher %23rstats
# Search StackOverflow for Convolutions in the r tag
search_stackoverflow("convolutions")
#> Please type into your browser:
#> https://stackoverflow.com/search?q=convolutions%20[r]
# Search all languages on StackOverflow for convolutions
search_stackoverflow("convolutions", rlang = FALSE)
#> Please type into your browser:
#> https://stackoverflow.com/search?q=convolutions
# Search GitHub Issues for bivariate normal in the language:r
search_github("bivariate normal")
#> Please type into your browser:
#> https://github.com/search?q=bivariate%20normal%20language:r%20type:issue&type=Issues
# Search all languages on GitHub Issues for bivariate normal
search_github("bivariate normal", rlang = FALSE)
#> Please type into your browser:
#> https://github.com/search?q=bivariate%20normal&type=Issues
# Search R code on GitHub for numerical optimization
search_grep("optim")
#> Please type into your browser:
#> https://grep.app/search?q=optim%20&filter[lang][0]=R
# Search all code on GitHub for numerical optimization
search_grep("optim", rlang = FALSE)
#> Please type into your browser:
#> https://grep.app/search?q=optim
# Search BitBucket for assertions
search_bitbucket("assertions")
#> Please type into your browser:
#> https://bitbucket.com/search?q=assertions%20lang:r
if (FALSE) { # \dontrun{
# On error, automatically search the message on google
options(error = searcher("google"))
options(error = search_google)
} # }