***********************************************; * f=sasmanual\clinq_bastech.sas *; * *; * Clinical data * * IV. Manipulating the data (basic techniques)*; ***********************************************; options linesize=min; libname mydir 'c:\My Documents\My SAS Files\sasmanual\data'; data one; set mydir.clinical; if pregnant='1' and gender='F'; run; proc freq data=one; tables pregnant * gender; title1 'The simulated clinical data from the SAS manual'; title2 'Subset of pregnant females'; run; data two; set mydir.clinical (keep=id sbp dbp hr); run; proc contents data=two; title2 'Subset of 4 variables'; run; data three; set mydir.clinical (obs=15); run; proc contents data=three; title2 'Subset of 15 observations'; run; title1; title2; proc freq data=mydir.clinical; tables pregnant * vitamins; run; proc format; value $pregnew '1' = '3+mos. pregnant' '0' = 'LT 3 mos. pregnant'; run; data clin; set mydir.clinical; label vitamins = 'Patient on vitamin therapy'; run; proc freq data=clin; tables pregnant * vitamins; format pregnant $pregnew.; title1 'The simulated clinical data from the SAS manual'; footnote1 'Customizing output'; run;