proc import datafile='world2.csv' dbms=csv out=world; run; data world; set world; label country=Country income=Income cont=Continent literacy=Literacy; run; proc report data=world(obs=10); column country income literacy; run; Country Income Literacy Albania 4937 98.7 Algeria 6799 69.8 Angola 2457 66.8 Argentina 12468 97.2 Armenia 3806 99.4 Australia 29893 99.9 Austria 31254 99.9 Azerbaijan 3968 98.8 Bahrain 18817 87.7 Bangladesh 1875 41.1 proc report data=world; column cont income,median; define cont/group; define income/analysis; run; Cont inen Income t median AF 1813 AS 4561 EU 19804 NA 6753 OC 14970 SA 5563.5 proc report data=world; column cont income,median; define cont/group width=9; define income/analysis format=8.0; run; Income Continent median AF 1813 AS 4561 EU 19804 NA 6753 OC 14970 data world; set world; un1945 = year(un_date) <= 1945; label un1945='Joined UN in 1945'; run; proc format; value yn 0='no' 1='yes'; run; proc report data=world; column cont un1945 income,median; define cont/group width=9; define un1945/across width=16; define income/analysis format=8.0; format un1945 yn.; run; Joined UN in 1945 Income Continent no yes median AF 44 3 1813 AS 33 8 4561 EU 23 11 19804 NA 3 12 6753 OC 2 2 14970 SA 2 10 5564 proc report data=world; column cont un1945 income,median; define cont/group width=9; define un1945/group width=16; define income/analysis format=8.0; format un1945 yn.; run; Joined UN in Income Continent 1945 median AF no 1771 yes 4072 AS no 3968 yes 5786 EU no 18370 yes 28938 NA no 7339 yes 6739 OC no 4177 yes 26918 SA no 5057 yes 6267 proc report data=world; column cont un1945 income,(n median); define cont/group width=9; define un1945/group width=16; define income/analysis format=8.0; break after cont/skip summarize ol; format un1945 yn.; run; Joined UN in Income Continent 1945 n median AF no 44 1771 yes 3 4072 --------- --------- --------- AF 47 1813 AS no 33 3968 yes 8 5786 --------- --------- --------- AS 41 4561 EU no 23 18370 yes 11 28938 --------- --------- --------- EU 34 19804 NA no 3 7339 yes 11 6739 --------- --------- --------- NA 14 6753 OC no 2 4177 yes 2 26918 --------- --------- --------- OC 4 14970 SA no 2 5057 yes 10 6267 --------- --------- --------- SA 12 5564 title 'Median Income and UN membership'; proc report data=world headline split='#'; column cont un1945 income,(n mean median); define cont/group width=9; define un1945/group width=16; define income/analysis n format=8.0; break after cont/suppress summarize dol skip; rbreak after /summarize dol skip; format un1945 yn.; label un1945='Joined UN#in 1945'; compute after; line ''; line 'Data obtained from Wikipedia'; endcomp; run; Joined UN Income Continent in 1945 n mean median ------------------------------------------------------------ AF no 44 3811 1771 yes 3 5228 4072 ========= ========= ========= 47 3901 1813 AS no 33 9443 3968 yes 8 6499 5786 ========= ========= ========= 41 8868 4561 EU no 23 18533 18370 yes 11 27130 28938 ========= ========= ========= 34 21314 19804 NA no 3 8153 7339 yes 11 10986 6739 ========= ========= ========= 14 10379 6753 OC no 2 4177 4177 yes 2 26918 26918 ========= ========= ========= 4 15548 14970 SA no 2 5057 5057 yes 10 6996 6267 ========= ========= ========= 12 6673 5564 ========= ========= ========= 152 10258 5894 Data obtained from Wikipedia