Skip to content

Commit 27099b5

Browse files
authored
Merge pull request #9 from robitalec/fix/headings-raw
Fix/headings raw
2 parents 858146f + 9fd9c95 commit 27099b5

5 files changed

Lines changed: 19 additions & 19 deletions

File tree

exercises/functions/02-functions-development.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This process of editing two files might seem like extra work, but we recommend s
4545
Create a new function called `prepare_csv()` that reads in raw data and cleans it.
4646
:::
4747

48-
### `prepare_csv()`
48+
### prepare_csv()
4949

5050
Instruction: setup your function script and test script for your new function `prepare_csv()`.
5151

exercises/functions/03-functions-checks.qmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ is.numeric(DF$numbers)
9595

9696
## Filters
9797

98-
### Exercise: `filter_islands()`
98+
### Exercise: filter_islands()
9999

100100
First, write a function to filter a data.frame, providing the column name for the data to be filtered and the values to filter on. Use the example data that we prepared with our `prepare_csv` function.
101101

@@ -131,7 +131,7 @@ Pass the data.frame's column that you want to filter on to the plot function's f
131131
</details>
132132

133133
<details>
134-
<summary>Hints: `dplyr`</summary>
134+
<summary>Hints: dplyr</summary>
135135
<hr>
136136
This function has one step: taking an input data.frame and filtering across a single column.
137137

@@ -148,7 +148,7 @@ details here: <https://dplyr.tidyverse.org/articles/in-packages.html>
148148

149149
## Writing Checks
150150

151-
### Exercise: writing checks for `filter_islands()`
151+
### Exercise: writing checks for filter_islands()
152152
::: callout-note
153153
## Objective
154154
Write and test a complete function.
@@ -183,15 +183,15 @@ of metaprogramming. The Advanced R book has a detailed section on this concept.
183183

184184
### Bonus
185185

186-
#### Writing checks for `prepare_csv()`
186+
#### Writing checks for prepare_csv()
187187

188188
Instruction: add the following checks to your `prepare_csv()` function and
189189
test them in your test script (`tests/test_prepare_csv.R`).
190190

191191
- check if the path points to a file that exists
192192
- before returning the object, check that it is a data.frame
193193

194-
#### More informative errors with `stopifnot()`
194+
#### More informative errors with stopifnot()
195195

196196
Instruction: Write more informative errors for your `stopifnot()` checks using the following syntax: `stopifnot("error message" = logical_statement)`. Think about your user (either someone else or future you) - what would help them understand and resolve this error?
197197

exercises/targets/01-targets-setup.qmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Setup
1+
# Setting up targets
22

33
::: callout-tip
44
## Learning Goals
@@ -11,7 +11,7 @@ This set of exercises are centered around an approach to setting up your project
1111

1212
A {targets} pipeline is declared in the `_targets.R` file in the root of your project's directory. We'll also set up a central place to put all our of required packages that helps us keep track of them, and will later make it easier to set up {renv}.
1313

14-
## `_targets.R`
14+
## _targets.R
1515

1616
The `_targets.R` is where we declare our {targets} pipeline. It is an R file saved in the root directory of your project. The generalized structure of a `_targets.R` file is:
1717

@@ -37,7 +37,7 @@ c(
3737
)
3838
```
3939

40-
### Exercise: `_targets.R`
40+
### Exercise: _targets.R
4141

4242
::: callout-note
4343
## Objective
@@ -58,7 +58,7 @@ To declare which packages we need across all our functions, we have two main opt
5858
We prefer the second approach because it keeps our `_targets.R` tidier, and helps us setup {renv} package versioning and {conflicted} later. You might find your list of packages gets long, and this gets them out of our way. You can also use this script when you are exploring your results later - source the `packages.R` script and you will have all your required packages.
5959

6060

61-
### Exercise: `packages.R`
61+
### Exercise: packages.R
6262

6363
::: callout-note
6464
## Objective

exercises/targets/02-targets-usage.qmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Application
1+
# Application of targets
22

33
:::callout-tip
44
## Learning Goals
@@ -35,7 +35,7 @@ Related functions to `tar_visnetwork()` include:
3535
- `tar_network()` returns a network of edges and nodes representing the pipeline
3636

3737

38-
### Exercise: `tar_visnetwork()`
38+
### Exercise: tar_visnetwork()
3939

4040
::: callout-note
4141
## Objective
@@ -63,12 +63,12 @@ tar_visnetwork(starts_with('plot'))
6363
</details>
6464

6565

66-
## `tar_make()`
66+
## tar_make()
6767

6868
Run the {targets} pipeline with `tar_make()`. The pipeline is run in a new external R process, which means that `tar_make()` doesn't impact your current workspace and, more importantly, is not influenced by your current workspace. This totally isolated environment is how {targets} offers us a truly reproducible approach - only things defined in the `_targets.R` script (or sourced within it) are considered.
6969

7070

71-
### Exercise: `tar_make()`
71+
### Exercise: tar_make()
7272

7373
::: callout-note
7474
## Objective
@@ -91,11 +91,11 @@ tar_make()
9191
</details>
9292

9393

94-
## `tar_read()`, `tar_load()`
94+
## tar_read(), tar_load()
9595

9696
To look at results from the {targets} pipeline, use `tar_read()` and `tar_load()`. `tar_read()` reads targets without saving them as an object in your environment and `tar_load()` loads the object directly to your environment using the name of the target as the object.
9797

98-
### Exercise: `tar_read()`, `tar_load()`
98+
### Exercise: tar_read(), tar_load()
9999

100100
::: callout-note
101101
## Objective
@@ -122,11 +122,11 @@ tar_read(plotted)
122122
</details>
123123

124124

125-
## `tar_meta()`
125+
## tar_meta()
126126

127127
The metadata related to the {targets} pipeline is accessible using the function `tar_meta()`.
128128

129-
### Exercise: `tar_meta()`
129+
### Exercise: tar_meta()
130130

131131
::: callout-note
132132
## Objective

exercises/targets/03-targets-extensions.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Extensions
1+
# Targets extensions
22

33
Let's look at a {targets} pipeline that more closely resembles what a full project would be including figures, model, output, tables and a manuscript object. We'll start with a demo, so we can show off some of the power and extended features of {targets}, then we can work through it piece by piece to explain the details.
44

0 commit comments

Comments
 (0)