Skip to content

Commit 765cc25

Browse files
committed
docs(readme): move to newer style chunk options
1 parent dd0ebf5 commit 765cc25

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

README.Rmd

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ output: github_document
44

55
<!-- README.md is generated from README.Rmd. Please edit that file -->
66

7-
```{r, include = FALSE}
7+
```{r}
8+
#| include: false
89
knitr::opts_chunk$set(
910
collapse = TRUE,
1011
comment = "#>",
@@ -28,13 +29,15 @@ The goal of treasury is to provide a simple and modern interface to the [US trea
2829

2930
You can install the released version of **treasury** from [CRAN](https://CRAN.R-project.org) with:
3031

31-
```{r, eval = FALSE}
32+
```{r}
33+
#| eval: false
3234
install.packages("treasury")
3335
```
3436

3537
And the development version from [GitHub](https://github.com/) with:
3638

37-
```{r, eval = FALSE}
39+
```{r}
40+
#| eval: false
3841
# install.packages("pak")
3942
pak::pak("m-muecke/treasury")
4043
```
@@ -43,14 +46,21 @@ pak::pak("m-muecke/treasury")
4346

4447
treasury functions are prefixed with `tr_` and follow the naming convention of the XML feed.
4548

46-
```{r usage, message = FALSE, dpi = 300}
49+
```{r}
50+
#| label: usage
51+
#| message: false
52+
#| dpi: 300
4753
library(treasury)
4854
4955
yield_curve <- tr_yield_curve(2023)
5056
head(yield_curve)
5157
```
5258

53-
```{r plot, message = FALSE, echo = FALSE, dpi = 300}
59+
```{r}
60+
#| label: plot
61+
#| message: false
62+
#| echo: false
63+
#| dpi: 300
5464
library(ggplot2)
5565
5666
subset(yield_curve, maturity == "10 year") |>

0 commit comments

Comments
 (0)