[心得] SAS

看板FJU-Stat97A作者 (最強一行文)時間15年前 (2010/05/21 11:21), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
data seth; input student $ score; cards; x1 30 x2 70 x3 90 x4 10 x5 80 x6 60 x7 50 x8 40 x9 75 x10 100 ; proc print; run; ------------------------------------ DATA student_score; INPUT name $ score1 score2 score3 ; avg=(score1+score2+score3)/3; CARDS; Susan 85 66 30 Tome 90 85 86 Mary 100 40 20 Helan 60 60 65 ; PROC PRINT ; DATA student; set student_score; if(avg>60)and(score3<60); PROC PRINT; RUN; ------------------------------------- option nodata; Libname seth"C:\libr"; DATA seth.mary; INPUT name $ score1 score2 score3 ; avg=(score1+score2+score3)/3; CARDS; Susan 85 66 30 Tome 90 85 86 Mary 100 40 20 Helan 60 60 65 ; PROC PRINT ; DATA student; set student_score; if(avg>60)and(score3<60); PROC PRINT; RUN; -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.136.162.66
文章代碼(AID): #1BzVmUJp (FJU-Stat97A)