討論串[問題] SAS資料處理
共 19 篇文章

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者liton (歐吉桑留學生)時間17年前 (2009/02/03 23:40), 編輯資訊
0
0
0
內容預覽:
data output;. set xxxx;. by id x1;. lag_id=lag(id);lag_x1=lag(x1);. if id eq lag_id and x1 ne lag_x1 then output;. else if last.x1 then output;. end;.

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者west1996 (焦了六年變脆了)時間17年前 (2009/02/03 12:05), 編輯資訊
0
0
0
內容預覽:
data XXXX;. retain flag;. set XXXX;. by id;. if first.id then flag=0;. if x1=1 and flag=0 then. do;. flag=1;. output;. end;. if last.id and flag=0 the
(還有52個字)

推噓1(1推 0噓 1→)留言2則,0人參與, 最新作者kenshin528 (成立奧凶帝國!!)時間17年前 (2009/01/24 16:01), 編輯資訊
0
0
1
內容預覽:
%macro com;. %do companyy=10001 %to 90000; IF (COMPANY=&companyy); OUTFILE= "E:\&companyy..txt"%end;%mend;. %com;. --. (C)lass 【 分組討論區 】. 11 卡漫夢工廠 卡通,
(還有107個字)

推噓1(1推 0噓 2→)留言3則,0人參與, 最新作者fansPC (1111)時間17年前 (2009/01/23 11:53), 編輯資訊
0
0
0
內容預覽:
我現在有一筆容量蠻大的資料(3GB多),. 想依照分類將他們分割成很多個.txt檔。. LIBNAME SB 'D:\[Sto]';. DATA sto;. set SB.aaaaa;. IF (COMPANY=10001);. RUN;. PROC EXPORT DATA= WORK.sto. O
(還有86個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者tew (咖啡王子)時間17年前 (2008/08/07 13:57), 編輯資訊
0
0
0
內容預覽:
用推文的好像有點失敗. 利用retain 這個指令. retain order1 0;. if orser=1 then order1=response;. 這樣應該就能滿足你的需求. 另外 你的例子 不容易懂. SUBJECT FAMILY ORDER RESPONSE. 1501101 1 1
(還有312個字)