Skip to content

Passing filenames to the getopt package

1 message · EJ Nikelski

#
Hi all,

    I've finally started to use Rscript for my statistical scripting
needs, and find I'm being blocked by what must be a very simple
problem.  Specifically, the command lines for my scripts usually
contain: (1) the script name, (2) one or more options and their
arguments, and finally, (3) one or more filenames to be processed.
While the "getopt" package seems to provide me with excellent option
reading functionality, it however, also wants to read the trailing
filenames as options as well -- and then fails.  Am I missing
something obvious?

Thanks,

-Jim
_
platform       i386-apple-darwin8.11.1
arch           i386
os             darwin8.11.1
system         i386, darwin8.11.1
status
major          2
minor          9.2
year           2009
month          08
day            24
svn rev        49384
language       R
version.string R version 2.9.2 (2009-08-24)