Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Tabout


From   "Ana R. Rios" <arorigal@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Tabout
Date   Tue, 22 May 2007 14:25:55 -0700 (PDT)

Ian,

Thank you for your suggestions.  

Adding c:\ before the file name solved the file
locking problem. That is,
 
tabout location gender using c:\results.txt,replace

I have been reading the "tabout" manual and I
understand that Summary with SE or CI can only be
created for svyset data.  Please let me know if there
is a way to create a Summary with SE without the
survey option.

Thanks,

Ana Rios


--- Ian Watson <mail@ianwatson.com.au> wrote:

> Dear Ana
> 
> The problem you face occurs because of how Mata
> sometimes locks files.
> The other most common problem with locking files is
> due to having the
> text file open in an application like Excel when you
> are outputing from
> Stata (that's the reason for the error message
> saying what it does).
> 
> The code below (between the snip marks) will solve
> this problem. Cut and
> paste it into an editor, and save it as
> closeallfiles.ado in your
> personal ado directory.
> 
> Next time you get a problem with file locking, just
> type:
> 
> closeallfiles
> 
> at the Stata command line.
> 
> 
> Regards
> 
> Ian
> 
> 
> 
> snip===========
> 
> program closeallfiles
>  	 version 9
> 
>  	 forvalues i=0(1)50 {
>  		    capture mata: fclose(`i')
>  	 }
> end
> 
> snip===========
> 
> Rios Galvez, Ana R wrote:
> > I am trying to use the "tabout" command and I am
> getting the following error
> > messages:
> >
> > tabout location gender using results.txt,
> > (note: file results.txt not found)
> > file results.txt could not be opened
> >                  fopen():   603  file could not be
> opened
> >              write_tab():     -  function returned
> error
> >                wrap_up():     -  function returned
> error
> >              do_output():     -  function returned
> error
> >                  <istmt>:     -  function returned
> error
> > r(603);
> >
> >
> >
> >
> > tabout location gender using results.txt,replace
> >
> > File results.txt
> > is already open inside another application.
> > Please close it before running tabout.
> >
> >
> > I do not have any file named "results". I have
> tried with several different
> > file names and I am still getting the same error
> message.
> >
> > Could someone please help?
> >
> > Thanks,
> >
> > Ana Rios
> *
> *   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/
> 



       
____________________________________________________________________________________Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index