@@ -25,21 +25,21 @@ it is always possible to extend existing classes.
2525
2626A vignette demonstrates how to accomplish non-trivial tasks embodying the core
2727functionality of your package. There are two common types of vignettes.
28-
29- * (Recommended) An * R markdown* vignette is similar to a * Sweave* vignette, but uses
30- [ markdown] ( http://daringfireball.net/projects/markdown/ ) instead of $\LaTeX$
31- for structuring text sections and resulting in HTML output. The `r
32- BiocStyle::CRANpkg("knitr")` package can process most * Sweave* and all * R
28+
29+ * (Recommended) An * R markdown* vignette is similar to a * Sweave* vignette, but
30+ uses [ markdown] ( http://daringfireball.net/projects/markdown/ ) instead of
31+ $\LaTeX$ for structuring text sections and resulting in HTML output. The
32+ ` r BiocStyle::CRANpkg("knitr")` package can process most * Sweave* and all * R
3333 markdown* vignettes, producing pleasing output. Refer to [ Writing package
34- vignettes] [ CRAN vigs ] for technical details. See the `r
35- BiocStyle::Biocpkg("BiocStyle")` package for a convenient way to use common
34+ vignettes] [ CRAN vigs ] for technical details. See the
35+ ` r BiocStyle::Biocpkg("BiocStyle")` package for a convenient way to use common
3636 macros and a standard _ Bioconductor_ style vignette.
3737
3838* A * Sweave* vignette is an ` .Rnw ` file that contains $\LaTeX$ and chunks of <i
3939 class="fab fa-r-project"></i > code. The code chunk starts with a line
4040 ` <<>>= ` , and ends with ` @ ` . Each chunk is evaluated during ` R CMD build ` ,
4141 prior to $\LaTeX$ compilation to a PDF document.
42-
42+
4343A vignette provides reproducibility: the vignette produces the same results as
4444copying the corresponding commands into an <i class =" fab fa-r-project " ></i >
4545session. It is therefore ** essential** that the vignette embed executed <i
@@ -103,7 +103,7 @@ Add an "Installation" section that show to users how to download and load the
103103package from Bioconductor.
104104
105105These instructions and any installations instructions should be in an
106- ` eval=FALSE ` code chunk. No where in the code (<i class =" fab fa-r-project " ></i >
106+ ` eval=FALSE ` code chunk. Nowhere in the code (<i class =" fab fa-r-project " ></i >
107107code, man pages, vignettes, Rmd files) should someone try to install or download
108108system dependencies, applications, packages, etc. Developers can provide
109109instructions to follow in unevaluated code chunks, and should assume all
@@ -173,20 +173,34 @@ If this option is used it will also be preferable to use `donttest` instead of
173173` dontrun ` ; ` donttest ` requires valid <i class =" fab fa-r-project " ></i > code while
174174` dontrun ` does not.
175175
176- ## The ` inst/script / ` directory {#doc-inst-script }
176+ ## The ` inst/scripts / ` directory {#doc-inst-scripts }
177177
178178The scripts in this directory can vary.
179179
180180Most importantly if data was included in the ` inst/extdata/ ` directory, a
181- related script must be present in this directory documenting very clearly how
182- the data was generated and source information.
181+ related script must be present in this directory clearly documenting how the
182+ data was obtained and prepared.
183+
184+ It should include any source URLs and information regarding filtering or
185+ pre-processing.
186+
187+ It can be executable code, sudo code, or even a text description.
188+
189+ Users should be able to download and roughly reproduce the data file or object
190+ in ` inst/extdata/ ` .
191+
192+ ## The ` data-raw ` directory {#doc-data-raw}
183193
184- It should include source URLs and any key information regarding filtering or processing.
194+ Although the preferred location is ` inst/scripts ` , the ` data-raw ` directory may
195+ be used instead to store scripts that generated data files or objects. Note
196+ that one potential disadvantage of using the ` data-raw ` directory is that the
197+ scripts are not included in the package installation folder (for users to
198+ inspect).
185199
186- It can be executable code, sudo code, or a text description.
200+ For more details, see the ` Data ` chapter in Hadley Wickham's
201+ [ R Packages] [ r-pkgs ] .
187202
188- Users should be able to download and be able to roughly reproduce the file or
189- object that is present as data.
203+ [ r-pkgs ] : https://r-pkgs.org/data.html
190204
191205## Other {#other-doc}
192206
0 commit comments