[R] Passing filenames to the getopt package

EJ Nikelski nikelski at bic.mni.mcgill.ca
Fri Nov 20 00:09:58 CET 2009


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

> version
              _
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)


-- 
=================================
Jim Nikelski, Ph.D.
Postdoctoral Research Fellow
Bloomfield Centre for Research in Aging
Lady Davis Institute for Medical Research
Sir Mortimer B. Davis - Jewish General Hospital
McGill University




More information about the R-help mailing list