knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of {argh}
is to (try) to provide advice on obscure R error messages.
The messages returned by {argh}
try to explain what the error is. There is no guarantee they succeed.
So far, there are r nrow(read.csv("inst/en_errors.csv"))
errors analyzed for English.
So far it works with English, French and Korean. But feel free to contribute with your translation of inst/en_errors.csv.
Also, please note that this package will override any other error handler running, until you call stop_argh()
(but I'm working on that).
You can install the dev version of {argh} with:
remotes::install_github("ColinFay/argh")
library(argh) init_argh()
Wait for an error to occur:
> iri Error: object 'iri' not found argh... The object you are looking for might not exist. > library(dpylr) Error in library(dpylr) : there is no package called ‘dpylr’ argh... You might have forgotten to install a package or have mispelled the package name > "a" + "b" Error in "a" + "b" : non-numeric argument to binary operator argh... You might have tried to use a character vector where a numeric is needed. > mean$Sepal.Length Error in mean$Sepal.Length : object of type 'closure' is not subsettable argh... You might have called `$` on a function. ...
{argh}
stop_argh()
You can contribute by:
adding examples into the inst/en_errors.csv csv of errors. On each line, the first element is a regex that catches the error, the other is a message (trying) to explain the error.
add a translation of inst/en_errors.csv.
Please note that the 'argh' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.