Skip to content
Back to formatted view

Raw Message

Message-ID: <CANVKczNQ9yuo8+02-hmR42wLyGssAFVfHiXxOkHZGnjhVqOLWw@mail.gmail.com>
Date: 2012-10-30T17:09:00Z
From: Barry Rowlingson
Subject: export variable from bash to R
In-Reply-To: <6a317fb1895e4c1ea9693bacd18e8178@EX-0-HT0.lancs.local>

On Tue, Oct 30, 2012 at 4:34 PM, sophie <melanie.bieli at bluewin.ch> wrote:
> Hi Barry,
>
> I already tried adding print commands, but even if I put the print command
> right under "myscript <- function()", there is no printed output in the
> shell...

 If your script is just:

 myscript <- function(){
   # some stuff
 }

Then all it is doing is defining a function. It won't actually call
the function unless you call it with something like:

 myscript()

after you've defined it.

Or you could just not bother wrapping the code in a function at all.

Barry