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: RE: efficient file organization for programming
From
"Lachenbruch, Peter" <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: RE: efficient file organization for programming
Date
Thu, 18 Mar 2010 11:28:07 -0700
This is quite similar to the file organization suggested by J. Scott Long in his book The Workflow of Data Analysis Using Stata. It covers managing files, do files ado files, etc. It's a wonderful book that we all should read (no I'm not in Scott's pay...:-) )
Tony
Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Maarten buis
Sent: Thursday, March 18, 2010 8:50 AM
To: stata list
Subject: st: efficient file organization for programming
I have had the pleasure recently of collaborating with someone who
was new to programming in Stata. This experience made me remember
that it took me quite a bit of trial and error before I got system
of organizing my files that worked for me. So I thought I write
this up, in the hope that it might be helpful to somebody.
Two issues stumped me for quite a while:
1) I don't want the version I am currently working to be my
default. It takes a while before I get all the bugs out, and till
that time I want the older version to be my default
2) I want to keep older versions in case an "improvement" in a newer
version turned out to be no improvement at all. However, till I need
them, they should be unobtrusive.
The solution was remarkably simple, and has to do with the priority
which Stata gives to .ado files stored in different locations. In
particular, if you use -cd- to change the current directory to a
directory that contains an .ado file, than that .ado file will take
priority.
So I have a folder called Stata which contains all my Stata programs.
Within that folder, each program has its own folder, and within a
program's folder each version has its own folder. If I want to update
a program, I start by creating a new folder for the new version, copy
the latest version to it, and start working. While working on it, I
will test it in a .do file that first -cd-s to that directory.
However, if I need to switch to "real work" before finishing it, the
default will still be the version I downloaded from SSC.
This solved my two probels, because for me, the "official version" of
my programs are the ones I submitted to SSC, and I use version numbers
for the folder names of the different version, so I can easily find the
current version: it is the bottom one, and Stata won't get confussed
with these older versions hanging around on my system (unless I
explicitly -cd- to that directory).
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/