

I am trying some very basic SAS programs. It calculates the average of scores obtained in 4 subjects. One of the scores is missing in an observation and hence the average is not getting calculated. How do I overcome this?
I have attached a screenshot of my code and output. It is extremely simple. Kindly help.
data scores;
infile "/folders/myfolders/71442_example/scores.txt";
input gender $ english
math
history
science;
avg = (english + math + history +science)/4;
run;
proc print data=scores;
run;
This is the data:
M 80 82 85 88
F 94 92 88 96
M 96 88 89 92
F 95 . 92 92