[shameless plug]

Jean lobry <[EMAIL PROTECTED]> writes:
> <<TimeConsumingCodeChunk1,eval=F>>=
> x <- rnorm(100)
> ...
> @
>
> I have \Sexpr{ifelse(exists("x"), length(x), "Ooops, I forgot
> to evaluate TimeConsumingCodeChunk1")} elements in vector x.

For the case of TimeConsumingCodeChunks, another solution is the
weaver package that caches the results of such chunks.  So you could
have:

<<TimeConsumingCodeChunk1, cache=TRUE>>=
x <- rnorm(100)
...
@

Then as long as the dependencies of the expressions in
TimeConsumingCodeChunk1 don't change, it won't be recomputed.

Best,

+ seth

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to