yihui/knitr — Issue #125: opts_knit$set with cache gives bogus warning
Author: dmenne
Created: 2012-02-05 18:19:37+00:00
State: open

When I use
opts_knit$set(eval.opts = c('eval', 'echo', 'fig.height'))
myheight=10

I can use
<>=
plot(rnorm(10))
@

in the same child document (note as reported separately, probably a feature: fails with child documents.)

When I have cache=TRUE, everything is ok on the (non-cached) first run. However, on the second run, I get a warning

Warning: 'mode(height)' differs between new and previous
==> NOT changing 'height'

but because of the caching used, the image is ok anyways. So this is only a false alarm.

R version 2.14.1 (2011-12-22)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252

attached base packages:
[1] splines tools stats graphics grDevices utils datasets methods
[9] base

other attached packages:
[1] Dmisc_1.4.0 Hmisc_3.9-1 survival_2.36-10 tikzDevice_0.6.2
[5] cacheSweave_0.6 formatR_0.3-4 optparse_0.9.4 getopt_1.17
[9] highlight_0.3.1 parser_0.0-14 Rcpp_0.9.9 codetools_0.2-8
[13] stashR_0.3-4 filehash_2.2

loaded via a namespace (and not attached):
[1] cluster_1.14.1 digest_0.5.1 evaluate_0.4.1 grid_2.14.1 knitr_0.2.2
[6] lattice_0.20-0 pgfSweave_1.2.1 plyr_1.7.1 stringr_0.6