-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
37 lines (26 loc) · 1.09 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
## defer
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![Build Status](https://travis-ci.com/reside-ic/defer.svg?branch=master)](https://travis-ci.org/reside-ic/defer)
[![codecov.io](https://codecov.io/github/reside-ic/defer/coverage.svg?branch=master)](https://codecov.io/github/reside-ic/defer?branch=master)
> Defer errors
Proof-of-concept for collecting up errors from a code block and throwing them at all once.
```{r, error = TRUE}
check_positive <- function(x) {
if (x < 0) {
defer::deferrable_error(paste("got a negative number:", x))
}
}
defer::defer_errors({
check_positive(0)
check_positive(-1)
check_positive(-2)
})
```
For more information see [our blog post](https://reside-ic.github.io/blog/deferring-errors-with-r/)
## Installation
For now, install directly from github
```
remotes::install_github("reside-ic/defer")
```
## License
MIT © Imperial College of Science, Technology and Medicine