[rkward-devel] Fwd: rkward import module for Stata

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Fri Oct 9 13:43:56 UTC 2009


Hi Michael,

On Tuesday 29 September 2009, Michael Ash wrote:
> I think that the overall work on import_stata module is largely done.
> I will be grateful for feedback

Ok, I took a more in-depth look at the plugin, now. To make it easier to talk 
about the changes, I've committed them to SVN (r2703). See 
http://rkward.svn.sourceforge.net/viewvc/rkward?view=rev&revision=2703 . This 
does not mean all those changes are necessary. Feel free to undo some. But 
again, this way it's easier to show, what I mean (perhaps we'll use a 
dedicated tool for this sort of discussion, in the future).

My changes / comments:
- In the help file:
-- Removed some fragments which do not apply to read.dta. For instance, in 
contrast to read.spss, read.dta always returns a data.frame.
-- Tried to provide a bit more explanation for some of the options.

- In the xml file:
-- Removed the "warn_missing_labels" option. Perhaps I'm missing something, 
but it seems mysterious to me, why you would want *not* to be warned about 
something like this (which sounds like a broken file to me). If there is a good 
reason to keep this option, just re-add it.

- In the PHP file:
-- Removed some empty lines. Empty lines are a good way to structure the code 
a bit, but most of the time a single empty line between blocks is enough. 
(This, of course, is really not too important).
-- Changed the code to simply write all options into single variable $options. 
Makes the code a little simpler, and less error-prone. For instance, the 
$warn_missing_labels_opt was not working, as later on you used a slightly 
different name in echo ($warn_missing_labels).
-- Added a call to "makeHeaderCode". This writes a call to rk.header(), and 
that adds a caption and some basic information to the output window. Esp. 
since we have the "Run again" links, almost all plugins should write such a 
header, so there is some info on *what* to run again.

Your items:
>, e.g., labels don't work right,

Can you elaborate? At least for Smoking.dta and chap5-cps.dta, I can see no 
apparent problems with the labels. But then, perhaps I just don't know, what 
it's supposed to look like.

> formats got messed up,

This one is rather tricky, and I did not address this, yet. Truth is that 
there is no straight-forward way to specify the format to use for display in 
RKWard. I guess this will have to wait a bit longer.

> etc.,  but I don't foresee any major changes.

Ok, let me know what you think of my changes, or what else should still be 
done. Also please remember the sample file that I keep nagging you about.

Regards
Thomas
-------------- 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/20091009/e3df2eff/attachment.sig>


More information about the Rkward-devel mailing list