Description Usage Arguments Details Value Author(s) Examples
View source: R/scrapeDependencies.R
Scrape Rmarkdown reports in the book for all required dependencies.
1 | scrapeDependencies(dir, recursive = TRUE, pattern = "\\.Rmd$")
|
dir |
String containing the path to the directory containing Rmarkdown reports.
This is searched recursively for all files ending in |
recursive, pattern |
Further arguments to pass to |
The output of this should be added to the Suggests
field of the book's DESCRIPTION
,
to make it easier to simply install all of its required dependencies.
Note that dependencies in inline code sections are not detected, so these should be explicitly mentioned in a standalone code chunk to be captured.
Character vector of required packages.
Aaron Lun
1 2 3 4 5 6 7 8 9 10 11 | tmp <- tempfile(fileext=".Rmd")
write(file=tmp, "```{r}
A::a()
```
```{r}
library(B)
require(C)
```")
scrapeDependencies(tempdir())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.