Skip to content
Prev 255852 / 398506 Next

system() command in R

----------------------------------------
I hadn't done this in R but expect to do so soon.
I just got done with some java code to do something similar
and you can expect in any implementation these things will be 
system dependent. It often helps to have simple test cases
to isolate the problem. Here I made a tst script called "foo"
that takes a minute or so to exevute and generates some output.

If I type
system("./foo",wait=F) 

the prompt comes back right away but stdout seems to still
go to my console and maybe stdin is not redicrected either
and it could eat your input ( no idea, but this is probably not what you
want).

I did try this that could fix your problem, on debian anyway
it seems to work,

system("nohup ./foo &")

you can "man nohup" for details.