[RkWard-devel] Code generated for "multi action" plugins

SJR stefan_roediger at gmx.de
Fri Jan 5 18:10:20 UTC 2007


Am Freitag, 5. Januar 2007 15:07 schrieb Thomas Friedrichsmeier:
> On Friday 05 January 2007 01:03, SJR wrote:
> > I wonder how many people ever will reuse the code. However, it's nice to
> > have this option. And if mentioned here and there users will make use of
> > it I guess. Most users see in RKWard a GUI to R anyway and not the
> > sophisticated IDE. Therefore most will prefer to click here and there to
> > get a result. At least this is my perception.
>
> My perception is that at this moment, most of our current user base uses
> RKWard mostly as an IDE.

100% TRUE. I used RKWard some week ago to impress my boss. Drop in the data, 
command, Enter. Tada, a fancy looking graph and a meaning full textual 
output. Oh how I like R/Kward.

> I believe the proportions will start to shift, 
> however, with the addition of more plugins. But of course the ultimate
> objective is to produce a program that suits both types of users.

Yes of course. I explained my self not correct. Most people search for an 
alternative for e.g. SPSS and find (with some "disappointment") R and later 
on RKWard since they still need a GUI. Can you remember some weeks back the 
request for the integration of R in OpenOffice.org. That's in a certain way a 
good example.

>
> > I'm not totally sure but think the second approach is the winner for me.
> > Maybe some trying and examples will help me to get totally convinced.  ;)
>
> Ok. So we both lean to the same direction here, and unless someone voices
> objections, I'll start modifying the existing plugins to use this approach
> (and to use rk.header () and rk.results).

Good. Luckily there aren't to much and some of them are quite similar.

> I intend to start working on this 
> on Sunday afternoon. Maybe, around that time, you could give me a note,
> which plugins you are currently actively working on,

Right now (I mean this weekend) no one (sorry for that) or at least I assume 
so. Maybe I will have a look at the distribution plug-ins. There is some cat 
(HTML_stuff) to be converted.

> so I can omit those 
> until you have done your changes, and we don't interfere with each other
> too badly.
>
> Examples:
> I have taken the descriptive statistics plugin, and converted it
> accordingly. This one has a lot of "optional actions", so it is rather
> different, now. The changes done are visible, here:
> http://rkward.svn.sourceforge.net/viewvc/rkward/trunk/rkward/rkward/plugins
>/descriptive/descriptive_statistics.php?r1=1058&r2=1064

Looks nicer IMHO. But I still need some time to get in (anyway I'm 
convinced ;) )

>
> This may look a bit scary in the diff, but the real meat is this:
>
> rk.temp.options <- list (dofoobar=<? getRK_val ("foobar"); ?>
> [...]
> if (rk.temp.options$dofoobar) rk.temp.results$foobar <- foobar (x)
>
> is changed into:
>
> # no need to define a list of options in R
> [...]
> <? if (getRK_val ("foobar")) { ?>
> rk.temp.results$foobar <- foobar (x)
> <? } ?>
>
> So what really happens, is that the if clause is moved into PHP.

I followed "<? ?>" and indeed this is what happens. Nice work!

>
> > Policies and conventions are really important but don't forget to state
> > them somewhere.
>
> Good point. I've added a large note at the top of the TODO file. Before the
> next release, I will rework the documentation accordingly, adjusting the
> examples, and adding a section on policies and conventions.
>

Glad that you say that. By the way. Right now RKWard has oh so many great 
features. It would be nice to have some kind of "Tip of the Day" or "Did you 
know, RKWard can ... for you?". Or maybe forget it. It's not really useful 
for a scientific tool. I think I should start to do some work on the help. 
What is the current status. Is there "connection" between the help button and 
the help?

> Regards
> Thomas

Kind regards
Regards




More information about the Rkward-devel mailing list