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

Re: st: RE: destring

From   P chrisman <>
Subject   Re: st: RE: destring
Date   Wed, 01 Aug 2007 21:38:22 -0700

A HUGE thanks to Nick to his help!!!!

Nick Cox wrote:
I posted a quasi-tutorial on this general area a short while back. It may help understanding of the numeric <-> string conversion problems (and they are problems, not a single

There is no reason why -encode- should not be used. String variables can have embedded numeric characters. That's absolutely no reason against using -encode-. It may not help much but it is legal and a practical
Otherwise, I think you need to look for substrings like "200 MG/ML" using -strpos()- (-index()- in old Stata versions). The string functions are
your friend here.
strpos(drug_1, "200 MG/ML")
will be positive if "200 MG/ML" is included and
zero otherwise.
-destring- is no use to you at all.
I don't understand what an "explore variable" is. Explanatory?
*   For searches and help try:

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