[TxMt] New R bundles available

Hans-Joerg Bibiko bibiko at eva.mpg.de
Mon Mar 17 16:33:26 UTC 2008


On 17 Mar 2008, at 16:56, Sean Anderson wrote:
> When using these new versions of the Rdaemon and R bundles, the first
> time I send code to Rdaemon from an R file, it works fine. After that,
> however, I can't send any more code (i.e. nothing happens) until I
> kill and restart the Rdaemon. The Rdaemon console continues to
> function on it's own. Sending code to R.app works fine.
Oh yes, this is a nice issue!

I changed the code for it a bit in that respect.

The overall question is: Why do you send R code from a window  
(language R) to the Rdaemon?
In most of the cases because you are developing a function for instance.
Now you can select the function declaration and send it to the  
Rdaemon, switch to the Rdaemon doc, and you can use that function  
(the Rdaemon console is not "messed up", error messages could be seen  
with opt+apple+A 2).

You can try out it very simply. Just start the Rdaemon in a window,  
open a new R window, type "a <- 3", send it to the Rdaemon, go back  
to the Rdaemon window, and execute "a". You will see "[1] 3".

If you select e.g. "mean(1:5)" and send this to the Rdaemon, the  
Rdaemon will execute it BUT you do not see the result. If you want to  
see the result, execute it within the Rdaemon console.
The same for a chunk of R code lines within the console window. You  
can press apple+Return, write some lines, and press shift+Return to  
execute them if you are at the end the doc (if not, select them and  
press shift+Enter)


The background.
The "old" version wrote the result into console.Rcon and opened it.  
Fine. But some users have an other doc opened which runs the Rdaemon  
console, because there is no need to use console.Rcon only.
The next item is if you use console.Rcon and you run some R code  
(console.Rcon is NOT saved!), go to an other R window, select some  
code, and send it to the Rdaemon, the underlying script was appending  
the result to the SAVED version of the file console.Rcon which is not  
the file which you see in TM. By doing so you "lost" some code  
entered in console.Rcon, and it was a bit confusing to the users.

Of course, if there is a need to have also/only the "old" behaviour I  
can add/change this.
Any comments?

--Hans






More information about the textmate mailing list