Hi all,


                I want to run a R code in the batch mode under UNIX system. Inside that code, I have a usage() function to give the hints regarding parameters. For example
usage = function()
{
    msg = "R CMD BATCH --save \"--args path=\\\"input_path\\\" file=\\\"input_file\\\" [seed=\\\"integer\\\" proportion=\\\"[0-1]\\\" outpath=\\\"output_path\\\" outfile=\\\"output_file\\\"]\" /S/hxd/utils/sampleRecords.r.txt";
   print(msg);
}

                When I run the code like

R CMD BATCH mycode.R, I want to output the usage info if the required parameters are not there. But how to output the usage info listed above to standard out rather than to a file?


Thanks.

HXD


	[[alternative HTML version deleted]]

