Statalist The Stata Listserver


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

st: RE: outsheet or outfile display


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: outsheet or outfile display
Date   Tue, 24 Oct 2006 18:09:24 +0100

This would be most un-Stataish and it would be in my view 
be bad style for StataCorp to allow this with -outsheet-
or -outfile-, regardless of whether this is a format that
is acceptable or congenial downstream. But you could program 
it yourself fairly easily. The best way that occurs to 
me is to use -outsheet- or -outfile- to produce a file, 
and then just read in that file once more and spit it 
out again with extra intercalated lines. 

... if !mod(count, s) 

picks up every s th line. That is, the task doesn't 
or shouldn't require a hit on -outsheet- or -outfile- 
code but could just be treated as a twist on copying a file. 

However, if you want tabs or commas in corresponding places, 
that would need to be part of the twist. 

Nick 
n.j.cox@durham.ac.uk 

Michael McCulloch
 
> -list- has a nifty option, -sepby()-, that allows me to list 
> data separated 
> with lines between a variable, in this case a date:
> 
> .list  ini dxage sex race datetx, noobs sepby(datetx)
> VJ 68 male asian November, 1993
> ------------------------------------------------
> HM 59 male white December, 1993
> IT 47 male white December, 1993
> MO 76 male white December, 1993
> WC 74 male white December, 1993
> ------------------------------------------------
> AW 61 male white January, 1994
> +------------------------------------------------+
> 
>  From reading the help files, I don't see that there is a way 
> to do this 
> using outsheet or outfile. Is it possible to output such a 
> table to a file 
> that can be read by Microsoft Excel or Word?

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