data task;
input id date date9. visit;
cards;
101 01jan2015 1
101 02jan2015 2
101 06jan2015 3
102 04jan2015 1
102 07jan2015 2
102 12jan2015 3
103 06jan2015 1
103 13jan2015 2
;
run;
write a program to find out missing dates between visits by each subject.
data task;
input id date date9. visit ;
cards;
101 01jan2015 1
101 02jan2015 2
101 06jan2015 3
102 04jan2015 1
102 07jan2015 2
102 12jan2015 3
103 06jan2015 1
103 13jan2015 2
;
run;
Answer
data task1;
set task;
by id;
date1=lag(date);
if first.id ne 1 then x=date-date1;
run;
proc print; run;
proc transpose data = task out = b;
var date;
by id;
run;
data new;
set b;
x=col2-col1;
y=col3-col2;
run;
proc print; run;
| Is This Answer Correct ? | 0 Yes | 0 No |
Below is the table. Required to be output should be the highest number of each student_id. Example. Student_id Subject Marks 1 Hindi 86 2 Hindi 70 3 English 80 . Calculate sum and average marks for each group of student_id Example. Student_id Subject Marks Total Marks Average 1 English 40 181 60.33333 2 English 67 196 65.33333 3 English 80 160 53.33333 PLEASE PROVIDE THE CODE OF ABOVE PROBLEMS
What is the order of evaluation of the comparison && logical && relational operators:?
what is cummaltive frequency,and varience in proc unviarte
Have you been involved in editing the data or writing data queries?
1 Answers BioServe, Oracle, Sasken,
i am importing large data from oracle to work library. in log there is a error message worklibrary space is not enough. then how to import the data safely to sas environment.
explain what is factor analysis? : Sas-administrator
what is sas business intelligence? : Sas-bi
Tell me about % include and % eval? : sas-macro
What statement do you code to write the record to the file?
Name and describe three SAS functions that you have used, if any?
What do the SAS log messages "numeric values have been converted to character" mean?
Enlist the syntax rules followed in sas statements.