Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: transposing rows


From   "Neil Shephard" <nshephard@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Re: transposing rows
Date   Wed, 7 Mar 2007 10:26:25 +0000

Personally I wouldn't trust Excel for data management (or anything
else for that matter).

Stata can handle this for you, and doesn't have the 256 variable
limits (although there are limits imposed depending on the flavour of
Stata you are using).  Save the Excel sheet as .csv and -insheet- it
into Stata.  Then use the -xpose- command to transpose your data (see
-man xpose-).

For future reference using the -findit- command (or indeed -search-)
to look for help on a given topic would have lead you to this
solution.

Neil

On 3/7/07, Sergiy Radyakin <Radyakin@aoek.uni-hannover.de> wrote:
Hi,

If your data are stored in Excel, you can transpose it in Excel -- copy,
paste special, choose transpose as an option, done.
Note that you are limited to 256 variables though (A,B,...,IV)

Best regards,
   Sergiy

----- Original Message -----
From: <agostino@unical.it>
To: <statalist@hsphsun2.harvard.edu>
Sent: Wednesday, March 07, 2007 11:11 AM
Subject: st: transposing rows


>
> Dear all,
> my data are stored in an excel file where each row contains a variable and
> each column represents a year, as follows:
>
>
>                               1994 1995 1996 1997
>
> TOTAL SALES                   844854 949870 956692 876844
> DEPRECIATION                  NA 38477 39937 36588
> DEPN                     NA NA NA NA
> OPERATING PROFIT              52971 93029 93613 112022
>
>
> I need to transpose the rows so that each variable is contained in a
> column
> and each row represents a year. In other words I need to get:
>
> TOTAL SALES DEPRECIATION DEPN    OPERATING PROFITS
> 1994
> 1995
> 1996
> 1997
>
>
>
> Does anyone know how STATA can do it?
> Thanks for your help
>
> Mariarosaria
>
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


--
"Every great advance in natural knowledge has involved the absolute
rejection of authority."  - Thomas H. Huxley

Email - nshephard@gmail.com / neilshep@cyllene.uwa.edu.au
Website - http://slack.ser.man.ac.uk/
Photos - http://www.flickr.com/photos/slackline/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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