[rkward-devel] new JS functions
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Wed Oct 19 07:12:03 UTC 2011
Hi,
On Tuesday 18 October 2011, meik michalke wrote:
> Am Dienstag 18 Oktober 2011, 17:43:49 schrieb Thomas Friedrichsmeier:
> > what use case do you have in mind for short names inside JS?
>
> inspired by the request the other day, i'm working on an ANOVA plugin. it
> uses ezANOVA() (package "ez"), which supports between/within/mixed models
> and sphericity correction out of the box.
>
> the function needs a data.frame and information which column is what, like
>
> ezANOVA(data=my.data.frame, dv=.(colDepend), wid=.(varCondition) ...)
>
> so i had to get to these names somehow out of e.g.
> my.data.frame[["colDepend"]]. is there already a simple solution to that?
> my goal is not to produce many lines of R code which a human being would
> have condensed into one simple call, like above.
ok, that problem.
There is more complexity in corner cases, though. <varslots> will readily
allow you to mix objects which are not inside the same data.frame. You can
certainly argue that in general it makes a lot of sense to keep all model data
inside one data.frame. I'm not sure, we want to force users to do that in all
cases, though(*).
I had started to adress this problem in the <formula>-tag. Try the "Simple
Anova"-plugin (in under_development.pluginmap), and watch what happens when
you select objects from different data.frames. That magic is mostly implemented
in C++-inside the <formula>-widget. The formula widget does not support random
effects, yet, and still has other problems, too (it does not work well in run
again links), but perhaps it is the way to go after all?
Speaking of things already coded in C++: I just remembered the "shortname"
modifier of RObject-type properties... So you don't need to manipulate strings
in JS to get that.
Regards
Thomas
(*): If you do want to force users to use data from a single data.frame, only,
you'll have to use a two stage solution: One varselector + varslot to select
the data.frame, then connect that to the "root"-property of a second
varselector (like in the "Sort Data" plugin).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20111019/588292a0/attachment.sig>
More information about the Rkward-devel
mailing list