Skip to Content
R Programming By Example
book

R Programming By Example

by Omar Trejo Navarro
December 2017
Beginner to intermediate
470 pages
12h 29m
English
Packt Publishing
Content preview from R Programming By Example

Caching

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Efficient R Programming

Efficient R Programming

Colin Gillespie, Robin Lovelace
R Programming

R Programming

Jared P. Lander

Publisher Resources

ISBN: 9781788292542Supplemental Content