title 'Lifeboats on the Titanic'; /* from the Board of Trade (1912) "Report on the Loss of the S.S. Titanic", p, 38 */ proc format; value $side 'p'='Port' 's'='Starboard'; value period 0='Early' 1='Middle' 2='Late'; data lifeboat; input launch time5.2 side $ boat $ crew men women; total = sum(crew, men, women); format launch hhmm. side $side.; port = (side='p'); int = launch * port; select (boat); when ('C', 'D') cap=47; when ('1', '2') cap=40; otherwise cap=65; end; label launch='Launch Time' side = 'Side' boat = 'Boat label' crew = 'Men of crew' men = 'Men passengers' women = 'Women and Children' cap = 'Boat capacity' total = 'Total loaded'; datalines; 0:45 p 7 3 4 20 0:55 p 5 5 6 30 1:00 p 3 15 10 25 1:10 p 1 7 3 2 1:20 p 9 8 6 42 1:25 p 11 9 1 60 1:35 p 13 5 0 59 1:35 p 15 13 4 53 1:40 p C 5 2 64 0:55 s 6 2 2 24 1:10 s 8 4 0 35 1:20 s 10 5 0 50 1:25 s 12 2 0 40 1:30 s 14 8 2 53 1:35 s 16 6 0 50 1:45 s 2 4 1 21 1:55 s 4 4 0 36 2:05 s D 2 2 40 ; proc rank out=lifeboat groups=3; var launch; ranks period; by side; run;