[ESS] (no subject)

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Mon Dec 17 22:23:00 CET 2012

> response on stackoverflow (link above).
> My usage case is that I'm not iterative but using this to create a set of
> charts (output to separate files) to help me analyze some particular
> parameter settings in the R file.  I use RScript to automate the output of
> this.  I can use just interactive R and shut it down every time after I
> evaluate the whole file/buffer, but I thought it might be nicer to just do
> via RScript.  Once I set up the code, I'm not really interacting
> iteratively with the code except to change a few key parameters I want to
> alter.  I view the output in a web browser via a nice wrapper.
> Does that get to the question of my use case adequately?

Hi Matt,

I think I know what you mean.   I tend to also sometimes just want to
run stuff in batch; I normally use the approach of doing:

$ R CMD BATCH script.R

from the unix command line; stdout is sent to script.Rout, and any plots
that would normally appear on the screen (on linux, but not mac!) go
into a file called Rplots.pdf.  If you have script.Rout open in a
buffer, you can always use "auto-revert-mode" to keep the buffer in sync
with the file.

I don't have an emacs binding for this, as I've never really felt the
need for it.  The closest I've got is to normally put the "R CMD BATCH"
call into a makefile, and then from Emacs I have a key to run "make".

Or are you after a simple function that simply runs "Rscript" on the
current .R buffer, with stdout going to a suitable file or buffer?


More information about the ESS-help mailing list