[RkWard-devel] Playing with R console

steven.j.novick at gsk.com steven.j.novick at gsk.com
Tue Sep 28 17:34:31 UTC 2004


Hi all,

        Pierre appears to be describing the S-plus GUI.  The editor is on 
top, the output is on the bottom, and there is no one-line commands.  As 
both an S-plus user and an R user, I find that the one-line command 
feature is not necessary, as it is simple to source one line at a time 
from the editor to the output by highlighting the code of interest.  This 
is just as fast as clicking on the command-line editor and typing a new 
command.

Steve

Steven Novick, Ph.D.
Principal Statistician
GlaxoSmithKline
email:  steven.j.novick at gsk.com
telephone: 919-483-2702
MAI.T0201



"Thomas Friedrichsmeier" <thomas.friedrichsmeier at ruhr-uni-bochum.de> 
Sent by: rkward-devel-admin at lists.sourceforge.net
28-Sep-2004 12:50
 
To
rkward-devel at lists.sourceforge.net
cc

Subject
Re: [RkWard-devel] Playing with R console






Hi Pierre!

> I've been playing a bit with the R-console. Nothing
> much, I'm just getting acquainted with the code, and
> seeing if I understand it: I know C++, but not qt/kde.
> I propose a new layout of the window. The code is
> edited above, and results are below. Furthermore,
> clicking "run" no longer empties the text area. I
> added a "run selection" button. Just ignore the patch
> if you don't like this layout.

Interesting different concept, placing the editor above the results. 
Personally I do not have any real opinion on this. I'll include it in the 
next release and see how people react. It's always good to explore 
different 
concepts.
About not clearing the selection when you press "run" - I think in the 
long 
run it should probably be configurable. My rough idea on the console 
window 
is/was, that it's what you use for short simple interactions with R, while 

you would use one or more "Command Editor window"s for more complicated 
stuff. In that case of use, it's actually nicer to clear the commands in 
the 
console window once submitted. However, obviously people differ in how 
they 
use an application. For now - once again, I'll take your patch as is.

> If it's OK with you, I'll go on playing with the R
> console, adding menu entries to load, save, etc.

Of course that's ok with me! However, as a note of caution: please don't 
overdo it. For a true editor you'd still use the Command Editor window. So 

load/save/cut/copy/paste etc. are all nice and useful in the console 
window, 
but personally I think extended options such as line-numbers, indentation 
tools, etc. should be reserved for the Command Editor window, in order to 
keep the GUI in the console window relatively simple.
Even undo/redo should certainly be available as keyboard-shortcuts in the 
console window, but it might actually be wise, not to add them to the 
"Edit" 
menu there, in order to avoid having users think you can use them to 
undo/redo the commands themselves instead of just the edited text.
BTW, technical note: If you want to add features like 
cut/copy/paste/undo/redo, you'll have to add corresponding simple wrapper 
functions to RKCommandEditor. You will note that this class is really 
simple 
and basically just wraps a Kate::Document. All the needed functionality 
already exists, but simply needs a wrapper. The relevant API documentation 
is 
here:

http://kate.kde.org/api/doc/html/index.php
http://developer.kde.org/documentation/library/3.3-api/interfaces/html/namespaceKTextEditor.html


One further comment on your patch:
 void submit_selectedCommand ();
The naming convention for member functions is to always use caps at word 
breaks, i.e.:
 void submitSelectedCommand ();
(for regular members it's underscores e.g.:
 int some_fancy_variable_name;
for classes and structs:
 class SomeClassName;)
I'm not good at following my own convention strictly, either, and you'll 
find 
a number of places where I used inconsistent naming. But of course using a 

consistent scheme is a good thing in general.

Looking forward to your patches!

Thomas


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
RKWard-devel mailing list
RKWard-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20040928/e13abc1f/attachment.html>


More information about the Rkward-devel mailing list