Wondering how this following can be done in base SAS. I've got the following code.
libname SASData '/folders/myfolders/Datafiles';
data chap9ques6;
set SASData.medical(keep=VisitDate);
DayOfWeek = weekday(VisitDate);
run;
proc format;
value Days 1='Sunday' 2='Monday' 3='Tuesday' 4='Wednesday' 5='Thursday' 6='Friday' 7='Saturday';
run;
proc freq data=chap9ques6;
tables DayOfWeek /nocum nopercent missprint;
Format DayOfWeek Days.;
run;
Which produces an acceptable result like this.
The FREQ Procedure
DayOfWeek Frequency
Sunday 1
Monday 1
Thursday 1
Friday 1
Saturday 2
when used with the sample SAS data. What I'd like to to is include the other weekdays in the list even though they don't have matching rows. "Tuesday 0 Wednesday 0"
How can I include those rows in the final output?