[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] asynchronous code evaluation

From: Charles Berry
Subject: Re: [O] asynchronous code evaluation
Date: Wed, 4 Sep 2013 16:08:25 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Johannes Rainer <johannes.rainer <at> gmail.com> writes:

> hi all!
> I have some pretty calculation intense R code in a code block and when I 
> execute the code (C-c C-c) my emacs freezes and waits for the code to 
> finish. Is there a way to evaluate the code asynchronously, so that I 
> could edit the file (obviously not the code block itself) while the code 
> is being evaluated?
> thanks, jo

Try this:

C-c ' in the R src block. 

Then use C-c C-c (ess-eval-region-or-function-or-paragraph-and-step) to 
execute the long running code from the ESS edit buffer.

You may need to select the region if there are several paragraphs, or 
delete any blank lines.


Another alternative is to use ravel. 


Create a knitr or Sweave doc from the org doc or a suitable subtree of the 
computationally intensive parts. 

Then you can knit() the doc from the R session and switch back to
the buffer you want to edit. Also, you might want to turn on caching in the
knitr doc to enable a quick restart when you log in again.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]