Statalist


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

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


From   Michael Hanson <[email protected]>
To   [email protected]
Subject   Re: st: RE: Re: How can commands be suppressed in the results window
Date   Thu, 19 Nov 2009 21:32:31 -0500

I'm a little surprised by some of the more complex answers given on this thread -- perhaps I am misunderstanding what looks to be a fairly simple question.

Babak:

Martin's suggestion to use -quietly- seems to me to be one half of the solution you seek. The other half is its counterpart, -noisily-:

// Begin example

quietly {
    log using quiet_noise.log, text replace
    sysuse auto
    noisily: regress price mpg foreign
    log close
}

// End example

Note that only the results of the -regress- command are displayed, and not the call to the -regress- command itself. Is that something like what you are looking for?

Note also that if you look at the file "quiet_noise.log" with a plain text editor, you'll see that it only contains the results of the commands you precede with -noisily:- . This log file might be more useful for you than (say) copying and pasting from the Results window, should you have some post-processing of the output in mind. Using - estout- or a similar command is arguably an even better way to control what you output and how it looks, especially for inclusion in professional documents.

Hope this helps,
Mike


On Nov 18, 2009, at 9:09 AM, Babak Oskooei wrote:

Thanks Martin, I probably did not clearly express my question. I do want to have the output, but I would like to suppress the command that generated the output from appearing in the results window.

I hope this clarifies my question.

Babak

--- On Wed, 11/18/09, Martin Weiss <[email protected]> wrote:

From: Martin Weiss <[email protected]>
Subject: st: RE: Re: How can commands be suppressed in the results window
To: [email protected]
Date: Wednesday, November 18, 2009, 9:03 AM


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

qui{
    //no output for commands here
}
*
*   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