[Rd] Running R scripts with interactive-style evaluation

Marc Aurel Kiefer marcaurelkiefer at gmx.de
Tue Feb 26 11:07:43 CET 2013


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



More information about the R-devel mailing list