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]
st: -project- command and "inverse" table of file dependencies
From
Roberto Ferrer <[email protected]>
To
Stata Help <[email protected]>
Subject
st: -project- command and "inverse" table of file dependencies
Date
Sat, 20 Jul 2013 15:05:25 +0100
I'm very enthusiastic about the user-written package -project- by
Robert Picard and installed using:
net from http://robertpicard.com/stata
Reproducibility of work and simple organization are my main concerns.
I believe this package aids the process wonderfully.
I've been playing around with the example provided with the package
(ex12 project) and I ask if it is capable of producing an "inverse"
table of file dependencies. The command:
project ex12, list(concordance)
produces file_created/used --> do-file:
|separate.smcl 7,923 714867776 20jul2013
10:40:48 data-management |
| --> separate.do 610 1479884638 creates 20jul2013
10:40:46 data-management |
|-----------------------------------------------------------------------------------------------------------------|
| separate_example1.png 61,465 3032149987 20jul2013
10:40:48 data-management |
| --> separate.do 610 1479884638 creates 20jul2013
10:40:46 data-management |
|----------------------------------------------------------------------------------------------------------------
I'd like to see an "inverted" table that shows do-file --> file_created/used:
|separate.do 7,923 714867776 20jul2013
10:40:48 data-management |
| --> separate.smcl 610 1479884638 creates 20jul2013
10:40:46 data-management |
| --> separate_example1.png 610 1479884638 creates 20jul2013
10:40:46 data-management |
| --> result_data.dta xxxxxxxxxxxxxxx creates 20jul2013
10:40:46 YYYYYYYYYYYYYYYYY |
| --> proc _data.dta xxxxxxxxxxxxxxx uses 20jul2013
10:40:46 YYYYYYYYYYYYYYYYY |
| --> raw_data.dta xxxxxxxxxxxxxxx original 20jul2013
10:40:46 YYYYYYYYYYYYYYYYY |
| --> some_name.do xxxxxxxxxxxxxxx uses 20jul2013
10:40:46 YYYYYYYYYYYYYYYYY |
|-----------------------------------------------------------------------------------------------------------------|
In its current state I think the naming convention using stubs:
local dofile "`r(dofile)'" // do-file's stub name
graph export "`dofile'_example1.png", width(1200) replace
may be of aid, but it forces the user to name every single file with
the do-file stub name, which may prove inconvenient at some point. It
also shows unnecessary duplicate entries in the table and forces
"backward visualization".
Is this possible right now?
To the author: If not, what are the odds of including this feature in
the near future?
A related point is the dependence of do-files on other do-files. I
think it would be nice if -project, do(file_name)- recorded the
dependency between file_name within the command and the do-file that
contains the command (at least as an option). In the inverted table
the last dependency corresponds to such a case. For example, the ex12
example project does not show the dependency of d_examples.do on all
the do-files it runs. One of the things I'd like to see when given
some unknown zipped project is precisely this dependency. Is there any
reason for this not being implemented?
Finally, there's a small typo in the ex12 example project file
ex12/base/r_examples.do. the author might want to correct. Line 4
reads:
Run examples from the Data-Management reference manual
and should read:
Run examples from the Base reference manual.
Thanks.
Roberto
Stata 12.1 (64-bit)
Linux Mint Debian Edition (LMDE)
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/