# [NTG-context] Difficulties using the r module

Matthew Routley matthew.routley at gmail.com
Wed Jul 5 17:20:13 CEST 2006

I can confirm that this works from the command line:

R CMD BATCH -q --save --restore rsample-r-1.tmp rsample-r-1.tmp.out

using the sample file from the r module. Running this command for each of the r
segments will produce the desired output. What I haven't determined is how to
modify the r module \runR command. Simply replacing the current \runR with

\def\runR {\executesystemcommand{texmfstart
--ifchanged=\Rfile\space --direct R CMD BATCH
-q --save --restore \Rfile\space \Rfile.out}}

was not successful. But I'm quite unfamilier with ConTeXt at this level.

As far as I can determine, the appropriate .out files are not being created,
which the log file correctly indicates. The .tmp files are successfully extracted
from the source file.

Thanks for the help with this.

Matt