-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
55 lines (37 loc) · 1.14 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# wtfdbg
<!-- badges: start -->
<!-- badges: end -->
This package is to facilitate debugging practice for the RStudio Conference
Workshop _What They Forgot To Teach You About R_.
The `fruit_avg()` function is from Jenny Bryan's rstudio::conf(2020) keynote
_Object of type 'closure' is not subsettable_ <https://github.com/jennybc/debugging>.
Workshop exercises are at <https://github.com/rstats-wtf/wtf-debugging>. Use
of the `wtfdb` package corresponds to `03_exercise`: debugging others' code.
## Installation
You can install the development version of `wtfdbg` from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("rstats-wtf/wtfdbg")
```
## This works
```{r example-works}
library(wtfdbg)
fruit_avg(fruit, "berry")
```
## This does not
```{r example-fail, error = TRUE}
fruit_avg(fruit, "peach")
```
Can you use debugging tools to figure out why?