Re: [R] Declare BASH Array Using R System Function

2013-07-29 Thread Dario Strbenac
Thank you. This answers my question. I am using Linux, too. From: arun [smartpink...@yahoo.com] Sent: Monday, 29 July 2013 11:11 PM To: Dario Strbenac Cc: R help Subject: Re: [R] Declare BASH Array Using R System Function Hi, system("names=(X Y);

Re: [R] Declare BASH Array Using R System Function

2013-07-29 Thread arun
Cc: Sent: Sunday, July 28, 2013 10:00 PM Subject: [R] Declare BASH Array Using R System Function Hello, It is difficult searching for previous posts about this since the keywords are short and ambiguous, so I hope this is not a duplicate question. I can easily declare an array on the comma

Re: [R] Declare BASH Array Using R System Function

2013-07-29 Thread Prof Brian Ripley
On 29/07/2013 08:49, peter dalgaard wrote: On Jul 29, 2013, at 08:27 , Jeff Newmiller wrote: You seem confused. Not particularly, but he needs to be aware of _which_ shell R is executing in system() calls. These things work for me: system("foo=(bar baz); echo ${foo[1]}") baz Dario's iss

Re: [R] Declare BASH Array Using R System Function

2013-07-29 Thread peter dalgaard
On Jul 29, 2013, at 08:27 , Jeff Newmiller wrote: > You seem confused. Not particularly, but he needs to be aware of _which_ shell R is executing in system() calls. These things work for me: > system("foo=(bar baz); echo ${foo[1]}") baz Dario's issue is suggested by his error message >>> sys

Re: [R] Declare BASH Array Using R System Function

2013-07-28 Thread Jeff Newmiller
You seem confused. You are programming in R, and asking questions about bash on an R mailing list. You seem to need to learn the difference between environment variables and bash variables and how processes acquire and transfer environment variables, which is really an operating system concept a

[R] Declare BASH Array Using R System Function

2013-07-28 Thread Dario Strbenac
Hello, It is difficult searching for previous posts about this since the keywords are short and ambiguous, so I hope this is not a duplicate question. I can easily declare an array on the command line. $ names=(X Y) $ echo ${names[0]} X I am unable to do the same from within R. > system("name

Re: [R] system function question

2009-06-30 Thread Thomas Lumley
On Tue, 30 Jun 2009, Erin Hodgess wrote: Dear R People: Does the system function return a code, (maybe zero if ok, non-zero otherwise), please? Let's see a<-system("ls") str(a) int 0 a<-system("ls foo") ls: foo: No such file or directory str(a) int 256 Sure looks like it. And the h

Re: [R] system function question

2009-06-30 Thread Uwe Ligges
Erin Hodgess wrote: Dear R People: Does the system function return a code, (maybe zero if ok, non-zero otherwise), please? Dear Erin, it depends on its arguments and the OS. See the "value" section of ?system. Best, Uwe Thanks, Erin __

[R] system function question

2009-06-30 Thread Erin Hodgess
Dear R People: Does the system function return a code, (maybe zero if ok, non-zero otherwise), please? Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmail.com _

Re: [R] system() function

2008-04-24 Thread Prof Brian Ripley
You don't want shQuote - that makes it a single argument. Shells strip quotes, but system() does not use a shell on Windows -- you could use shell() not system(), but that would be overkill here. On Thu, 24 Apr 2008, Jeff Breiwick wrote: > Hi, > > I am trying to run the command: R CMD INSTALL -

[R] system() function

2008-04-24 Thread Jeff Breiwick
Hi, I am trying to run the command: R CMD INSTALL -l mypath mypackagename from within R (Windows XP) using system() and get the following error: ARGUMENT 'CMD INSTALL -l D:/R/JMB.LIBS jmb.test' __ignored__ Fatal error: you must specify '--save', '--no-save' or '--vanilla' My function contains t