[rkward-devel] Fwd: rkward import module for Stata
Michael Ash
mash at econs.umass.edu
Fri Oct 9 16:02:02 UTC 2009
> 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.
Thank you very much for the clean-up of the import_stata module. The
changes are all improvements.
The canonical Stata test dataset is
http://www.stata-press.com/data/r9/auto.dta which is an 5KB dataset on
automobile models. It features both variable labels for all variables
and value labels for the one factor variable (The variable "foreign"
can take on the values "Foreign" and "Domestic"). rkward successfully
imports auto.dta (from the internet as well as from a local copy).
> Thomas's changes / comments:
The help file is much improved.
> - 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.
I agree. The only reason I could see is for completeness. It's an
option in the underlying R function read.dta(). We could add a snarky
remark to the dialogue box.
> - 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.
Thanks.
> -- 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).
Thanks, and it's helpful for me so see the rewrite that concatenates $options
> -- 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.
Nice. Thanks, and it's good for me to learn this.
Best,
Michael
More information about the Rkward-devel
mailing list