knitr github , . .R , digest() :
hash = paste(valid_path(params$cache.path, label), digest::digest(content), sep = '_')
, , Rmd . fig.path , .
> content$fig.path
[1] "./test1a_files/figure-html/"
> content$fig.path
[1] "./test1b_files/figure-html/"
fig.path Rmd , . , Rmd, .
Test1.R
x <- Sys.time()
x
test1a.Rmd
```{r set_global_options, cache=FALSE}
library(knitr)
opts_knit$set(self.contained = FALSE)
opts_chunk$set(cache = TRUE, cache.path = "knitrcache/test-", fig.path = "knitrfig/test-")
read_chunk("test1.R")
```
```{r local_chunk_1, ref.label="source_chunk_1"}
```
test1b.Rmd
```{r set_global_options, cache=FALSE}
library(knitr)
opts_knit$set(self.contained = FALSE)
opts_chunk$set(cache = TRUE, cache.path = "knitrcache/test-", fig.path = "knitrfig/test-")
read_chunk("test1.R")
```
```{r local_chunk_1, ref.label="source_chunk_1"}
```