Statalist


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

st: How to quietly svmat ?


From   "Sergiy Radyakin" <serjradyakin@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: How to quietly svmat ?
Date   Tue, 11 Nov 2008 14:05:18 -0500

Dear All,

the -svmat- Stata command has an inconvenient interactivity feature,
which always requests a confirmation, e.g.:

. svmat R
number of observations will be reset to 9
Press any key to continue, or Break to abort
obs was 0, now 9

If -quietly- or -capture- is applied, the text is not displayed, but
there is still a -more- condition, which pauses the execution of the
.do/.ado file, even if the dataset is empty (cleared with -clear-)
immediately before -svmat-.

Can this behaviour be changed somehow?

Currently, the only work around I've found is the following:

quietly {
     clear
     set obs `=rowsof(R)'
     generate junk=_n
     svmat R
     drop junk
}

Note that even if the number of observations is set to the number of
rows in R, it is not sufficient for some reason to avoid the
confirmation. There must be a variable in the dataset. Can somebody
advise a shorter piece of code?

It would be great if -svmat- got an option e.g. -,batch- which
suppresses all interactivity. This would be in line with -save,
replace- and -use, clear-.

Stata MP for Windows v10.1 build 545.
which svmat==>*! version 2.1.1 17dec2003

Thank you,
   Sergiy Radyakin
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index