caching - Cache expensive operations in R -


A very simple question:

I used to write and write a text editor using my Running R script is reproducible, as suggested by many members.

This approach is working very well for me, but I sometimes have to do expensive operations (like read.csv or <2 on the m-line database Reshape ) that I better cache in the R environment, whenever I run the script (which usually happens several times as I progress and test new lines code).

Is there a way to cache a script at a particular point, so every time I am just moving the incremental lines of code (as I am computing R)?

Thank you.

  ## Load files only from disk if ## already in a variable If you have not been read (! (Present ("mytable")) {mytable = read.csv (...)}  

Edit: Fix Ypo - Thanks Dirk.


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -