Happy New Year to all!

I want to run a script from a directory on a central server on different 
machines, linux and windows. To determine which machine is calling the script 
I want to pass an argument with the call (e.g. for choosing the display 
device, for writing path names etc.)
I tried the following:
R CMD BATCH --args gui=4 /home/script.R script.out (linux)
resp. Rcmd BATCH --args gui=1 Z:/script.R script.out (windows)

The script started with
args(commandArgs(TRUE)) # thanks to James Forester for his R-concerning blog

script.out says: Error in commandArgs(TRUE): unused argument(s) (linux)
windows says: input file --args cannot be opened

Something must be going wrong (but different things on Win and Linux) (but 
what?)
Richard

-- 
Richard Müller - Am Spring 9 - D-58802 Balve-Eisborn
www.oeko-sorpe.de

______________________________________________
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