Skip to content

Commit b3203cb

Browse files
more references
1 parent 34f82cd commit b3203cb

File tree

2 files changed

+26
-16
lines changed

2 files changed

+26
-16
lines changed

README.Rmd

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ styler can be customized to format code according to other style guides too.
3131

3232
## Installation
3333

34-
You can install the package from CRAN:
34+
You can install the package from CRAN:
3535

3636
```{r, eval = FALSE}
3737
install.packages("styler")
3838
```
3939

40-
Or get the development version from GitHub:
40+
Or get the development version from GitHub:
4141

4242
```{r, eval = FALSE}
4343
# install.packages("remotes")
@@ -106,10 +106,10 @@ style_text(
106106

107107
This was just the tip of the iceberg. Learn more about customization with the
108108
tidyverse style guide in in this
109-
[vignette](http://styler.r-lib.org/articles/introducing_styler.html). If this
110-
is not flexible enough for you, you can implement your own style guide, as
111-
explained in the corresponding
112-
[vignette](http://styler.r-lib.org/articles/customizing_styler.html)
109+
[vignette](http://styler.r-lib.org/articles/introducing_styler.html). If this is
110+
not flexible enough for you, you can implement your own style guide, as
111+
explained in the corresponding
112+
[vignette](http://styler.r-lib.org/articles/customizing_styler.html).
113113

114114
## Adaption of styler
115115

@@ -118,21 +118,26 @@ styler functionality is made available through other packages, most notably
118118
* `usethis::use_tidy_style()` styles your project according to the tidyverse
119119
style guide.
120120
* `reprex::reprex(style = TRUE)` to prettify reprex code before printing. To
121-
permanently use `style = TRUE` without specifying it every time, you can
122-
add the following line to your `.Rprofile` (via `usethis::edit_r_profile()`):
121+
permanently use `style = TRUE` without specifying it every time, you can add the
122+
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).
127+
* pretty-printing of [drake](https://github.com/ropensci/drake) workflow data
128+
frames with `drake::drake_plan_source()`.
124129

125130
## Further resources
126131

127-
* The official [web documentation](http://styler.r-lib.org/) of styler,
128-
containing various vignettes function documentation as well as a change-log.
129-
* [Blog
130-
post](https://lorenzwalthert.netlify.com/posts/customizing-styler-the-quick-way/)
132+
* The official [web documentation](http://styler.r-lib.org/) of styler,
133+
containing various vignettes function documentation as well as a change-log.
134+
* [Blog
135+
post](https://lorenzwalthert.netlify.com/posts/customizing-styler-the-quick-way/)
131136
about how you can customize styler without being an expert.
132137
* A [tidyverse.org blog
133-
post](https://www.tidyverse.org/articles/2017/12/styler-1.0.0/) introducing
134-
the functionality of styler.
135-
* The wiki of [Google Summer of Code
138+
post](https://www.tidyverse.org/articles/2017/12/styler-1.0.0/) introducing the
139+
functionality of styler.
140+
* The wiki of [Google Summer of Code
136141
2017](https://github.com/rstats-gsoc/gsoc2017/wiki/Noninvasive-source-code-formatting)
137142
or the [pkgdown](https://r-lib.github.io/styler/) page contain information
138143
related to the initial development phase during Google Summer of Code 2017.

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ with the tidyverse style guide in in this
104104
[vignette](http://styler.r-lib.org/articles/introducing_styler.html). If
105105
this is not flexible enough for you, you can implement your own style
106106
guide, as explained in the corresponding
107-
[vignette](http://styler.r-lib.org/articles/customizing_styler.html)
107+
[vignette](http://styler.r-lib.org/articles/customizing_styler.html).
108108

109109
## Adaption of styler
110110

@@ -117,6 +117,11 @@ 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).
123+
- pretty-printing of [drake](https://github.com/ropensci/drake)
124+
workflow data frames with `drake::drake_plan_source()`.
120125

121126
## Further resources
122127

0 commit comments

Comments
 (0)