[TxMt] R bundle - persistent session, possible?
Martin Batholdy
batholdy at googlemail.com
Thu Feb 23 01:13:39 UTC 2012
Hi,
I am now working with the R-package for quite some time, and I have to say that R is much more fun with this package.
However, I still haven't found a workflow that completely satisfy me.
I started with sending the code directly to the R-app.
That works ok, but you have to switch between two programs, which sometimes can get cumbersome.
After that I tried the Rdaemon and executed my code directly in textmate.
At the beginning I was really impressed by these capabilities.
Unfortunately it gets a little bit problematic with bigger scripts, in my experience.
When I parse a lot of code (sometimes with some errors), I can't do anything anymore.
And I can't exit ongoing calculations so that I often end up force quitting textmate.
Executing code by parsing it to the Rdaemon in the background is also not really a solution.
It's difficult to get feedback on errors With a lot of code, you can't see when it is finished.
Also it seems like parsing a lot of code is in general error prone.
So for some lines of codes the Rdaemon is perfect, but for larger scripts it can get a little bit tricky.
For large scripts I think the bash-option ("Run Document / Selection in R") is really great.
So now, here is my question: ;)
Sending R-code within Textmate and then outputting it with the html-window within textmate is great
(especially with TM2 where you have an integrated output window).
However, every time I send code through "Run Document / Selection in R", it seems like I start a new R-session.
It would be great (at least for me) if R would remember all the code that was executed so far (just like the Rdaemon which just keeps running in the background).
So is it possible to send code to R and keep this session open?
for example, if I send:
x <- c(1,2,3)
with "Run Document / Selection in R"
and after that I send:
print(x)
I get:
Error in print(x) : object 'x' not found
It would be great, if the session would be persistent, so that I actually can execute code stepwise
(just like you can do that with the Rdaemon).
A big thanks for the great work on the R-package!
best,
martin
More information about the textmate
mailing list