作者seth0921 (最強一行文)
看板FJU-Stat97A
標題[心得] SAS
時間Fri May 21 11:20:59 2010
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