[rkward-devel] long/wide transformer [was: wilcoxon tests]

meik michalke meik.michalke at uni-duesseldorf.de
Fri Dec 23 19:15:32 UTC 2011


hi,

Am Mittwoch, 21. Dezember 2011, 10:19:57 schrieb Thomas Friedrichsmeier:
> On Tuesday 20 December 2011, meik michalke wrote:
> > yes, i get the hint ;-) have you tried the latest rk.ANOVA plugin? it
> > also adds a dialog to the "data" menu to prepare data similarily. would
> > that be something to work with, maybe?
> 
> yes, I guess that's a start. If we had a more generic (more generic terms)
> plugin to convert from wide to long in the "base" distribution, that would
> go a long way, already. We could worry about an embeddable solution, later.

if you have any ideas how to refine this plugin to a more general one, be my 
guest and take what you see fit, of course.

> While at it, some comments on the "Prepare within subject data" plugin:
> - The dialog does not have a caption, somehow.

oops, forgot to set a dialog label... fixed.

> - Using "attach" may be slightly dangerous. You risk name clashes with your
> temporary variables. I'd suggest to do
>    data <- user.specified.data.frame
> instead, and then use
>    data$column.name
> after that.

ok, didn't think of that, obviously. i went even further now and removed the 
intermediate data.frame completely. still seems to work nicely.

> - If you are doing the above, perhaps you could also remove the need to
> select a data.frame, first. Rather you could assemble a temporary
> data.frame from the response/subject/group vectors. Not sure, whether this
> is worth doing, though.

you can do both now. i included a simple check for equal vector lengths, and 
otherwise hope for users to supply suitable data...

> - I think the subject identifier could reasonably
> default to
>    1:num.cases
> or
>    rownames (data)

implemented the first, which caused the inclusion of another checkbox toggle, 
though.

> - Most plugins use
>    .GlobalEnv$object.name <- object.to.save
> I think that looks slightly less frightening than assign().

ha, and the assign() thing didn't even work properly if you chose a parent 
object ;-) this had to be (and was) fixed in rkwarddev, since it is all code 
which gets added automagically if a saveobject element appears in the dialog.

> - Between subject variables lack one level of indentation in the generated
> code.

fixed.

> - level=1 is the default for rk.header(). Consider removing "level=1" from
> the generated code.

fixed (another faulty rkwarddev automatism)

i can't upload plugin packages to the repo for a couple of days, so if someone 
would like to try the new version i can only offer the rkwarddev script for 
the time being:
 o http://reaktanz.de/stuff/R/rkwarddev_ANOVA_plugin_script.R
   (as always, simply run it in RKWward and the full plugin will appear)


viele grüße :: m.eik

-- 
  dipl. psych. meik michalke
  abt. f"ur diagnostik und differentielle psychologie
  institut f"ur experimentelle psychologie
  heinrich-heine-universit"at 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/20111223/4775ecfe/attachment.sig>


More information about the Rkward-devel mailing list