Statalist


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

st: RE: destring var, replace dpcomma


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: destring var, replace dpcomma
Date   Sun, 20 Apr 2008 21:14:20 +0200

-destring RMR , replace dpcomma- works perfectly for me. You need to provide more information. How did the data get there? 
For one, check that the variable is indeed called "RMR" and not var1, with the name "RMR" as the first observations. That is what happens when you paste these data into the data editor. 
Second, make sure these data are indeed aligned in the columns of your dataset. Pasting into the data editor, they sometimes cluster in the first column, and Stata cannot know what you mean.

Martin Weiss
_________________________________________________________________

Diplom-Kaufmann Martin Weiss
Mohlstrasse 36
Room 415
72074 Tuebingen
Germany

Fon: 0049-7071-2978184

Home: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1130

Publications: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1131

SSRN: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=669945

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Olga Lyashevska
Sent: Sunday, April 20, 2008 8:48 PM
To: [email protected]
Subject: st: destring var, replace dpcomma

Dear List,

My data contains comma's as decimal points.
It looks like:

 RMR     EV      T
5,48    6,1   12,7
6,13      6   12,7

I want to destring it and replace comma with a period.
I have tried the following but it doesnt work. I get an error r198
'Invalid syntax'.

destring RMR, replace dpcomma

Could you suggest anything?

Thanks in advance,
Olga

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


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