diff --git a/.gitignore b/.gitignore index 7b732e7..7487699 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .RData .Ruserdata .DS_Store +inst/doc diff --git a/DESCRIPTION b/DESCRIPTION index 52d5fda..0a49ce0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -10,9 +10,12 @@ BugReports: https://github.com/coatless/errorist/issues Depends: R (>= 3.0.0) Imports: searcher (>= 0.0.2) Suggests: testthat, - covr + covr, + knitr, + rmarkdown License: GPL (>= 2) Encoding: UTF-8 LazyData: true RoxygenNote: 6.0.1 Roxygen: list(markdown = TRUE) +VignetteBuilder: knitr diff --git a/vignettes/working-with-errorist.Rmd b/vignettes/working-with-errorist.Rmd new file mode 100644 index 0000000..fe338f1 --- /dev/null +++ b/vignettes/working-with-errorist.Rmd @@ -0,0 +1,40 @@ +--- +title: "Working with the errorist package" +author: "JJB" +date: "`r Sys.Date()`" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{Working with the errorist package} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r setup, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + + +The `errorist` package is designed to provide support for newcomers to _R_ who +are learning how to write code. Philosophically, `errorist` takes the position +of being as invisible as possible. To achieve the invisibility, on package load, +handlers to receive error and warning message are automatically created and applied. +These handlers propogate the messages raised by _R_ into the +[`searcher`](https://CRAN.R-project.org/package=searcher) package, which +automatically searches the contents on [Google](https://google.com/) by default. + +Thus, to use `errorist` in a causal manner, please type: + +```{r} +library(errorist) +``` + +To remove the `errorist` handlers, please either call +the `disable_errorist()` function or detach the package. + +```{r} +detach("package:errorist", unload = TRUE) +``` +