Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: single spaces in outfile


From   "Nick Winter" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: single spaces in outfile
Date   Wed, 14 Aug 2002 17:36:23 -0400

> Laura Miller <[email protected]> wrote
> 
> I am using the outfile command to output a file with nine variables.
> They are
> all of fixed width but some are string and some are numeric. My
> problem is when
> it outputs the file it leaves several spaces between the variables. I
> need it to
> leave just one space between them (for inputting to another program).
> I know the
> runtogether option allows for no spaces. Is there a command that
> creates just
> one space between the variables?
> 

Not to beat a dying horse, but you could also create a string variable
that consists of a single space,and use that to space out your
variables, with the runtogether options:

  gen str1 space=" " 
  outfile var1 space var2 space var3 space var4 using <filename>,
runtogether

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