Put this line in a file called test.R:
cat("command args are:\n"); print(commandArgs())
and then call it like this from the shell or Windows cmd line assuming
that Rscript is in your path:
Rscript test.R abc def
On Wed, Sep 9, 2009 at 2:37 PM, Abhishek Pratap wrote:
> Hi All
> Thanks for the p
Hi All
Thanks for the pointers. reading them I see that what I intend to can
certainly be done without much pain. However with my test scripts I am not
able to fully understand Rscript. The ?Rscript option doesnt print out a lot
to help me get the minute details.
Any good example/s or some info on
Abhishek Pratap wrote:
>
>
> 1. What's the best way to pass command line arguments to R scripts ?
>
>
As Gabor mentioned, the commandArgs function and the getopt package provide
some excellent starting points for this.
Abhishek Pratap wrote:
>
>
> 2. How to execute R scripts from comman
See ?commandArgs, the getopt package and ?Rscript
On Mon, Sep 7, 2009 at 1:47 PM, Abhishek Pratap wrote:
> Hi Guys
> I am Abhishek, primarily a bioinformatician. I have recently started using
> a lot of R thanks to some excellent packages available.
>
> Lately I have felt the need to batch proces
4 matches
Mail list logo