From marcaurelkiefer at gmx.de  Tue Feb 26 11:07:43 2013
From: marcaurelkiefer at gmx.de (Marc Aurel Kiefer)
Date: Tue, 26 Feb 2013 11:07:43 +0100
Subject: [Rd] Running R scripts with interactive-style evaluation
Message-ID: <68D9049B548E6342A7FA7EC383707BA3F6EB7348EC@w2008srv.haus.local>

Hi,

when running a R-script like this:

enable_magic()
compute_stuff()
disable_magic()

the whole script is parsed into a single expression and then evaluated, whereas when using the interactive shell after each line entered, a REPL loop happens.

Is there a way to make a script evaluation behave like this, because I need a single REPL iteration for every expression in the script.

It doesn't matter if it's a source()-like way or "R CMD BATCH" or even feeding stdin to R or whatever...

Regards,

Marc



[Rd] Running R scripts with interactive-style evaluation
Marc Aurel Kiefer