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 C

Re: [R] Command Line Arguments

2010-07-01 Thread Steve Lianoglou
Hi, On Thu, Jul 1, 2010 at 2:49 PM, 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. > > I'm wondering if there is a way to

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 p

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

2009-11-10 Thread Duncan Murdoch
Adam D. I. Kramer wrote: 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 execu

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 t

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

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. >

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 no

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, No

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

2008-11-17 Thread Wacek Kusnierczyk
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? vQ __ R-help@r-project.org

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 line