Description RJobBatch.bat - A Windows command prompt scripts RJobBatch - A Unix shell scripts Author(s)
Below are some useful scripts for command line processing.
Given that this script is in the PATH
(or in the current
directory), a job can be process by calling
RJobBatch --root=jobs-mandelbrot
from the command prompt.
The script can be found by
system.file("bin", "RJobBatch.bat", package="R.batch")
and
here is what it looks like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
echo off
rem ##################################################################
rem # RJobBatch
rem #
rem # Options: See help("main.JobBatch") for details.
rem #
rem # Windows script to run R one batch job utilizing R.batch.
rem #
rem # Author: Henrik Bengtsson, 2005-2012
rem ##################################################################
rem # Create R script to start JobBatch$main() in the R.batch package.
echo R.batch::JobBatch$main() > "%TEMP%\JobBatchMain.R"
rem # Start the R script and pass command line options
Rterm --vanilla --args %1 %2 %3 %4 %5 %6 %7 %8 %9 < "%TEMP%\JobBatchMain.R"
rem # Clean up
del "%TEMP%\JobBatchMain.R"
|
To add this automatically to the Windows search PATH, you can call the following in your Windows Command line startup script:
1 2 3 4 5 6 7 |
Given that this script is in the PATH
(or in the current
directory), and has execute rights, a job can be process by calling
RJobBatch --root=jobs-mandelbrot
from the command prompt.
The script can be found by
system.file("bin", "RJobBatch", package="R.batch")
and
here is what it looks like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#!/usr/bin/env sh
##################################################################
# RJobBatch
#
# Options: See help("main.JobBatch") for details.
#
# Shell script to run R one batch job utilizing R.batch.
#
# Author: Henrik Bengtsson, 2005-2012
##################################################################
# Create R script to start JobBatch$main() in the R.batch package.
echo 'R.batch::JobBatch$main()' > /tmp/JobBatchMain.R
# Start the R script and pass command line options
R --vanilla --args $* < /tmp/JobBatchMain.R
# Clean up
rm /tmp/JobBatchMain.R
|
To add this automatically to the Unix search PATH, you can call the following in your shell startup script:
1 2 3 4 5 6 |
Henrik Bengtsson (http://www.braju.com/R/)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.