Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Plugins are here


From   rgutierrez@stata.com (Roberto G. Gutierrez, StataCorp.)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Plugins are here
Date   Mon, 07 Jul 2003 10:04:38 -0500

Salah Mahmud <salaheddin.mahmud@mcgill.ca> writes:

> The efforts of the Stata team to design and implement the new plugin system
> are to be commended. I was however slightly disappointed to learn that it is
> not possible to create new variables (and datasets) using the current plugin
> interface. I wrote an ado program to read DBF and Epidata files from inside
> Stata, but it ran painfully slow as all read operations [file read command]
> were interpreted.

Version 1.0 of the plugin system is geared towards those using plugins to
perform complex mathematical manipulations on already existing data.  We
definitely plan on expanding plugin capabilities in the future, and the
ability to create a new variable from within a plugin is a feature we may add.

> One workaround this is perhaps to implement 2 plugins: one reads the file
> header and returns the info necessary to create new variables within the
> calling ado file whereas the second plugin populates the variables with the
> actual data. However, it would have been more efficient if the plugin
> interface allows the creation of new variables.

This may ultimately be the best solution even if plugins could create new
variables.  For example, the ado command

       . gen double x = .

would not run any faster if implemented in a plugin, and when run from an ado
file is also much less prone to error.

Another possibility Salah may consider would be to create a single plugin with
an option switch.  For example, if you specify option -header- the plugin will
read the file header and return the necessary info to the ado file.  The ado
file would then create the necessary variables and recall the plugin with the
-populate- option to populate the variables.

--Bobby 	                           --Alan
rgutierrez@stata.com                       ariley@stata.com
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index