[R] multiple R sessions from one working directory using GNU screen
Steven McKinney
smckinney at bccrc.ca
Tue Aug 3 22:04:57 CEST 2010
Dear Olga
An R session is conducted entirely in the RAM memory of your computer,
and each invocation of R will have its own memory space, not shared
with any other application, including another R session.
You will have to architect a scheme to allow one R session to find out
about events and objects in another R session. This might involve writing
files to disk from session R1, having session R2 check the directory
for new files every now and then, and so on. (save.image() saves
objects from one R session to a file on disk, but there can be other items
in the saved file such as environments that are not straightforward
to manipulate or investigate from another R session.)
Your situation is similar to cluster computing, where a task is broken up
into independent pieces and each piece is handled by a separate R process.
Reading about cluster computing with R might help you figure out
strategies to share bits of data and information across multiple R sessions.
HTH
Steven McKinney
________________________________________
From: r-help-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of Olga Lyashevska [olga at herenstraat.nl]
Sent: August 3, 2010 8:04 AM
To: r-help at r-project.org
Cc: Olga Lyashevska
Subject: [R] multiple R sessions from one working directory using GNU screen
Dear all,
I am using GNU screen to run multiple R sessions from one working
directory in order to split task, however I noticed that dataset is not
synchronized e.g. if I have two sessions R1 and R2, and I remove an
object from R1, R2 doesn't change as expected or change at random.
I have tried to save.image(), q() and then restart both sessions, but it
does not help.
Any suggestions?
Many thanks
Olga
R version 2.11.1 (2010-05-31)
2010 x86_64 GNU/Linux
Ubuntu 10.04.1 LTS
Intel(R) Xeon(R) CPU X3220 @ 2.40GHz
MemTotal: 4050180 kB
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list