Statalist


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

Re: st: Field Widths and Delimiters


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: Field Widths and Delimiters
Date   Fri, 9 Jan 2009 15:50:33 -0500

Prashant Shukla <[email protected]>:
Make the 7-character string a 10-character string if that is how long
you want it to be; see -help recast-.

On Fri, Jan 9, 2009 at 3:42 PM, Prashant Shukla
<[email protected]> wrote:
> Thanks a bunch Austin.
>
> I took the second route you prescribed and most of the steps worked
> perfectly. The only issue outstanding is that when I use -outfile- using
> the -runtogether- option to write the text file, a variable formatted as
> %10s but having an element only 7 characters long occupies only 7
> spaces. I want it to occupy the allocated space of 10 and then have the
> adjacent "|". To elaborate the issue furthermore, even though the format
> of the variable is %10s in the variables window the type column shows
> "str7" for the variable. I guess I want the type to be "str10".
>
> Of course, there are many such variables, with varying allocated and
> outputted lengths, in the file. What am I doing wrong here? Can you
> please recommend a way to correct this issue? Thank you so much.
>
> -Prash.
*
*   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