[TxMt] R-package - strange parsing errors

Martin Batholdy batholdy at googlemail.com
Thu Oct 13 18:23:12 UTC 2011


Hi,


I am using the wonderful Rdaemon-bundle in TextMate.

But now I stumbled over a big problem parsing code to the Rdaemon
(by selecting the code and pressing CMD+T or selecting "execute selection").


It is a rather long script and some of the lines at the end of the script do not get parsed correctly.
They kind of get completely screwed up leading to error messages.


For example, this line in the original code:

for(i in 1:length(x)) {   prt_reduced[,x[i]]  <- reorder(prt_reduced[,x[i]], c(2,1)) }

looks like this after pressing CMD+T:

> for(i in 1:length(x)) {   prfor(i in 1:length(x)) {   prfor(i in 1:length(x)) {   prfor(i in 1:egory
Error: unexpected 'in' in "for(i in 1:length(x)) {   prfor(i in"



It seems to have something to do with the length of the script.

When I just execute this line, or chunks of code step by step, it works fine.
But if I try to run the whole script (with CMD+A, CMD+T) strange things happens at the end of the script (like this screwed up line above).


If I try to make the code smaller (delete lines etc.), it seems like different lines get affected by this strange behavior
(at it always happens at the end of the script).

So it seems to have nothing to do with particular lines of codes, but as I said, the length of the script.
As if at some point the parsing of code to the Rdaemon doesn't work anymore (perhaps something like buffer-overflow?).



hope someone can help!

thanks. 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20111013/3830a44c/attachment.html>


More information about the textmate mailing list