Statalist


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

RE: st: Number of characters in a variable label


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: Number of characters in a variable label
Date   Mon, 15 Feb 2010 15:44:29 +0000 (GMT)

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



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index