data voter;
input Age Party : $1. (Ques1-Ques4)($1. + 1);
datalines;
23 D 1 1 2 2
45 R 5 5 4 1
67 D 2 4 3 3
39 R 4 4 4 4
19 D 2 1 2 1
75 D 3 3 2 3
57 R 4 3 4 4
;
Idont understand what the (Ques1-Ques4)($1. + 1) means.
I have seen (Ques1-Ques4)(4*$1.), but what is
(Ques1-Ques4)($1. + 1)?
Appreciate all help
Thanks
Answers were Sorted based on User's Feedback
Answer / nbohr02
You are read data for a 4 question poll
(Q1-Q4) is an arrary ($1. is the format of each element
+1) tells sas to increment the array index for each line.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / tsk
You are read data for a 4 question poll
(Q1-Q4) is an arrary ($1. is the format of each element
+1) tells that space b/n the each and every variable called
q1 ,q2 ,q3 ,q4.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / naveen
In this example you have to read the data after the party
variable specifying the numeric variables (Ques1-Ques4).
This way is possible only for numeric variables. $1.
specifying the column range(width of the data value) and +1
refers to eliminate the non required data.
| Is This Answer Correct ? | 1 Yes | 0 No |
Hi, I have one dataset like id date ex: id date 1 13 1 13Oct2011 2 14 2 14Oct2011 3 15 3 15Oct2011 --->this is the current date here i want date format like 13Oct2011,14Oct2011 how we can modify the numeric to date format plz answer.
Explain append procedure?
If reading a variable length file with fixed input, how would you prevent SAS from reading the next record if the last variable didn?t have a value?
which date functions advances a date time or date/time value by a given interval? : Sas programming
What do you feel about hardcoding?
In the flow of DATA step processing, what is the first action in a typical DATA Step?
how do u test a pros sql(works or not) without executing it?
If you have a dataset that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variables?
what type of graphs we will create(for 2+years candidates)?
Can anyone help me about SAS Realtime scenarios in Clinical field
what is SAS/Access and SAS/Connect?what are the uses?
what is intially documentation in sas?