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]

st: string to numeric format


From   Calchas Calchas <calchas@live.co.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: string to numeric format
Date   Sat, 6 Mar 2010 19:31:31 +0000

Hi,

New user of Stata - just started.

Just want to know how to change a column of numeric data to string data. 

Say, 0,1,2,3,4,5,0 (numeric) 

to

0,1,2,3,4,5,0 (string)

The resason why I am doing this is to, later on, change all the '0' into 'N'.

Also for a column of data, like:
0
1
2
3
4
5
0

how could I change it to row 0 1 2 3 4 5 0, i.e. a transpose? Is there a clever way of doing it in the stata data editor? clearly not by re-typing them as I have 65.5 thousand rows.

Many thanks
Calchas
 		 	   		  
*
*   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