[TxMt] problem with R interaction [was math bundle feature request]

Hans-Joerg Bibiko bibiko at eva.mpg.de
Fri Dec 8 22:18:55 UTC 2006


Quoting Charilaos Skiadas <skiadas at hanover.edu>:

> On Dec 8, 2006, at 3:49 PM, Hans-Joerg Bibiko wrote:
>> But I looked at the R-Bundle and I wrote a command (in bash) which  
>> executes R directly in script mode à la
>>
>> R --no-save --silent <<< "$TASK" 2>/dev/null
>>
>> [...]
> This was my first approach to this too. The problem is that this is
> relatively slow, because it has to load R each time, and that does take
> up time. The interpreter sounds like a better idea, but it doesn't work
> out of the box. (well, I guess we don't even know if we can make it
> work at all yet ;) ).

Well, this solution is good for tiny calculations. The speed, well,  
depends on the machine. Tiny things are done in less than a second.


> There is an approach that is relatively doable but had technical
> problems. We can start an R process in the background, and communicate
> to it via named pipes, which you can think of if you like as files on
> the hard drive that TM would write to and R would read from. This would
> be reasonably fast. The problem we are encountering, so to speak, is
> that this would mean a shared R environment for all your R work. So
> imagine you are working on three different R projects, on different R
> windows. They might be defining conflicting varialbes and messing up
> each other's computations, if they are sent to the same R process. So
> this adds a considerable amount of details that need to be overcome.

This sounds good, but you mentioned the problems. I will sleep about that.

But, if you are running several R sessions with complex tasks, well,  
then I have an humble question: Why do you are using TM for that? You  
want to control all R sessions with TM?

If I understood the starting point correctly one is looking for a  
solution to solve 'easy' mathematical tasks with R.

-Hans



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the textmate mailing list