[R] Command Line Arguments

Steve Lianoglou mailinglist.honeypot at gmail.com
Thu Jul 1 20:59:46 CEST 2010


Hi,

On Thu, Jul 1, 2010 at 2:49 PM, Bierbryer, Andrew
<abierbryer at klsdiversified.com> wrote:
> Do you know to pass named command line arguments into an R script?
>
> I have used littler and argv to pass a vector of arguments, but this
> requires you to maintain the order of the arguments.
>
> I'm wondering if there is a way to do this when you do not know the
> order of the arguments being passed in.

Perhaps you'd find the optparse package helpful:

https://r-forge.r-project.org/projects/optparse/

--
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the R-help mailing list