[rkward-users] Console printing behavior
Gilles San Martin
gilles.sanmartin at gmail.com
Tue Nov 9 21:17:21 UTC 2010
Thanks for your reply
Sadly I don't know anything about C++ (just a little bit of R)
I will add it to the feature request tracker.
I don't find the copy paste to the console so slow relative to a normal
R console (but the rkward "run" commands are effectively extremely rapid).
I was using this with kate (with the command : tools/redirect to the
console when Konsole is embedded in Kate).
It could maybe be an easy temporary solution to add a button/command
that do the whole stuf : copy from the script, paste in the console and
add a "carriage return" to be sure that the last line of code is executed.
I tried to hold the shift+F7 approach. It works more or less fine but it
seems to have a small bug.
When the execution of one line (command) is long, rkward print the
following command(s) in green and without the prompt as if it was an R
print/error message etc... instead of the normal syntaxic coloration
with the prompt. But these "green" commands seems to be nevertheless
executed. Some times each of these commands is executed 2 times (but I
was not able to reproduce this artificially).
I had this problem with a series of "pairs" graphs.
Here is an example that reproduce the bug (but not the double
execution) if you hold shift + F6.
data <- matrix (rnorm(3000), 100, 30)
pairs(data[,1:10])
pairs(data[,11:20])
pairs(data[,21:30])
Best regards
Gilles
Le 08/11/10 15:12, Thomas Friedrichsmeier a écrit :
> Hi,
>
> On Monday 08 November 2010, Gilles San Martin wrote:
>
>> There is however a behavior of the console that I really find annoying :
>> when you run a block of code from a script the console displays first
>> the block of code and then all the prints. Is it possible to change this
>> behavior so that the prints follow immediately the code that have
>> generated it (as if you had executed the code line by line - I hope this
>> explanation is explicit enough...) ?
>>
> I know what you mean. You cannot currently configure RKWard to work this way.
>
> What you can do is either press and hold Shift+F7, or copy the code and paste
> it into the console. However, when you do, you will also notice the reason why
> this is not the default behavior: For long statements (e.g.:
> x<- function {
> # dozens of lines inside
> }
> ) this is quite slow (pasting this is somewhat slow in a plain R session, too,
> but not quite as pronounced).
>
> It can think of several approaches to improve on this, but each would take
> some time to implement. If you know a bit of C++, and you are willing to help,
> I'll be happy to give you some details on what I have in mind (on the rkward-
> devel list).
>
> Otherwise, you could add this to our feature request tracker
> (http://sourceforge.net/tracker/?atid=459010&group_id=50231) to make sure
> we'll remember to look into it, later. But currently other issues are higher
> up on my TODO list, and so I will not promise any time frame.
>
> Regards
> Thomas
>
>
>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
>
>
> _______________________________________________
> RKWard-users mailing list
> RKWard-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rkward-users
>
More information about the Rkward-users
mailing list