Re: [問題] 如何切割重複資料

看板Statistics作者 (囧)時間10年前 (2013/08/16 23:48), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
data test; input id sex score; cards; 1 1 60 2 1 78 3 2 77 1 1 70 1 1 66 3 2 59 ; run; proc sort data=test out=test; by id sex; run; data test1; set test; by id sex; if first.id=1 and last.id=1 and first.sex=1 and last.sex=1 then output; run; data test2; set test; by id sex; if not (first.id=1 and last.id=1 and first.sex=1 and last.sex=1) then output; run; ※ 引述《leo20090401 (花花超人)》之銘言: : 簡言之直接舉例 : input id sex score : cards; : 1 1 60 : 2 1 78 : 3 2 77 : 1 1 70 : 1 1 66 : 3 2 59 : ;run; : 想切成兩塊1.有重複2無重複共兩個檔 : 有重複資料集 : 1 1 60 : 1 1 70 : 1 1 66 : 3 2 77 : 3 2 59 : 無重複資料集 : 2 1 78 : 感謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.255.243.39
文章代碼(AID): #1I3ad29p (Statistics)
文章代碼(AID): #1I3ad29p (Statistics)