dependson option does not work in knitr?
Posted
by
umair durrani
on Stack Overflow
See other posts from Stack Overflow
or by umair durrani
Published on 2014-08-21T21:39:53Z
Indexed on
2014/08/21
22:20 UTC
Read the original article
Hit count: 182
Data File
Name of the data file = toto.rmd
Contains following:
##1st
```{r clock, cache=TRUE}
x <- 600
x
```
##2nd
```{r, cache=TRUE, cache.path="toto_cache/", dependson="clock"}
x+5
```
Problem
The second chunk is not being updated. Previously x was 500, after updating it to 600, I get following after knit HTML
in RSTUDIO:
1st x <- 600 x ## [1] 600 2nd x+5 ## [1] 505
What am I missing here?
Session Info
> sessionInfo()
R version 3.0.3 (2014-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggplot2_0.9.3.1
loaded via a namespace (and not attached):
[1] colorspace_1.2-3 dichromat_2.0-0 digest_0.6.4 evaluate_0.5.5
[5] formatR_0.10 grid_3.0.3 gtable_0.1.2 htmltools_0.2.4
[9] knitr_1.6 labeling_0.2 MASS_7.3-29 munsell_0.4.2
[13] plyr_1.8.1 proto_0.3-10 RColorBrewer_1.0-5 Rcpp_0.11.0
[17] reshape2_1.2.2 rmarkdown_0.2.64 scales_0.2.3 stringr_0.6.2
[21] tools_3.0.3 yaml_2.1.10
>
© Stack Overflow or respective owner