MyNixOS website logo
Description

Automatically Search Errors or Warnings.

Provides environment hooks that obtain errors and warnings which occur during the execution of code to automatically search for solutions.

errorist

R-CMD-check CRAN_Status_Badge CRAN RStudio mirrordownloads

errorist: one who holds to and propagates error

Merriam Webster

The goal of errorist is to automatically search errors and warnings the second they arise.

Installation

The errorist 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 errorist package with:

install.packages("errorist")

For the development version, you can opt for:

if(!requireNamespace("remotes")) { install.packages("remotes") }
remotes::install_github("coatless-rpkg/errorist")

Usage

library(errorist)

Details

When the errorist package is loaded, two handlers are automatically established to intercept the error and warning messages that arise during execution of code. The intercepted messages are then directed to pre-specified search engines on the internet using the user’s preferred system web browser. By default, the search engine used to look up the messages is Google.

You can specify a different search engine handler by setting default values:

  • errorist.warning: Warning search engine portal. The default is searcher::search_google.
  • errorist.error: Error search engine portal. The default is searcher::search_google.
  • errorist.autoload: Automatically search errors. The default is TRUE.

If frequent use of the package occurs, consider adding the different search handlers as an option in your .Rprofile:

# Add custom options
.First <- function() {
  options(
    errorist.warning = searcher::search_google,
    errorist.error = searcher::search_google
  )
}

# Load the package if in RStudio or R GUI
if (interactive()) {
  suppressMessages(require(errorist))
}

Motivation

The idea for errorist came from a conversation among Dirk Eddelbuettel, Barry Rowlingson, and myself musing about having compilers provide a link explaining what the error meant and how to solve it. This conversation was sprouted due to the mouse overtext of XKCD Comic 1185: Ineffective Sorts.

StackSort connects to StackOverflow, searches for ‘sort a list’, and downloads and runs code snippets until the list is sorted.

This type of code search was implemented by:

https://gkoberger.github.io/stacksort/

The idea morphed from evaluating random code chunks to providing search support for errors that occurred at runtime.

Special Thanks

License

GPL (>= 2)

Metadata

Version

0.1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    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-freebsd
  • 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-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows