-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
37 lines (26 loc) · 1.09 KB
/
README.Rmd
File metadata and controls
37 lines (26 loc) · 1.09 KB
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
[](https://www.repostatus.org/#wip)
[](https://travis-ci.org/reside-ic/defer)
[](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