Date: Thu, 25 Jul 1996 13:46:05 +0300 Dvora Zomer "SAS(r) Discussion" Dvora Zomer Re: help!!! To: Wei Jin <31ED16F2.41FC@mhs.unc.edu>

Hi, Jin: I just read your mail. The first idea is to try something like that: data ... ; ... array recode(2,100) (1 9 2 13 3 27 ......) ; /* for 100 values */ do i=1 to 100 ; if a=recode(1,i) then do; b=recode(2,i) ; goto endcode ; end; end; endcode: ; .................

I'm sure that it will work, but I'm not sure that it is the best solution.

Yours, Ilya Novikov Ph.D. Senior Statistician Dept. of Clinical Epidemiolody Chaim Sheba Medical Center, Ramat Gan Israel

On Wed, 17 Jul 1996, Wei Jin wrote:

> I met a problem about converting one variable to the other. Say, > I have variable A which has possible value "1,2,3...." and I would > like to creat variable B which has possible value "9,13,27,...". there > seems no mathematic connection between the two group of value except > if A=1 then B=9, if A=2 then B=13 etc. I have 100 value in each group. > Is there any "elegant" way to do the convertion other than 100 if-then > clause? > > Thanks in advance. > > Jin >

Back to: Top of message | Previous page | Main SAS-L page