Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: Removing commas & periods from numbers


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Re: Removing commas & periods from numbers
Date   Tue, 24 Jan 2006 21:39:14 -0000

In addition, check out -destring-. 

This is the same answer really, because
underneath the hood | bonnet, -destring-
is calling -subinstr()- to do the dirty
work. 

Nick 
n.j.cox@durham.ac.uk 

Friedrich Huebler
 
> No need for an ado file. See -help subinstr-.
> 
> replace var = subinstr(var,"$","",.)
 

Raphael Fraser 

> > Is there any ado file that can remove the following :
> > "$" , "," and "." from the data set below
> > For e.g.
> > 
> >         $690.00
> >      $1,000.00
> >      $1,000.00
> >      $7,000.00

*
*   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–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index