File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -121,9 +121,11 @@ styler functionality is made available through other packages, most notably
121
121
permanently use ` style = TRUE ` without specifying it every time, you can add the
122
122
following line to your ` .Rprofile ` (via ` usethis::edit_r_profile() ` ):
123
123
` 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.
127
129
* pretty-printing of [ drake] ( https://github.com/ropensci/drake ) workflow data
128
130
frames with ` drake::drake_plan_source() ` .
129
131
Original file line number Diff line number Diff line change @@ -117,9 +117,12 @@ notably
117
117
printing. To permanently use ` style = TRUE ` without specifying it
118
118
every time, you can add the following line to your ` .Rprofile ` (via
119
119
` 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.
123
126
- pretty-printing of [ drake] ( https://github.com/ropensci/drake )
124
127
workflow data frames with ` drake::drake_plan_source() ` .
125
128
You can’t perform that action at this time.
0 commit comments