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   Christopher Baum <[email protected]>
To   "[email protected]" <[email protected]>
Subject   re: st: file names in esttab, style(tex)
Date   Tue, 24 Jan 2012 15:38:25 -0500

<>
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/


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