[rkward-devel] new JS functions
meik michalke
meik.michalke at uni-duesseldorf.de
Tue Oct 18 18:48:06 UTC 2011
hi,
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.
you can check out its current state here:
o http://reaktanz.de/stuff/R/anova_plugin.R
it basically works already (you can try the example in ?ezANOVA).
> > - getValueShort()
> >
> > a getValue() alternative for varslots, to get an array of
> > short names directly
>
> Well, again, I'm not sure about _short_ names.
hm, ok, i was under the impression that it's obviously useful ;-) it actually
is, i'm using it in my plugin (s.a.). but maybe you have a hint how to do that
more elegant.
> > i could probably come up with some more functions to ease the JS coding
> > part for rather common stuff.
>
> Ok, go ahead, but please be somewhat conservative. Once plugins start using
> these functions, they'll be more or less set in stone, so we should be
> careful not to add stuff that are not really needed.
sure. i don't know if you had a look at rk.JS.array() and rk.JS.options() yet
(run the exampes to see JS code), but i was thinking of these two ATM, because
i've used that in some plugins now.
viele grüße :: m.eik
--
dipl. psych. meik michalke
institut f"ur experimentelle psychologie
abt. f"ur diagnostik und differentielle psychologie
heinrich-heine-universit"at d-40204 d"usseldorf
-------------- 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/20111018/b5086860/attachment.sig>
More information about the Rkward-devel
mailing list