I think if you can, just try to do something really simple like writing the
data to a file in one session and periodically reading that file from the
other session. This would be the easiest thing to implement, and if you just
need data refreshed every few minutes or so, I would take this route. You
can gather data in R and write in R's binary data format, or gather data in
anything and write it as a text file that R can parse.

You can have 2 R sessions open at once, just open 2 terminal windows and run
R from the command line. Or, better yet, run your scripts as batch files. If
you want them to run automatically, use cron or "Scheduled Tasks" in
Windows. Actually "Scheduled Tasks" probably won't give you "every five
minutes" functionality, but there's most likely third party software out
there which will.

If you want to get fancy, and run one instance of R as a "server" which can
expose the data to another instance of R running as a "client", then I'm
sure there are lots of ways to do this, with varying complexity and
reliability. Because I work in Ruby if I were doing this I would try using
Distributed Ruby (DRb) to create my server and client, and have RSRuby
(which embeds R into Ruby) do the data processing on the server and
calculations on the client. I am by no means claiming that this would (a)
work or (b) be optimal, it's just what I am familiar with and what I would
probably try. But, makes sense to look into Gabor's suggestions along these
lines first.

Another option would be to write the data to an actual database, such as
PostgreSQL or MySQL. Then you can just have 2 independent R sessions, one of
which writes to the DB and the other reads from the DB. This means the DB is
going all the heavy lifting for you of clients, servers and concurrency
issues.

But, try writing to plain old files first and if at all possible, stop
there. :-)

	[[alternative HTML version deleted]]

