[R] Command Line Arguments

2010-07-01 Thread Bierbryer, Andrew
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.

Re: [R] Command Line Arguments

2010-07-01 Thread Steve Lianoglou
Hi, On Thu, Jul 1, 2010 at 2:49 PM, Bierbryer, Andrew abierbr...@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

Re: [R] Command Line Arguments

2010-07-01 Thread Dirk Eddelbuettel
On Thu, Jul 01, 2010 at 02:49:20PM -0400, Bierbryer, Andrew 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. Install the getopt package from CRAN

Re: [R] Command-line arguments and --interactive

2009-11-10 Thread Adam D. I. Kramer
On Tue, 10 Nov 2009, Duncan Murdoch wrote: --interactive tells R that there is a human producing the input stream, so it can ask questions and expect them to be answered. In your experiments with it, your input stream was the pipe holding the output of echo, and R got confused because that

[R] Command-line arguments and --interactive

2009-11-09 Thread Adam D. I. Kramer
Hello, I am interested in passing a command or two to R on the command line. The desired behavior is for R to run these commands first, and then begin an interactive session. For example: $ R -e 'foo - read.csv(/tmp/foo.csv)' ...which would launch R and execute that command, so when I

Re: [R] Command line arguments with source() - Windows OS

2008-11-18 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: Duncan Murdoch wrote: paramValue - 15 source(myRfile.R) The quotes are necessary, because source(myRfile.R) would go looking for a variable named myRfile.R, rather than using myRfile.R as the filename. why? i see this question has been ignored, but i

Re: [R] Command line arguments with source() - Windows OS

2008-11-18 Thread Gabor Grothendieck
On Tue, Nov 18, 2008 at 4:09 AM, Wacek Kusnierczyk [EMAIL PROTECTED] wrote: Wacek Kusnierczyk wrote: Duncan Murdoch wrote: paramValue - 15 source(myRfile.R) The quotes are necessary, because source(myRfile.R) would go looking for a variable named myRfile.R, rather than using myRfile.R as

[R] Command line arguments with source() - Windows OS

2008-11-17 Thread Brigid Mooney
Hi Everyone, I am pretty new to R and so far have mostly been using R interactively through the Windows console. I'm starting to write some scripts, and have been executing them using the source() command, i.e. source(myRfile.R). My questions is how can I pass command line arguments to R. My

Re: [R] Command line arguments with source() - Windows OS

2008-11-17 Thread Duncan Murdoch
Brigid Mooney wrote: Hi Everyone, I am pretty new to R and so far have mostly been using R interactively through the Windows console. I'm starting to write some scripts, and have been executing them using the source() command, i.e. source(myRfile.R). My questions is how can I pass command

Re: [R] Command line arguments with source() - Windows OS

2008-11-17 Thread Brigid Mooney
Is there a better command to use rather than source which would take command arguments? I ask because I currently have 6 parameters, will likely have additional paramaters later, and would like to be able to have default values for each, if I do not specify new values. Thanks so much! On Mon,

Re: [R] Command line arguments with source() - Windows OS

2008-11-17 Thread Duncan Murdoch
On 17/11/2008 9:14 AM, Brigid Mooney wrote: Is there a better command to use rather than source which would take command arguments? I ask because I currently have 6 parameters, will likely have additional paramaters later, and would like to be able to have default values for each, if I do

Re: [R] Command line arguments with source() - Windows OS

2008-11-17 Thread Gavin Simpson
On Mon, 2008-11-17 at 15:12 +0100, Wacek Kusnierczyk wrote: Duncan Murdoch wrote: paramValue - 15 source(myRfile.R) The quotes are necessary, because source(myRfile.R) would go looking for a variable named myRfile.R, rather than using myRfile.R as the filename. why? Because that

[R] R command line arguments

2008-01-04 Thread Bernd Jagla
Hi, I would like start R in BATCH mode and submit my own parameters. Or in other words, I would like to specify variables from the command line and execute a script using those. I have been looking at commandArgs and calling R from the command line under bash: R CMD BATCH --no-save --args

Re: [R] R command line arguments

2008-01-04 Thread Prof Brian Ripley
On Fri, 4 Jan 2008, Bernd Jagla wrote: Hi, I would like start R in BATCH mode and submit my own parameters. Or in other words, I would like to specify variables from the command line and execute a script using those. I have been looking at commandArgs and calling R from the command line