Form of rfile.input and rfile.sh
rfile.input
rplot("lung_case_three_256_profile")
rfile.sh
# shell script for making a plot
echo $0 $1
# remove the output file before you try to write it
#
/bin/rm $1/rfile.output
#
# Run R from C program getting input from a command file
# and write the output to another file
#
/usr/bin/R -q --no-save <$1/rfile.input >$1/rfile.output
NOTE: the input/output directories could be different.
Transcript
So, in this case, rfile.input contains the string. The shell file consists of echo $0 $1 - first argument; in this case, we remove the old output file. We run our program, in this case, we are passing the input file to R. We are putting the output in that and violà, we're all set. So it's convenient to be able to easily write scripts that are going to process the data that we want.