lbartnik / subprocess

Other
49 stars 10 forks source link

Stackoverflow question #56

Closed filipsch closed 6 years ago

filipsch commented 6 years ago

Hey Lukasz, first of all thanks for such a lovely package. It is a great addition to ever-expanding power of the R universe. I wanted to point you to a stackoverflow question that I have just asked regarding your package, and was wondering if you had any thoughts on it. https://stackoverflow.com/questions/50058941/accessing-r-objects-from-subprocess-into-parent-process. Thanks.

lbartnik commented 6 years ago

Sure. Here's the answer I posted in StackOverflow.

I'd use RServe as it lets you run multiple R sessions and control them all from the master R session. You can run commands in those sessions in any given (interwoven) order and access objects stored there in the native format.

subprocess has been created to run and control any arbitrary program via its command line interface, so I have never intended on adding an object-passing mechanism. Although, if I was to access objects from child processes, I'd do it via saveRDS and readRDS.

Also, I suggest looking at the processx package (https://github.com/r-lib/processx). It seems to have surpassed subprocess.

filipsch commented 6 years ago

@lbartnik thanks!!