OR
destring [varlist] , replace
Note that you must specify one of the two options
----------------------------------------------------------------------------
----
*From "Maoyong Fan" <[email protected]>
To "statalist" <[email protected]>
Subject st: Is there a simple way to change the storage type from str to
numerical
Date Sun, 11 Jul 2004 22:25:00 -0800
----------------------------------------------------------------------------
----
Dear Friends:
I want to change the storage type of a variable in my dataset from
str to numerical. I have tried
recast int admit_major, force
recast2 int admit_major, force
but get the error message
admit_major: int invalid
r(109); t=0.01 22:18:01
The variable admit_major is string type and looks like:
1
3
4
5
.
.
.
To generate a new variable is a way out. Could anyone give a simpler way
for this?
Warm regards,
Maoyong
*
* 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/