Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: export count result into excel


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: export count result into excel
Date   Wed, 20 Apr 2011 20:35:58 +0100

-count- is a useful command, but you are better off with

tab market1 if opcar1 == "AA"

Others might want to advise on congress with MS Excel.

Nick

On Wed, Apr 20, 2011 at 8:15 PM,  <dluo1@uci.edu> wrote:
> Hi statalist,
>
> Is there any way I can transfer below table into excel file without
> copying and pasting from the stata screen? My command is to count by
> market how many  American Airline(AA) appear in each market.
>
> . by market1, sort:count if opcar1 == "AA"
>
> -> market1 = 1
> 0
>
> -> market1 = 2
> 0
>
> -> market1 = 3
> 0
>
> -> market1 = 4
> 0
>
> -> market1 = 5
> 0
>
> -> market1 = 6
> 0
>
> -> market1 = 7
> 0
>
> -> market1 = 8
> 0
>
> -> market1 = 9
> 26
>
> -> market1 = 10
> 32
>
> -> market1 = 11
> 0
>
> ...
>
> Thanks!
>
>
> Dan Luo
> PhD in Economics
> University of California, Irvine
>
>
> *
> *   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   |   Site index