作者joyce771199 (姿颖)
看板Statistics
标题[程式] SAS 指令,如何留下重复值
时间Wed Apr 15 16:12:31 2020
[软体程式类别]:SAS
[程式问题]:资料处理
[软体熟悉度]:
新手
[问题叙述]:
跑资料库时想留下同一个案name变项的所有资料
,只单做一次的个案删除
不知道程式码应该如何下手填写
[程式范例]: 无
如果有熟悉软体之强者帮助会十分感激
-----
Sent from JPTT on my Google Pixel 4 XL.
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 220.128.139.121 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Statistics/M.1586938356.A.C3F.html
1F:推 anniecs: proc sql; 04/16 02:01
2F:→ anniecs: create table MoreThanOne as 04/16 02:01
3F:→ anniecs: select * 04/16 02:01
4F:→ anniecs: from OldData 04/16 02:01
5F:→ anniecs: where name not in 04/16 02:01
6F:→ anniecs: (select name from Oldata group by name having count(* 04/16 02:01
7F:→ anniecs: )=1); 04/16 02:01
8F:→ anniecs: quit; 04/16 02:01
9F:推 mkopl: 先sort,然後筛not(first.id =1 & last.id =1) 04/16 18:52
10F:推 ninjaying: proc sort nouniquekey 04/19 12:45
11F:推 j1990312: m大是对的,我记得要再加上 by id 04/23 12:19