Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: file names in esttab, style(tex)


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: file names in esttab, style(tex)
Date   Tue, 24 Jan 2012 20:50:02 +0000

I think that's right, but the user should know the name of the do-file
and the question is then whether there is a handle to pass it to
-esttab-.

It is also I think pertinent that sometime ago I wrote a small utility
-filei- (SSC) that permits adding lines to existing text files, so
there is more scope for automation than may appear. That is, -esttab-
and -filei- could be called from the same script.

Nick

On Tue, Jan 24, 2012 at 8:38 PM, Christopher Baum <[email protected]> wrote:
> <>
> I wonder if there is a way to print the do-file file name (and
> possibly the date) as a comment on a tex file outputted by esttab
> (available from ssc). That is, it would be wonderful if the generated
> tex file started with a (tex) comment, such as
>
> % file generated by mydifile.do in DD/MM/YYYY
>
> For example, the equivalent function in R does exactly this. If any
> one has any idea on how to pass this to esttab, I'd be thankful if you
> could share it. If not, here's a suggestion for future versions of
> esttab.
>
>
> I don't believe this is really an esttab (Jann, SSC) issue. To my knowledge a do-file does not know its own name, in the sense that nowhere
> among the creturns is the name of the file that appeared in the last do... command (or equivalent, e.g., click on 'run' in the GUI). You can determine
> the current working directory, and the name of the current datafile loaded into memory (if it exists), but I don't believe that you can recover the
> name of the do-file from within that file.
>
> I could be wrong, of course, and I'm sure Stata developers will clarify if I am.
>
> Kit
>
> Kit Baum   |   Boston College Economics and DIW Berlin   |   http://ideas.repec.org/e/pba1.html
> An Introduction to Stata Programming   |   http://www.stata-press.com/books/isp.html
> An Introduction to Modern Econometrics Using Stata   |   http://www.stata-press.com/books/imeus.html
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index