-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathreadme-file.Rmd
More file actions
53 lines (40 loc) · 1.71 KB
/
readme-file.Rmd
File metadata and controls
53 lines (40 loc) · 1.71 KB
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
# The README file {#readme}
Bioconductor does not require `README` files in packages but they
are often useful for newcomers, especially when a package is developed
on <i class="fab fa-github"></i> GitHub or similar online platforms.
Bioconductor packages with a `README` file should clearly indicate
[_Bioconductor_][] installation instructions. See the example installation
instructions for `GenomicRanges`:
```r
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("GenomicRanges")
```
As a general rule, files that run <i class="fab fa-r-project"></i> code
(including `README.Rmd`) should not install packages, download system
dependencies, or applications. Installation instructions should be in
an `eval = FALSE` code chunk.
Developers should assume that all necessary dependencies, applications, and
packages are already installed on the user's system.
**Note**. Packages with external software dependencies should use the
`SystemRequirements` field in the `DESCRIPTION` file. See also
[the INSTALL file](#sysdep) for system dependencies requirements.
## Generating the README.md from the main vignette
Optionally, the `README.md` file can be generated from a package's vignette
via the `README.Rmd`. Using the child document feature in R Markdown, the
`README.Rmd` can render a vignette and output a `README.md` file.
Below is an example `README.Rmd` file that renders a vignette (named
`mainVignette.Rmd`).
```r
## ---
## output: github_document
## ---
##
## ```{r, child="../../vignettes/mainVignette.Rmd"}
## ```
```
The developer can then generate the `README.md` file by running
`rmarkdown::render` as:
```r
rmarkdown::render("inst/scripts/README.Rmd", output_dir = ".")
```