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

Re: st: Any easy way to append commands in the review window to current do file?


From   "Svend Juul" <[email protected]>
To   <[email protected]>
Subject   Re: st: Any easy way to append commands in the review window to current do file?
Date   Wed, 12 Oct 2005 12:05:26 +0200

Sean wrote:

I'm wondering whether there's a quick way to choose and append
commands executed and shown up in the review window to the current do
file? As you may have experienced, sometimes I type small commands
directly through command window instead of in the do file, whereas at
the same time I don't want to lose track of all these small steps.
--------------------------------------------

Two methods; both work best if you have Stata 9 because it has multiple
Do-file editor windows.

1. Right-click in the Review window and select "Copy to Clipboard". Open
a Do-file editor window and paste by Ctrl-V. Now you may select what you
want and maybe copy it to another do-file editor window (Stata 9).

2. Create a command log (see -help log-). You can do it automatically at
session start by including in -profile.do-:
    cmdlog using c:\cmdlog.txt , replace
Now, you may open the command log in a Do-file editor window. You may
even make the command log cumulative, also remembering commands from
past sessions, by:
    cmdlog using c:\cmdlog.txt , append

Stata 8 has only one do-file editor window, and that gives some
limitations. With Stata 8 I used another text editor (NoteTab Light,
available for free from www.notetab.com.) for such exercises.

Hope this helps
Svend

__________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone: +45 8942 6090
Home:  +45 8693 7796
Email: [email protected]
__________________________________________

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index