@@ -31,13 +31,13 @@ styler can be customized to format code according to other style guides too.
31
31
32
32
## Installation
33
33
34
- You can install the package from CRAN:
34
+ You can install the package from CRAN:
35
35
36
36
``` {r, eval = FALSE}
37
37
install.packages("styler")
38
38
```
39
39
40
- Or get the development version from GitHub:
40
+ Or get the development version from GitHub:
41
41
42
42
``` {r, eval = FALSE}
43
43
# install.packages("remotes")
@@ -106,10 +106,10 @@ style_text(
106
106
107
107
This was just the tip of the iceberg. Learn more about customization with the
108
108
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 ) .
113
113
114
114
## Adaption of styler
115
115
@@ -118,21 +118,28 @@ styler functionality is made available through other packages, most notably
118
118
* ` usethis::use_tidy_style() ` styles your project according to the tidyverse
119
119
style guide.
120
120
* ` 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() ` ):
123
123
` options(reprex.styler = TRUE) ` .
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.
129
+ * pretty-printing of [ drake] ( https://github.com/ropensci/drake ) workflow data
130
+ frames with ` drake::drake_plan_source() ` .
124
131
125
132
## Further resources
126
133
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/ )
134
+ * The official [ web documentation] ( http://styler.r-lib.org/ ) of styler,
135
+ containing various vignettes function documentation as well as a change-log.
136
+ * [ Blog
137
+ post] ( https://lorenzwalthert.netlify.com/posts/customizing-styler-the-quick-way/ )
131
138
about how you can customize styler without being an expert.
132
139
* 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
140
+ post] ( https://www.tidyverse.org/articles/2017/12/styler-1.0.0/ ) introducing the
141
+ functionality of styler.
142
+ * The wiki of [ Google Summer of Code
136
143
2017] ( https://github.com/rstats-gsoc/gsoc2017/wiki/Noninvasive-source-code-formatting )
137
144
or the [ pkgdown] ( https://r-lib.github.io/styler/ ) page contain information
138
145
related to the initial development phase during Google Summer of Code 2017.
0 commit comments