Skip to content
Prev 290723 / 398498 Next

Rgui maintains open file handles after Sweave error

On 04/04/2012 3:25 PM, Alexander Shenkin wrote:
I'd suggest a different workflow, in which you run a new copy of R every 
time you want to Sweave a document.  The files will be closed when that 
copy dies, and the results are less likely to be affected by the current 
state of your workspace (assuming you don't load an old workspace in the 
new copy).

For example, when I'm working on a Sweave document, I spend my time in 
my text editor, and get it to run R to process the file whenever I want 
to see what the output looks like.

The only real disadvantages to this approach that I can think of are 
that you need to figure out how to tell your text editor to run R (and 
that might be hard if you're using a poor editor like Windows Notebook, 
but is usually easy), and it will run a tiny bit slower because you need 
to start up R every time.

Duncan Murdoch