Statalist


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

Re: st: Number of characters in a variable label


From   Alan Neustadtl <alan.neustadtl@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Number of characters in a variable label
Date   Mon, 15 Feb 2010 11:15:07 -0500

This is a great tip.  Now, is there anyway to suppress the line split
character ">" from being inserted?

For example:

***** Stata Output from Maarten's Example *****
. di `" `rep78[foo]' "'
 This is a very long "label", which in your case would be the question. I am go
> ing to continue to write just to show how long it can get.
***** END *****


On Mon, Feb 15, 2010 at 10:44 AM, Maarten buis <maartenbuis@yahoo.co.uk> wrote:
> --- Mosi Ifatunji wrote:
>> Unfortunately this has not solved the problem. I know
>> "needing/wanting" more than 80 characters is not the norm for
>> a variable label, but I am looking to generate a printout
>> with the original questions and some basic frequency
>> distributions.
>
> --- On Mon, 15/2/10, Nick Cox  answered:
>> Not so. As the thread flagged by Eric does clearly indicate,
>> characteristics may be used for this purpose; and you may
>> -display- them at any time in a session.
>
> Just to reinforce this with an example:
>
> *------------------------ begin example -----------------
> sysuse auto, clear
> char rep78[foo] `"This is a very long "label", which in your case would be the question. I am going to continue to write just to show how long it can get."'
>
> // to display the "question" followed by the frequencies you type:
> di `" `rep78[foo]' "'
> tab rep78
>
>
> // this label is longer than 80 characters:
> di length(`"`rep78[foo]'"')
> *---------------------- end example -----------------------
>
> Hope this helps,
> Maarten
>
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
>
> http://www.maartenbuis.nl
> --------------------------
>
>
>
>
> *
> *   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/
>

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