Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Destringing alphanumeric string variables
From 
 
Austin Nichols <[email protected]> 
To 
 
[email protected] 
Subject 
 
Re: st: Destringing alphanumeric string variables 
Date 
 
Tue, 25 Jan 2011 12:49:52 -0500 
Dmitriy Krichevskiy <[email protected]>:
drop if mi(real(V1))
On Tue, Jan 25, 2011 at 12:34 PM, Dmitriy Krichevskiy
<[email protected]> wrote:
> 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
*
*   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/