Re: [R] system command to a specific shell (bash)

2012-04-17 Thread Uwe Ligges
On 17.04.2012 01:26, MacQueen, Don wrote: I believe that shell() was superceded by system(), quite a long time ago. Not really, under Windows, shell() will start a shell while system() won't. Uwe Ligges However, I get this: foo- system('printenv',intern=TRUE) ; foo[grepl('SHELL',foo)]

[R] system command to a specific shell (bash)

2012-04-16 Thread Justin Haynes
I need to run a bash command, but when you call system() the default shell is sh (see my sessionInfo below). I found the shell command ( http://www.stat.ucl.ac.be/ISdidactique/Rhelp/library/base/html/shell.html) but it seems to be disappeared in current versions of R? I am running all this from R

Re: [R] system command to a specific shell (bash)

2012-04-16 Thread Jeff Newmiller
You could make a hash bang bash script that sources the file and then proceeds to do whatever you want. Bourne shell should have no problems invoking another shell. --- Jeff NewmillerThe .

Re: [R] system command to a specific shell (bash)

2012-04-16 Thread Justin Haynes
Thanks Jeff, but I'm running a python program that expects certain functionality that bash provides and sh doesn't... I can just stop using github checkouts and use system packages though and fix this. I'm mostly wondering where the shell command went in base R... it sounds like it completely

Re: [R] system command to a specific shell (bash)

2012-04-16 Thread MacQueen, Don
I believe that shell() was superceded by system(), quite a long time ago. However, I get this: foo - system('printenv',intern=TRUE) ; foo[grepl('SHELL',foo)] [1] SHELL=/bin/tcsh XTERM_SHELL=/bin/tcsh And tcsh is my login shell, i.e., as specified for my account at the OS level. To me,