Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: RE: Re: How can commands be suppressed in the results window


From   "Philip Ryan" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: Re: How can commands be suppressed in the results window
Date   Thu, 19 Nov 2009 00:47:44 +1030

One way is to wrap the commands into an ado file, which simply means you add
one line to the beginning, and one line to the end, of the current do file:

For example imagine you wish to execute these 3 commands:

sysuse auto, clear
tab foreign rep78
summ price turn

You type the following into a text editor:

program test_x
sysuse auto, clear
tab foreign rep78
summ price turn
end

save it as test_x.ado  and execute it in Stata.

Phil


Philip Ryan
Professor and Director
Data Management & Analysis Centre
School of Population Health & Clinical Practice
University of Adelaide

From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Thursday, 19 November 2009 12:34 AM
To: [email protected]
Subject: st: RE: Re: How can commands be suppressed in the results window


<>

You can put curly braces around the block of commands whose output you do
not wish to see:

qui{
	//no output for commands here
}


HTH
Martin


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Babak Oskooei
Sent: Mittwoch, 18. November 2009 14:58
To: Stata List
Subject: st: Re: How can commands be suppressed in the results window

Dear Stata Users,

Thanks for those who replied to my previous question, specially Nick Cox. I
have a further question regarding the results window. I have to carry out
repetitive commands, lots of them, which I wrote in a do file. I would like
to prevent them from appearing in the results window and only have the
outputs which are only tables. 

I know the command "quietly", but when I include it, it suppresses all the
output.

I would appreciate any comments on this.

Kind regards

Babak Oskooei
MRC Clinical Trials Unit
London


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

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.707 / Virus Database: 270.14.72/2511 - Release Date: 11/18/09
18:20:00

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