Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Format labels in table command
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Format labels in table command
Date
Thu, 3 Apr 2014 00:01:10 +0100
Yes. You can always use -display- to display any text you want,
including numeric output.
Nick
[email protected]
On 2 April 2014 22:26, J. J. W. <[email protected]> wrote:
> thank you for your response. Is it possible to do this without
> generating a count variable?
2014-03-30 13:38 GMT+02:00 Nick Cox <[email protected]>:
>> In Stata a format is a display format applying to variables and
>> scalars. But we know what you mean. One of many ways is
>>
>> . sysuse auto
>> (1978 Automobile Data)
>>
>> . egen count = count(mpg) , by(foreign)
>>
>> . label var count "Number of cars"
>>
>> . tabdisp foreign, c(count)
>>
>> --------------------------
>> Car type | Number of cars
>> ----------+---------------
>> Domestic | 52
>> Foreign | 22
>> --------------------------
On 29 March 2014 22:36, J. J. W. <[email protected]> wrote:
>>> suppose I have the following command:
>>>
>>> table year, c(count length)
>>>
>>> How can I change the label of the count length column to: "Number of people"?
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/