View source: R/search-functions.R
search_site | R Documentation |
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)
query |
Contents of string to search. Default is the error message. |
site |
Name of site to search on. Supported options:
|
rlang |
Search for results written in R. Default is |
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")
# Search Google
search_google("r-project")
# Search Bing
search_bing("Microsoft R")
# Search DuckDuckGo
search_duckduckgo("R language")
# Search startpage
search_startpage("VS Code")
# Search Rseek
search_rseek("searcher")
# Search Qwant
search_qwant("Quarto")
# Search RStudio Community
search_rstudio_community("RStudio IDE")
# Search Twitter
search_twitter("searcher")
# Search StackOverflow for Convolutions in the r tag
search_stackoverflow("convolutions")
# Search all languages on StackOverflow for convolutions
search_stackoverflow("convolutions", rlang = FALSE)
# Search GitHub Issues for bivariate normal in the language:r
search_github("bivariate normal")
# Search all languages on GitHub Issues for bivariate normal
search_github("bivariate normal", rlang = FALSE)
# Search R code on GitHub for numerical optimization
search_grep("optim")
# Search all code on GitHub for numerical optimization
search_grep("optim", rlang = FALSE)
# Search BitBucket for assertions
search_bitbucket("assertions")
## Not run:
# On error, automatically search the message on google
options(error = searcher("google"))
options(error = search_google)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.