There was a posting on this in 2006, but the reply, if any, was not
posted.
I run the following at the command line:
Splus < myScript ARG
where myScript consists of the following:
for (arg in commandArgs()){ cat(arg, "\n") }
In any version of Splus, this leads to an error, e.g.:
=> /usr/local/splus8.0.4/cmd/Splus < myScript ARG
/usr/local/splus8.0.4/cmd/Splus: line 290: exec: ARG: not found
Does this not work in S-plus? The documenation says:
TITLE:
Function commandArgs
USAGE:
commandArgs()
ARGUMENTS:
DESCRIPTION:
returns the command-line invoking this S session, as a character
vector.The first element is the name by which the S executable
was
invoked; the remainingelements, if any, are the arguments on the
command line.
What am I missing?
Thanks,
Paul
THE INFORMATION CONTAINED IN THIS MESSAGE AND ANY ATTACHMENT MAY BE PRIVILEGED,
CONFIDENTIAL, PROPRIETARY OR OTHERWISE PROTECTED FROM DISCLOSURE. If the reader
of this message is not the intended recipient, you are hereby notified that any
dissemination, distribution, copying or use of this message and any attachment
is strictly prohibited. If you have received this message in error, please
notify us immediately by replying to the message and permanently delete it from
your computer and destroy any printout thereof.
|