Skip to content

Commit 3d1c5e7

Browse files
committed
chore: regen docs
1 parent fe6ce95 commit 3d1c5e7

23 files changed

+450
-137
lines changed

README.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# pkgpurl
22

3+
[![R-CMD-check](https://github.com/rpkg-dev/pkgpurl/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rpkg-dev/pkgpurl/actions/workflows/R-CMD-check.yaml)
4+
35
<a href="https://cran.r-project.org/package=pkgpurl" class="pkgdown-release"><img src="https://r-pkg.org/badges/version/pkgpurl" alt="CRAN Status" /></a>
46

57
pkgpurl facilitates R package authoring using a literate programming approach. The main idea behind this is to write all of the R source code in R Markdown files (`Rmd/*.Rmd`), which allows the actual code to be freely mixed with explanatory and supplementary information in expressive Markdown format. The main object of pkgpurl is to provide a standardized way to compile the bare `.R` files from the prose-enhanced and thus more human-oriented `.Rmd` files.
@@ -21,29 +23,29 @@ It is especially powerful in combination with the [Visual R Markdown](https://rs
2123

2224
The relevant editor options which adjust the canonical Markdown generation can either be set
2325

24-
- [per `.Rmd` file](https://rstudio.github.io/visual-markdown-editing/#/markdown?id=writer-options), e.g.
26+
- [per `.Rmd` file](https://rstudio.github.io/visual-markdown-editing/#/markdown?id=writer-options), e.g.
2527

26-
``` rmd
27-
---
28-
editor_options:
29-
markdown:
30-
wrap: 160
31-
references:
32-
location: section
33-
canonical: true
34-
---
35-
```
28+
``` rmd
29+
---
30+
editor_options:
31+
markdown:
32+
wrap: 160
33+
references:
34+
location: section
35+
canonical: true
36+
---
37+
```
3638

37-
- or [per project](https://rstudio.github.io/visual-markdown-editing/#/options?id=project-options) in the usual `PACKAGE_NAME.Rproj` file, e.g.
39+
- or [per project](https://rstudio.github.io/visual-markdown-editing/#/options?id=project-options) in the usual `PACKAGE_NAME.Rproj` file, e.g.
3840

39-
``` ini
40-
MarkdownWrap: Column
41-
MarkdownWrapAtColumn: 160
42-
MarkdownReferences: Section
43-
MarkdownCanonical: Yes
44-
```
41+
``` ini
42+
MarkdownWrap: Column
43+
MarkdownWrapAtColumn: 160
44+
MarkdownReferences: Section
45+
MarkdownCanonical: Yes
46+
```
4547

46-
(I’d recommend to set them *per project*, so they apply to the whole package including any `.Rmd` vignettes.)
48+
(I’d recommend to set them *per project*, so they apply to the whole package including any `.Rmd` vignettes.)
4749

4850
</details>
4951
<details>
@@ -179,45 +181,43 @@ All the `.gen.R` suffixed R source code found under [`R/`](https://gitlab.com/rp
179181

180182
### Coding style
181183

182-
This package borrows a lot of the [Tidyverse](https://www.tidyverse.org/) design philosophies. The R code adheres to the principles specified in the [Tidyverse Design Guide](https://principles.tidyverse.org/) wherever possible and is formatted according to the [Tidyverse Style Guide](https://style.tidyverse.org/) (TSG) with the following exceptions:
184+
This package borrows a lot of the [Tidyverse](https://www.tidyverse.org/) design philosophies. The R code is guided by the [Tidy design principles](https://design.tidyverse.org/) and is formatted according to the [Tidyverse Style Guide](https://style.tidyverse.org/) (TSG) with the following exceptions:
183185

184-
- Line width is limited to **160 characters**, double the [limit proposed by the TSG](https://style.tidyverse.org/syntax.html#long-lines) (80 characters is ridiculously little given today’s high-resolution wide screen monitors).
186+
- Line width is limited to **160 characters**, double the [limit proposed by the TSG](https://style.tidyverse.org/syntax.html#long-lines) (80 characters is ridiculously little given today’s high-resolution wide screen monitors).
185187

186-
Furthermore, the preferred style for breaking long lines differs. Instead of wrapping directly after an expression’s opening bracket as [suggested by the TSG](https://style.tidyverse.org/syntax.html#long-lines), we prefer two fewer line breaks and indent subsequent lines within the expression by its opening bracket:
188+
Furthermore, the preferred style for breaking long lines differs. Instead of wrapping directly after an expression’s opening bracket as [suggested by the TSG](https://style.tidyverse.org/syntax.html#long-lines), we prefer two fewer line breaks and indent subsequent lines within the expression by its opening bracket:
187189

188-
``` r
189-
# TSG proposes this
190-
do_something_very_complicated(
191-
something = "that",
192-
requires = many,
193-
arguments = "some of which may be long"
194-
)
190+
``` r
191+
# TSG proposes this
192+
do_something_very_complicated(
193+
something = "that",
194+
requires = many,
195+
arguments = "some of which may be long"
196+
)
195197

196-
# we prefer this
197-
do_something_very_complicated(something = "that",
198-
requires = many,
199-
arguments = "some of which may be long")
200-
```
198+
# we prefer this
199+
do_something_very_complicated(something = "that",
200+
requires = many,
201+
arguments = "some of which may be long")
202+
```
201203

202-
This results in less vertical and more horizontal spread of the code and better readability in pipes.
204+
This results in less vertical and more horizontal spread of the code and better readability in pipes.
203205

204-
- Usage of [magrittrs compound assignment pipe-operator `%<>%`](https://magrittr.tidyverse.org/reference/compound.html) is desirable[^5].
206+
- Usage of [magrittr’s compound assignment pipe-operator `%<>%`](https://magrittr.tidyverse.org/reference/compound.html) is desirable[^5].
205207

206-
- Usage of [Rs right-hand assignment operator `->`](https://rdrr.io/r/base/assignOps.html) is not allowed[^6].
208+
- Usage of [R’s right-hand assignment operator `->`](https://rdrr.io/r/base/assignOps.html) is not allowed[^6].
207209

208-
- R source code is *not* split over several files as [suggested by the TSG](https://style.tidyverse.org/package-files.html) but instead is (as far as possible) kept in the single file [`Rmd/pkgpurl.Rmd`](https://gitlab.com/rpkg.dev/pkgpurl/-/tree/master/Rmd/pkgpurl.Rmd) which is well-structured thanks to its [Markdown support](#r-markdown-format).
210+
- R source code is *not* split over several files as [suggested by the TSG](https://style.tidyverse.org/package-files.html) but instead is (as far as possible) kept in the single file [`Rmd/pkgpurl.Rmd`](https://gitlab.com/rpkg.dev/pkgpurl/-/tree/master/Rmd/pkgpurl.Rmd) which is well-structured thanks to its [Markdown support](#r-markdown-format).
209211

210212
As far as possible, these deviations from the TSG plus some additional restrictions are formally specified in [`pkgpurl::default_linters`](https://pkgpurl.rpkg.dev/reference/default_linters), which is (by default) used in [`pkgpurl::lint_rmd()`](https://pkgpurl.rpkg.dev/reference/lint_rmd), which in turn is the recommended way to lint this package.
211213

212-
---
213-
214214
[^1]: Actually, you could write anything you like in any syntax outside of R code chunks as long as you don’t mind the file to be *knittable* (which it doesn’t have to be).
215215

216216
[^2]: It basically sends the (R) Markdown file on a “Pandoc round trip” on every file save.
217217

218218
[^3]: I personally recommend to use the shortcut <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> since it’s not occupied yet by any of the predefined [RStudio shortcuts](https://support.posit.co/hc/en-us/articles/200711853-Keyboard-Shortcuts).
219219

220-
[^4]: The very idea to leverage the R Markdown format to author R packages was originally proposed by Yihui Xie. See his excellent [blog post](https://yihui.name/rlp/) for his point of view on the advantages of literate programming techniques and some practical examples. Note that using `pkgpurl::purl_rmd()` is a less cumbersome alternative to the Makefile approach outlined by him.
220+
[^4]: The very idea to leverage the R Markdown format to author R packages was originally proposed by Yihui Xie. See his excellent [blog post](https://yihui.org/rlp/) for his point of view on the advantages of literate programming techniques and some practical examples. Note that using `pkgpurl::purl_rmd()` is a less cumbersome alternative to the Makefile approach outlined by him.
221221

222222
[^5]: The TSG [explicitly instructs to avoid this operator](https://style.tidyverse.org/pipes.html#assignment-2) – presumably because it’s relatively unknown and therefore might be confused with the forward pipe operator `%>%` when skimming code only briefly. I don’t consider this to be an actual issue since there aren’t many sensible usage patterns of `%>%` at the beginning of a pipe sequence inside a function – I can only think of creating side effects and relying on [R’s implicit return of the last evaluated expression](https://rdrr.io/r/base/function.html). Therefore – and because I really like the `%<>%` operator – it’s usage is welcome.
223223

docs/dev/LICENSE.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/dev/TODO.html

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/dev/authors.html

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/dev/deps/bootstrap-5.3.1/bootstrap.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/dev/index.html

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/dev/pkgdown.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
pandoc: 3.6.3
2-
pkgdown: 2.1.1
1+
pandoc: 3.7.0.1
2+
pkgdown: 2.1.2
33
pkgdown_sha: ~
44
articles: {}
5-
last_built: 2025-02-13T23:49Z
5+
last_built: 2025-05-19T21:10Z
66
urls:
77
reference: https://pkgpurl.rpkg.dev/reference
88
article: https://pkgpurl.rpkg.dev/articles

0 commit comments

Comments
 (0)