Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: Recast string to numeric?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: Recast string to numeric?
Date   Tue, 18 Oct 2005 10:20:34 +0100

Note also that even a despairing 

. search string 

would -- amid several false positives to be sure -- point to relevant material. 

[U]     Chapter 23  . . . . . . . . . . . . . . . . . . . Dealing with strings
        (help functions, destring)

[D]     destring  Convert string variables to numeric variables and vice versa
        (help destring)

FAQ     . . . . . . . . . . . . . . . . . .  Numeric variables input as string
        2/02    Stata is reading in my variables as string, whereas
                they should be numeric. What should I do?
                http://www.stata.com/support/faqs/data/allstring.html

SJ-2-3  pr0006  . . . . . . . . . . . . Speaking Stata: On numbers and strings
        Q3/02   SJ 2(3):314--329                                 (no commands)
        explains the use of numeric and string data types in Stata
        and how to convert from one kind to another

Nick 
[email protected] 

Michael Blasnik
 
> -destring-
> 
> check out the ignore option to ignore the --
 
Terra Curtis

> > I have used a program called Stat Transfer to transfer a 
> dataset I had  saved
> > in Excel into a Stata .dta file.  The missing values in Excel were 
> > recorded
> > as "--" so Stata recognizes those variables as strings.  I 
> would like Stata
> > to recognize them as values; any datapoint not equal "--" 
> is a number. 
> > I've tried -recast- but I don't think this is what I want.  How 
> can I change 
> > the variable to be a number instead of a string?

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index