Skip to content

Commit 1d9c17c

Browse files
committed
Update R Markdown in tests
1 parent 993601c commit 1d9c17c

File tree

9 files changed

+38
-10
lines changed

9 files changed

+38
-10
lines changed

tests/manual/setup.Rmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ Test script to manually validate creating a new rdev package or R analysis packa
1818

1919
Load devtools. Load package manually using `devtools::load_all(".")` (command-shift-l).
2020

21-
```{r setup, message = FALSE, warning = FALSE}
21+
```{r}
22+
#| label: setup
23+
#| message: false
24+
#| warning: false
2225
# devtools already loaded
2326
htmltools::tagList(
2427
xaringanExtra::use_clipboard(

tests/testthat/test-to_document/document.Rmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ Valid Document from 'Analysis Notebook' template
1515

1616
- [ ] Questions/TODO list here
1717

18-
```{r setup, message = FALSE, warning = FALSE}
18+
```{r}
19+
#| label: setup
20+
#| message: false
21+
#| warning: false
1922
# setup code here
2023
```
2124

tests/testthat/test-to_document/extra-spaces.Rmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ Valid Notebook from 'Analysis Notebook' template with extra spaces before the de
1919

2020
- [ ] Questions/TODO list here
2121

22-
```{r setup, message = FALSE, warning = FALSE}
22+
```{r}
23+
#| label: setup
24+
#| message: false
25+
#| warning: false
2326
# setup code here
2427
```
2528

tests/testthat/test-to_document/minimal-document.Rmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ Valid Notebook with minimal `html_notebook` output
1010

1111
- [ ] Questions/TODO list here
1212

13-
```{r setup, message = FALSE, warning = FALSE}
13+
```{r}
14+
#| label: setup
15+
#| message: false
16+
#| warning: false
1417
# setup code here
1518
```
1619

tests/testthat/test-to_document/minimal.Rmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ Valid Notebook with minimal `html_notebook` output
1010

1111
- [ ] Questions/TODO list here
1212

13-
```{r setup, message = FALSE, warning = FALSE}
13+
```{r}
14+
#| label: setup
15+
#| message: false
16+
#| warning: false
1417
# setup code here
1518
```
1619

tests/testthat/test-to_document/multiple.Rmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ Valid Notebook from 'Analysis Notebook' template with multiple output types.
2626

2727
- [ ] Questions/TODO list here
2828

29-
```{r setup, message = FALSE, warning = FALSE}
29+
```{r}
30+
#| label: setup
31+
#| message: false
32+
#| warning: false
3033
# setup code here
3134
```
3235

tests/testthat/test-to_document/no-output.Rmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ Invalid Notebook without `output` in front matter.
99

1010
- [ ] Questions/TODO list here
1111

12-
```{r setup, message = FALSE, warning = FALSE}
12+
```{r}
13+
#| label: setup
14+
#| message: false
15+
#| warning: false
1316
# setup code here
1417
```
1518

tests/testthat/test-to_document/valid.Rmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ Valid Notebook from 'Analysis Notebook' template.
1717

1818
- [ ] Questions/TODO list here
1919

20-
```{r setup, message = FALSE, warning = FALSE}
20+
```{r}
21+
#| label: setup
22+
#| message: false
23+
#| warning: false
2124
# setup code here
2225
```
2326

tests/testthat/test-to_document/with-code.Rmd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ Valid Notebook from 'Analysis Notebook' template that creates a cars plot.
1717

1818
- [ ] Questions/TODO list here
1919

20-
```{r setup, message = FALSE, warning = FALSE}
20+
```{r}
21+
#| label: setup
22+
#| message: false
23+
#| warning: false
2124
# setup code here
2225
```
2326

@@ -35,7 +38,8 @@ Graph and model data to ask and answer questions.
3538

3639
Plot the speed and stopping distances from the `cars` dataset (circa 1920).
3740

38-
```{r cars}
41+
```{r}
42+
#| label: cars
3943
plot(cars)
4044
```
4145

0 commit comments

Comments
 (0)