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]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to