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

Re: st: Re: Clear the Results Window


From   Tom Trikalinos <[email protected]>
To   [email protected]
Subject   Re: st: Re: Clear the Results Window
Date   Mon, 5 Dec 2005 15:22:33 +0200

I generally agree with David's view. Nevertheless, some people -me counting amongst them- would like to "clear" the results window from time to time; depends on the mood.
We know it's meaningless, but we do like to do it.

Mingfu would probably like to see the following program. It's essentially a copy-paste of a code snippet posted by another stata list member whose name -I regret to admit- I fail to recall.

save it as cls.ado along the adopath, and you're set.


*! version 0.1 5Dec2005
program define cls
qui query
qui loc lines = c(pagesize)
if c(more) == "on" {
qui set more off
display _newline(`lines')
qui set more on
}
else {
display _newline(`lines')
}
end




On Dec 4, 2005, at 8:33 PM, Svend Juul wrote:


Mingfu Liu asked:
... I would like to clear up the content in the
"results window" in the middle of a Stata session.
How do I do it?

and David answered:
"Why would you want to do that?!"
---------------------------------------------------

I guess that you want to be able to modify the output,
e.g. by removing junk, before printing. That can not
be done in the Results window; but you can use a log
file. I made this simple profile.do and put it in
c:\ado\personal:

   log using c:\stata.log , replace

profile.do is executed whenever you open Stata, and you
then have a copy of the output (text mode). If you open
stata.log in a text editor, you can edit it, remove junk,
etc. before printing. As text editor I use NoteTab Light,
(download for free from www.notetab.com), but there are
many other possibilities. Find a destription by:
   findit text editor

Also read -[R] log- and -[GSW] 16- (or your appropriate
Getting Started manual), or:
   help log

My suggestion above is to open a log file automatically
at session start, but you will meet other opinions on
how to use log files.

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, work:  +45 8942 6090
Phone, home:  +45 8693 7796
Fax:          +45 8613 1580
E-mail:       [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/


Tom Trikalinos, MD
[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