Skip to content

Commit e43ec5b

Browse files
more references
1 parent b3203cb commit e43ec5b

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

README.Rmd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ styler functionality is made available through other packages, most notably
121121
permanently use `style = TRUE` without specifying it every time, you can add the
122122
following line to your `.Rprofile` (via `usethis::edit_r_profile()`):
123123
`options(reprex.styler = TRUE)`.
124-
* in [`knitr`](https://github.com/yihui/knitr) via the code chunk option `style =
125-
"styler"` to style code in the rendered output without touching the source
126-
(requires knitr >= 1.20.15).
124+
* you can pretty-print your R code in RMarkdown reports without having styler
125+
modifying the source. This feature is implemented as a code chunk option in
126+
knitr. use `tidy = "styler"` in the header of a code chunks (e.g. ` ```{r
127+
name-of-the-chunk, tidy = "styler"}`), or `knitr::opts_chunk$set(tidy =
128+
"styler")` at the top of your RMarkdown script.
127129
* pretty-printing of [drake](https://github.com/ropensci/drake) workflow data
128130
frames with `drake::drake_plan_source()`.
129131

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,12 @@ notably
117117
printing. To permanently use `style = TRUE` without specifying it
118118
every time, you can add the following line to your `.Rprofile` (via
119119
`usethis::edit_r_profile()`): `options(reprex.styler = TRUE)`.
120-
- in [`knitr`](https://github.com/yihui/knitr) via the code chunk
121-
option `style = "styler"` to style code in the rendered output
122-
without touching the source (requires knitr \>= 1.20.15).
120+
- you can pretty-print your R code in RMarkdown reports without having
121+
styler modifying the source. This feature is implemented as a code
122+
chunk option in knitr. use `tidy = "styler"` in the header of a code
123+
chunks (e.g. ` ```{r name-of-the-chunk, tidy = "styler"}`), or
124+
`knitr::opts_chunk$set(tidy = "styler")` at the top of your
125+
RMarkdown script.
123126
- pretty-printing of [drake](https://github.com/ropensci/drake)
124127
workflow data frames with `drake::drake_plan_source()`.
125128

0 commit comments

Comments
 (0)