Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: Generating String variable containing `" & "'
From
"Dudekula, Anwar" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: Generating String variable containing `" & "'
Date
Mon, 6 Jan 2014 15:29:17 +0000
Hi ,
Thank you very much for your time and reply.I should have never set out to name a string variable with string label .
I tried destring and it worked. I used labmask. Thank you Nick for the information.
Thank you,
Yours Sincerely,
Anwar
________________________________________
From: [email protected] [[email protected]] on behalf of Nick Cox [[email protected]]
Sent: Monday, January 06, 2014 6:25 AM
To: [email protected]
Subject: Re: st: Generating String variable containing `" & "'
Anwar said that -x- is string. That being so, -destring- it first.
(I am relying here, necessarily, on the examples given being
sufficient to understand the problem.)
Nick
[email protected]
On 6 January 2014 11:15, Nick Cox <[email protected]> wrote:
> Your aim is misguided. A string variable cannot itself have string
> labels (or numeric labels for that matter). You can label the numeric
> values in -x- with the values of -y- as value labels. See
>
> -findit labmask-
>
> or
>
> -findit sencode-
>
> for possible solutions. Each application of -findit- will identifiy
> download sources and documentation for the program in question.
On 6 January 2014 11:09, Dudekula, Anwar <[email protected]> wrote:
>
>> This seems to be an obvious question but somehow , I am not able to get it .
>>
>> I have two string variables x , y as follows
>>
>> Index x y
>> 1 74170 COMPUTED TOMOGRAPHY, ABDOMEN; WITHOUT CONTRAST MATERIAL
>> 2 73725 MAGNETIC RESONANCE ANGIOGRAPHY, LOWER EXTREMITY
>> .
>> .
>> .
>> .
>> .
>> .
>> 1000
>>
>>
>> I want to generate a string variable z , in the following format corresponding the observations 1, 2 :
>>
>> label define singleDXCCSlabel 74170 `"COMPUTED TOMOGRAPHY, ABDOMEN; WITHOUT CONTRAST MATERIAL"', modify
>> label define singleDXCCSlabel 73725 `"MAGNETIC RESONANCE ANGIOGRAPHY, LOWER EXTREMITY"', modify
>> .
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/