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
Hi,by usining ptf how we have to combine (likr merge)10 datasets at a time in the oracle database(and write a macro code also)?Like this i have a douts a lot if you dont mind may please send one text mail for me(madhusudhanap16@gmail.com)?
what techniques and/or procs do you use for tables? : Sas programming
How to import multiple xls files into sas. Out of those files, how to get different values from a single variable and how to find number of rows per value type? We can do this using group by for one xls file with proc sql. Was wondering how I can achieve this for multiple files at the same time. Any ideas?
Tell me more about the parameters in macro? : sas-macro
What is the function of Stop statement in a SAS Program?
How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?
what is hierarchy flattening? : Sas-di
how will you location sas platform applications available from web browser? : Sas-bi
What is SAS informats?
what is sas metadata repository? : Sas-bi
what is the function of catx syntax? : Sas-administrator
What are the different servers in sas? : sas-grid-administration
Describe a time when you were really stuck on a problem and how you solved it?
What is the difference between class statement and by statement in proc means?
what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming