December 2017
Beginner to intermediate
470 pages
12h 29m
English
As we mentioned earlier, knitr is not so useful if you are writing a very long document or one involving complex computations. However, you may avoid some of these problems by using caches. The basic issue is that if you have a long document or one involving lengthy computations, then every time you want to refresh your document, you need to recompile it, meaning that you need to rerun all the computations. This may not be a problem if your document is efficient or small. However, it can be inefficient to sit there and wait for every computation to run every single time. Chunk caching is one way to avoid those lengthy computations. By setting the cache = TRUE chunk option, knitr runs the chunk once and stores the output in your working ...