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

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: Replace string characters disregarding the position of the character in the string |

Date |
Fri, 22 May 2009 13:17:39 +0100 |

One answer is replace problemvar = subinstr(problemvar, ",", ".",.) but there is a better one. The underlying problem is presumably a clash of conventions on decimal points versus decimal commas. There is discussion at SJ-8-2 dm0036 . Stata tip 61: Decimal commas in results output & data input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox Q2/08 SJ 8(2):293--294 (no commands) tip on using commas as decimal separators for output and input In particular -destring, dpcomma- sounds like what you really want and gets you there in one. Nick n.j.cox@durham.ac.uk Ben Carpenter I`d really appreciate if someone could help me with a little string problem. I want to replace commas "," by dots ".". The "," occurs in different positions in the string such as 29,6 9,62 389,0 I`d like to convert this data to ... 29.6 9.62 389.0 (...in order to destring the data afterwards). Could anyone help me with this replace problem? * * 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/

**References**:**st: random effects panel model - interpretation of rho=0***From:*P K <statistics_2009@yahoo.de>

**st: RE: random effects panel model - interpretation of rho=0***From:*"Villa Lora, Juan Miguel" <JUANMIGUELV@Contractual.iadb.org>

**AW: st: RE: random effects panel model - interpretation of rho=0***From:*P K <statistics_2009@yahoo.de>

**RE: st: RE: random effects panel model - interpretation of rho=0***From:*"Villa Lora, Juan Miguel" <JUANMIGUELV@Contractual.iadb.org>

**st: Replace string characters disregarding the position of the character in the string***From:*"Ben Carpenter" <b.carpenter@gmx.de>

- Prev by Date:
**st: Replace string characters disregarding the position of the character in the string** - Next by Date:
**Re: st: Forest plot of hazard ratios** - Previous by thread:
**st: Replace string characters disregarding the position of the character in the string** - Next by thread:
**Re: st: random effects panel model - interpretation of rho=0** - Index(es):

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