Skip to content
Advertisement

R Session on Linux – submit multiple batch jobs pointing to same session

1) Is it possible to start R sessions on Linux (e.g. Rsession1) and submit multiple jobs in batch mode to the same R Session (e.g. job1 to Rsession1 and then later on based on user action submit job2 to Rsession1)?

This is equivalent to opening interactive R Session and submitting job1 and the user can submit job2 in same session (which will be available until the user closes interactive R session)

2) Is it possible to start two R sessions on Linux (e.g. Rsession1 and Rsession2) and submit multiple jobs in batch mode but specify session-id during job submission?

This is equivalent to opening two interactive R Sessions and submitting jobs to different R sessions by clicking on the window manually submitting the job.

Advertisement

Answer

I’m not sure what your end goal is, but have you considered something like the futures package that will allow R to send work off to another thread to be completed? That way the work can be done but doesn’t lock up the main R session while the work is being completed. This way, via the main R session, you could launch job1 and then while that was still being worked on, launch job2.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement