I had this piece of code that was working several months ago but not anymore now. I changed the directory but the data is the same.
My issue is that the cache is never saved. I tried different methods: either dep_prev(), dep_auto() + autodep or dependson and different debugging approaches but nothing seems to work. The computation is still performed at each run and there is nothing in the cache folder. Another issue that appeared is that my figures don´t appear anymore into my pdf file. They pop out when the R code is executed but they are not saved (the problem is probably linked to the cache problem).
In my code I setup everything in the first chunk then I don´t add any options in the following chunks. Here is the code of my first chunk:
<<setupKnitr, include=FALSE, cache=FALSE>>=
library(knitr)
## set global chunk options
opts_chunk$set(fig.path='figures_knitR/', cache.path='cache/', fig.align='center', fig.show='asis', par=TRUE, tidy = TRUE, cache = TRUE, autodep=T, fig.keep='all', dev='tikz', echo = TRUE, eval = TRUE)
opts_knit$set(output.dir = getwd())
dep_auto()
options(formatR.arrow=TRUE, width=68, digits=4)
options(tikzDefaultEngine = 'pdftex')
@
Also I found something strange when looking at the dep_auto function: it uses the functions valid_path and parse_objects that are not known in my R session which might be the cause of the problem. And I cannot find the package from which they originates.
here is my sessionInfo
> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu precise (12.04.5 LTS)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] jerdev_0.1 knitr_1.10.5
loaded via a namespace (and not attached):
[1] tools_3.2.0 tcltk_3.2.0
Thank you very much for your help!