Skip to content

Commit 6fbf794

Browse files
udpate readme doc
1 parent 34c9c0a commit 6fbf794

File tree

2 files changed

+53
-31
lines changed

2 files changed

+53
-31
lines changed

README.Rmd

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,32 @@ The following online docs are available:
3838

3939
## Installation
4040

41-
You can install the package from CRAN:
41+
You can install the package from CRAN.
4242

4343
```{r, eval = FALSE}
4444
install.packages("styler")
45+
46+
# if you want to benefit from caching, styler will ask you to install R.cache
47+
# if you don't have it already
48+
install.packages("R.cache")
49+
50+
# If you just installed R.cache, you need to authorise it to create a permanent
51+
# caching directory on your computer once.
52+
cache_info() # then type 'y' for Yes.
4553
```
4654

55+
56+
4757
Or get the development version from GitHub:
4858

4959
```{r, eval = FALSE}
5060
# install.packages("remotes")
5161
remotes::install_github("r-lib/styler")
5262
```
5363

64+
And set up caching the same way as for the CRAN version.
65+
66+
5467
## API
5568

5669
You can style a simple character vector of code with `style_text()`:
@@ -76,20 +89,6 @@ There are a few variants of `style_text()`:
7689
knitr::include_graphics("https://raw.githubusercontent.com/lorenzwalthert/some_raw_data/master/styler_0.1.gif")
7790
```
7891

79-
## Features
80-
81-
* style roxygen2 code examples.
82-
83-
* do not re-style [deliberate code
84-
alignment](https://styler.r-lib.org/articles/detect-alignment.html).
85-
86-
* [ignore some lines](https://styler.r-lib.org/reference/stylerignore.html) for
87-
styling (GitHub development version).
88-
89-
* [cache styled expressions](https://styler.r-lib.org/reference/caching.html)
90-
for speed (GitHub development version).
91-
92-
9392
## Configuration
9493

9594
You can decide on the level of invasiveness with the scope argument. You can
@@ -121,6 +120,19 @@ with the tidyverse style guide, see the [help file for `tidyverse_style](https:/
121120
quick overview or the
122121
[introductory vignette](https://styler.r-lib.org/articles/introducing_styler.html).
123122

123+
## Features
124+
125+
* style roxygen2 code examples.
126+
127+
* do not re-style [deliberate code
128+
alignment](https://styler.r-lib.org/articles/detect-alignment.html).
129+
130+
* [ignore some lines](https://styler.r-lib.org/dev/reference/stylerignore.html) for
131+
styling.
132+
133+
* [cache styled expressions](https://styler.r-lib.org/dev/reference/caching.html)
134+
for speed.
135+
124136

125137
## Adaption of styler
126138

README.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,18 @@ The following online docs are available:
2525

2626
## Installation
2727

28-
You can install the package from CRAN:
28+
You can install the package from CRAN.
2929

3030
``` r
3131
install.packages("styler")
32+
33+
# if you want to benefit from caching, styler will ask you to install R.cache
34+
# if you don't have it already
35+
install.packages("R.cache")
36+
37+
# If you just installed R.cache, you need to authorise it to create a permanent
38+
# caching directory on your computer once.
39+
cache_info() # then type 'y' for Yes.
3240
```
3341

3442
Or get the development version from GitHub:
@@ -38,6 +46,8 @@ Or get the development version from GitHub:
3846
remotes::install_github("r-lib/styler")
3947
```
4048

49+
And set up caching the same way as for the CRAN version.
50+
4151
## API
4252

4353
You can style a simple character vector of code with `style_text()`:
@@ -65,21 +75,6 @@ region.
6575

6676
<img src="https://raw.githubusercontent.com/lorenzwalthert/some_raw_data/master/styler_0.1.gif" width="650px" />
6777

68-
## Features
69-
70-
- style roxygen2 code examples.
71-
72-
- do not re-style [deliberate code
73-
alignment](https://styler.r-lib.org/articles/detect-alignment.html).
74-
75-
- [ignore some
76-
lines](https://styler.r-lib.org/reference/stylerignore.html) for
77-
styling (GitHub development version).
78-
79-
- [cache styled
80-
expressions](https://styler.r-lib.org/reference/caching.html) for
81-
speed (GitHub development version).
82-
8378
## Configuration
8479

8580
You can decide on the level of invasiveness with the scope argument. You
@@ -115,6 +110,21 @@ options with the tidyverse style guide, see the [help file for
115110
for a quick overview or the [introductory
116111
vignette](https://styler.r-lib.org/articles/introducing_styler.html).
117112

113+
## Features
114+
115+
- style roxygen2 code examples.
116+
117+
- do not re-style [deliberate code
118+
alignment](https://styler.r-lib.org/articles/detect-alignment.html).
119+
120+
- [ignore some
121+
lines](https://styler.r-lib.org/dev/reference/stylerignore.html) for
122+
styling.
123+
124+
- [cache styled
125+
expressions](https://styler.r-lib.org/dev/reference/caching.html)
126+
for speed.
127+
118128
## Adaption of styler
119129

120130
styler functionality is made available through other tools, most notably

0 commit comments

Comments
 (0)