-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
86 lines (57 loc) · 2.86 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
```
# docreview 📝🔎
<!-- badges: start -->
[](https://cran.r-project.org/package=docreview)
[](https://lifecycle.r-lib.org/articles/stages.html)
[](https://github.com/thisisnic/docreview/actions?query=workflow%3AR-CMD-check)
[](https://app.codecov.io/gh/thisisnic/docreview)
<!-- badges: end -->
_An opinionated package for enhancing your R package documentation._
When writing R packages, high quality documentation can make for a great experience for your users 📦📝🌟🙂
You can use __docreview__ to check that your R package documentation passes a number of checks relating to function documentation and vignette quality. ✅ ✅ ❌
Note that this package is in *very* early stages of its development and features are not yet stable, and so the package may undergo significant changes. If you plan to use it as part of a workflow, please be aware that new releases are very likely to introduce breaking changes to the config files, and so use the package (and any updates) with caution.
## Installation
You can install docreview from CRAN.
```{r, eval=FALSE}
install.packages("docreview")
```
If you'd like access to the most up-to-date features, you can install the development version from GitHhub. 👩🏽🔧
```{r, eval=FALSE}
remotes::install_github("thisisnic/docreview")
```
## Usage
```{r, include = FALSE}
devtools::load_all()
```
```{r, eval = FALSE}
library(docreview)
pkg_path <- system.file("testpkg", package = "docreview")
# ensure you have rebuilt your vignettes if you want to run checks requiring the HTML files
tools::buildVignettes(dir = pkg_path, quiet = TRUE)
# Review docs in the package
package_review(path = pkg_path)
```
```{r, include = FALSE}
devtools::load_all()
pkg_path <- system.file("testpkg", package = "docreview")
package_review(path = pkg_path)
```
See [the vignette](https://thisisnic.github.io/docreview/articles/docreview.html) for more detailed usage guides.
## Current default review checks
CRAN version:
🎯 Vignettes have no more than 2000 words (warn) or 3000 words (fail)
🎯 Vignettes have no fewer than 100 words (warn) or 0 words (fail)
🎯 Vignettes have a Flesch-Kincaid readability score lower than 50 (warn) or 30 (fail)
🎯 All exported functions have examples in their documentation
Additional checks in the dev version:
🎯 All images in vignettes contain alt text