這篇文章主要介紹了PROC SQL中邏輯判別和描述性統(tǒng)計函數(shù)怎么用,具有一定借鑒價值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。
成都創(chuàng)新互聯(lián)憑借專業(yè)的設計團隊扎實的技術(shù)支持、優(yōu)質(zhì)高效的服務意識和豐厚的資源優(yōu)勢,提供專業(yè)的網(wǎng)站策劃、成都做網(wǎng)站、成都網(wǎng)站建設、網(wǎng)站優(yōu)化、軟件開發(fā)、網(wǎng)站改版等服務,在成都十載的網(wǎng)站建設設計經(jīng)驗,為成都近1000家中小型企業(yè)策劃設計了網(wǎng)站。1.邏輯表達:>,<,!=,....
*data step; data class_flags; set sashelp.class; tall = (height > 60); male = (sex = 'M'); female = (sex = 'F'); run; *proc sql; proc sql; select name, (height > 60) as tall, (sex = 'M') as male, (sex = 'F') as female from sashelp.class; quit;
2.描述性統(tǒng)計函數(shù)sum(),mean(),....
proc sql; select sex, max(height) as max_ht, mean(weight) as mean_wt from sashelp.class group by sex; quit; proc sql; select age, max(height*height/weight) as max_body_mass_index from sashelp.class group by age; quit;
3.聯(lián)合使用
proc sql; select max(height > 60) as any_tall, mean(weight > 100) as pct_heavy, sum(gender = 'F') as num_female from sashelp.class; quit;
proc sql; select sex, max(height > 60) as any_tall, mean(weight > 100) as pct_heavy from sashelp.class group by sex; quit;
感謝你能夠認真閱讀完這篇文章,希望小編分享的“PROC SQL中邏輯判別和描述性統(tǒng)計函數(shù)怎么用”這篇文章對大家有幫助,同時也希望大家多多支持創(chuàng)新互聯(lián)網(wǎng)站建設公司,,關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,更多相關(guān)知識等著你來學習!