Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: Destringing alphanumeric string variables

From   Dmitriy Krichevskiy <[email protected]>
To   [email protected]
Subject   st: Destringing alphanumeric string variables
Date   Tue, 25 Jan 2011 12:34:37 -0500

Dear Statalisters,
I have a dataset which includes a string variable that I'd like
changed to numeric. the issue is some of the observations have a
non-numeric components. I would like to drop those observations that
are not numeric only. I cannot think of a way to do it either with
-destring-,  -encode-, or -substr()-. Below is the data example. As
always, all input is greatly appreciated.

ID   V1
1    99xx
2    1034
3    11456
4    33181
5    102xx
6    43xx
7    93127
8    642xx
Dmitriy Krichevskiy Ph.D. Candidate
Economics Department
Florida International University

Research Associate, College of Education
Lumina Foundation Project
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index