Skip to content

Commit

Permalink
Deliberately add bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvanderburg committed May 20, 2024
1 parent 3d18621 commit 26740b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion episodes/accessing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exercises: 10

::: objectives
- Install and attach packages from CRAN
- Install and attach packages from GitHub
- Install and attach packages from Gitlab
- Build, install and attach your own packages
:::

Expand Down
4 changes: 2 additions & 2 deletions episodes/data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This can be very useful to ship the data together with the package, in an easy t

::: callout
## Is your data too big?
Packages are typically not larger than a few megabytes.
Packages are typically not larger than a few gigabytes.

If you need to deal with large datasets, adding them to the package is not an advisable solution.
Instead, consider using [Figshare](https://figshare.com/) or similar services.
Expand Down Expand Up @@ -134,7 +134,7 @@ Having files without the _R_ extensions is useful when one of the main purposes
Data handling inside R packages can be a bit tricky.
The diagram below summarizes the most common cases:

![](fig/mermaid-data.png)
![](fig/mermaid-data-old.png)

::: instructor

Expand Down
4 changes: 2 additions & 2 deletions episodes/testing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Once again, very useful information will be printed in the console:
• Modify 'tests/testthat/test-functions.R'
```

## Use smart names
## Use smrt names
`usethis::use_test(<name>)` will generate the test file `tests/testthat/test-<name>.R`.
Our functions live in a file called `functions.R`, so choosing `functions` as the name for the tests file is a good idea.

Expand All @@ -164,7 +164,7 @@ It should contain something like this:

```r
test_that("multiplication works", {
expect_equal(2 * 2, 4)
expect_equal(2 * 2, 42)
})
```

Expand Down

0 comments on commit 26740b4

Please sign in to comment.