Re: [R] Returning Variables in R to Linux Shell

2009-04-23 Thread Dirk Eddelbuettel
On 22 April 2009 at 11:42, Whit Armstrong wrote: | try littler: | | warmstr...@linuxsvr2:/tmp$ export MYVALUE=`r -e 'cat(10)'` | warmstr...@linuxsvr2:/tmp$ env|grep MYVALUE | MYVALUE=10 | warmstr...@linuxsvr2:/tmp$ Thanks to a suggestion by Paul Gilbert, littler supports the 'status' argument to

Re: [R] Returning Variables in R to Linux Shell

2009-04-22 Thread Barry Rowlingson
On Wed, Apr 22, 2009 at 3:48 PM, Bierbryer, Andrew wrote: > For example, if I had a simple one line R script that just did > >            string <- 'TEST', > > > > when I call > > /usr/local/bin/R -no-save < MY_R_FILE, > > > > how can I put the value TEST into a shell variable? You can use back

Re: [R] Returning Variables in R to Linux Shell

2009-04-22 Thread Whit Armstrong
try littler: warmstr...@linuxsvr2:/tmp$ export MYVALUE=`r -e 'cat(10)'` warmstr...@linuxsvr2:/tmp$ env|grep MYVALUE MYVALUE=10 warmstr...@linuxsvr2:/tmp$ On Wed, Apr 22, 2009 at 10:48 AM, Bierbryer, Andrew wrote: > If I have an R script that I am executing from a command line in linux, > do y