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
Answer Posted / 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 |
Post New Answer View All Answers
what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming
what are _numeric_ and _character_ and what do they do? : Sas programming
how do you want missing values handled? : Sas programming
Explain how merging helps to combine data sets.
how does sas handle missing values in a merge? : Sas programming
why is sas data integration studio important? : Sas-di
How to limit decimal places for the variable using proc means?
what can you learn from the sas log when debugging? : Sas programming
what is proc Index? and what is proc document?
what do the mod and int function do? What do the pad and dim functions do? : Sas programming
what is the basic structure sas administrator? : Sas-administrator
what is broad cast agent? : Sas-bi
If you use a symput in a data step, when and where can you use the macro variable? : sas-macro
What does PROC print, and PROC contents do?
What will calendar procedure do?