[TxMt] Re: R-package - strange parsing errors
Martin Batholdy
batholdy at googlemail.com
Mon Oct 17 16:25:52 UTC 2011
Ok,
I just observed the following:
When I delete one line of code in my original script,
the strange parsing behavior also skips one line and the error now occurs in the next line:
output:
> full_matrix <- data.matrix(prt_reduced)
> full_matrix <- cbind(full_matrix <- cbind(full_m
+ rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr final_matrix <- rbind(final_matrix, full_matrix) }
Error: unexpected symbol in:
"full_matrix <- cbind(full_matrix <- cbind(full_m
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr"
original code:
x <- c(12, 15, 18, 21)
for(i in 1:length(x)) { prt_reduced[,x[i]] <- reorder(prt_reduced[,x[i]], c(3,4,1,2)) }
x <- c(13, 16, 19, 22)
for(i in 1:length(x)) { prt_reduced[,x[i]] <- reorder(prt_reduced[,x[i]], c(3,1,2)) }
x <- c(14, 17, 20, 23)
for(i in 1:length(x)) { prt_reduced[,x[i]] <- reorder(prt_reduced[,x[i]], c(2,1)) }
full_matrix <- data.matrix(prt_reduced)
full_matrix <- cbind(full_matrix, reduced_data)
I am sorry, but I was not able to come up with sample code that replicates this behavior.
I tried, but I have no clue how to trigger this with generic code.
On 14.10.2011, at 11:20, Hans-Jörg Bibiko wrote:
>
> On 13 Oct 2011, at 23:23, Martin Batholdy wrote:
>> I start the Rdaemon with CMD+enter and then execute selected lines with the "execute selection" menu item.
>> A small window pops up with a progress bar and the message "sending task to Rdaemon".
>> After this is finished the selection converts to R-output.
>>
>> I don't have a separate R-window open.
>
>
>> The script is actually not that large.
>> It is just about 200 lines of code (8kb on disk).
>>
>> But since I get this strange parsing-behavior always at the end of the script, I thought it has something to do with that.
>
> Hi Martin,
>
> ok, I got it [Rdaemon offers flexible workflows ;) ]
>
>
> The point is that the output of the R console which runs in the background will be parsed by a Perl script to clean the output since it could contain many control characters etc. I guess that's the problem.
>
> Important: Which MacOSX and R version do you running?
>
> and
>
> Please do the following:
> - start a new Rdaemon session
> - execute your R code in question
> - go to the "R Console (Rdaemon)" menu > "Rdaemon Tools" > "Logfiles" > "Open console log file r_out" [short-cut ⌥⌘T]
> - a new window should appear showing the RAW output of the current R session's output [don't be confused ;)]
> - check the window's content for any confidential data and if you can send me the content please do this:
> -- open Finder; go to ~/Library/Application Support/Rdaemon; and send me the file "r_out" [please do not copy/save the content file to another file since editors can "destroy" its content due to possible control characters]
>
> With this I can check the Perl script. Maybe I missed some output sequences to catch.
>
> Best,
> --Hans
>
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
More information about the textmate
mailing list