Skip to content

Commit 09f200f

Browse files
authored
suggest R Markdown hunks approach for README and vignette (#161)
1 parent 909034b commit 09f200f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

appendix.Rmd

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## dev
66

7+
* 2019-06-17, add suggestion to use R Markdown hunks approach when the README and the vignette share content.
8+
79
* 2019-06-17, add mention of central building of documentation websites.
810

911
* 019-06-13, add explanations of CRAN checks.

pkg_building.Rmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ can be found at *link*".
136136

137137
* The package should contain top-level documentation for `?foobar`, (or ``?`foobar-package` `` if there is a naming conflict). Optionally, you can use both `?foobar` and ``?`foobar-package` `` for the package level manual file, using `@aliases` roxygen tag. `usethis::use_package_doc()` adds the template for the top-level documentation.
138138

139-
* The package should contain at least one vignette providing a substantial coverage of package functions, illustrating realistic use cases and how functions are intended to interact. If the package is small, the vignette and the README can have the same content.
139+
* The package should contain at least one vignette providing a substantial coverage of package functions, illustrating realistic use cases and how functions are intended to interact. If the package is small, the vignette and the README may have very similar content. In that case, instead of maintaining these separately, we suggest an approach such as [using R Markdown hunks, relying on knitr use of child documents so you can store the re-used parts in a folder in vignettes/, and call them from both the README and the vignette](https://www.garrickadenbuie.com/blog/dry-vignette-and-readme/).
140140

141141
* As is the case for a README, top-level documentation or vignettes may be the first point of entry for users. If your package connects to a data source or online service, or wraps other software, it should provide enough information for users to understand the nature of the data, service, or software, and provide links to other relevant data and documentation. For instance, a vignette intro or documentation should not merely read, "Provides access to GooberDB," but also include, "..., an online repository of Goober sightings in South America. More information about GooberDB, and documentation of database structure and metadata can be found at *link*". Any vignette should outline prerequisite knowledge to be able to understand the vignette upfront.
142142

0 commit comments

Comments
 (0)