Description Usage Arguments Value Author(s) Examples
View source: R/buildChapterGraph.R
Build the dependency graph between chapter based on their extractCached
calls to each other.
1 | buildChapterGraph(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 |
Further arguments to pass to |
pattern |
Further arguments to pass to |
A directed graph object from the igraph package, where each node is a chapter and is connected to its dependencies by an edge.
Aaron Lun
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 | dir <- tempfile()
dir.create(dir)
tmp1 <- file.path(dir, "alpha.Rmd")
write(file=tmp1, "```{r, echo=FALSE, results='asis'}
rebook::chapterPreamble()
```
```{r}
rodan <- 1
```")
tmp2 <- file.path(dir, "bravo.Rmd")
write(file=tmp2, "```{r, echo=FALSE, results='asis'}
rebook::chapterPreamble()
```
```{r}
extractCached('alpha.Rmd')
```")
# Building the chapter graph:
g <- buildChapterGraph(dir)
plot(g)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.