MyNixOS website logo
Description

Access Domains and Search Popular Websites.

Functions that allow for accessing domains and a number of search engines.

websearchr

The goal of websearchr is to provide a convenient way of accessing domains and searching popular websites directly from the R console. When working on small screens in particular, switching from the R console to the browser window, opening a new tab, navigating to the desired website and finally searching for the search terms requires around 3-6 clicks. As one is working mainly in the R console, it is more convenient to start typing the search terms right away, without having to go through the process mentioned above. For example, stackoverflow("my r problem") will open the stackoverflow search for "my r problem" in a new browser tab automatically.

Currently supported websites:

  • Bing
  • Crossref
  • Duckduckgo
  • GitHub
  • Google
  • Google Scholar
  • Qwant
  • r-bloggers.com
  • Rdocumentation.org
  • rdrr.io
  • Reddit
  • Stackoverflow
  • Twitter
  • Wikipedia
  • Wolfram Alpha

Any other domain can be accessed with web("example.com").

Language support

Twitter and Wikipedia can be searched in different languages than English. For example, to search the French version of Wikipedia use wikipedia("Langage de programmation", "fr").

Browser

To use a browser other than the default on your computer use options(browser = "path to browser"). For example, on macOS options(browser = "/usr/bin/open -a '/Applications/Safari.app'") or Windows options(browser = "C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe"). To check which browser is set as the default use getOption("browser").

Installation

CRAN Version Downloads Build Status

You can install websearchr from CRAN with:

install.packages("websearchr")

Or install the development version from GitHub:

# install.packages("remotes")
remotes::install_github("fschaff/websearchr")

Please report issues or requests for additional functionality to https://github.com/fschaff/websearchr/issues.

Example

library(websearchr)

# Try:

web("r-project.org")
#> Opening https://www.r-project.org in browser

google("my search terms")
#> Opening Google search for "my search terms" in browser

stackoverflow("my r problem")
#> Opening Stackoverflow search for "my r problem" in browser
Metadata

Version

0.0.3

License

Unknown

Platforms (75)

    Darwin
    FreeBSD 13
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd13
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd13
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows