Date: Fri, 9 Mar 2001 08:30:04 -0500
Reply-To: Mike Tonkovich <Takeadoe@FROGNET.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mike Tonkovich <Takeadoe@FROGNET.NET>
Subject: padding with zeros
Content-Type: text/plain; charset=us-ascii
I'm sure some of you will have this answered before I even log off.
These are the data for a variable call X. The 1s and 0s actually
represent yes and no answers, respectively to 5 questions. The general
nature of the question in the survey
was "check all that apply." So for the first record, the only choice
that applied was
the 5th one and the person answered the question with a "no." My
question is as follows: I want to create 5 new variables from this 1
variable. My initital thought was to somehow pad with 0s and then use
the substring function and so on. Would
anybody care to offer a suggestion on how I might more effectively do
this? I would greatly appreciate it. I need to do this
to a dozen or so variables.
Regards,
Mike Tonkovich
0
11010
1101
111
|