[R] export variable from bash to R

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Tue Oct 30 18:09:00 CET 2012


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




More information about the R-help mailing list