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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: string to numeric format


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: string to numeric format
Date   Sun, 7 Mar 2010 18:21:46 +0100

<>

*******
h tostring
*******


HTH
Martin

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Calchas Calchas
Sent: Samstag, 6. März 2010 20:32
To: statalist@hsphsun2.harvard.edu
Subject: st: string to numeric format


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/


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