由买买提看人间百态

topics

全部话题 - 话题: sort1
(共0页)
w********n
发帖数: 33
1
来自主题: Statistics版 - 包子再求sas code~
ID重复的次数是不等的,time也没有规律,现已经proc sort by ID,time成以下格式:
ID time
B 04/16
B 04/23
B 04/23
G 05/02
G 05/11
G 06/01
G 06/01
H 09/01
H 10/31
H 11/23
... ...
现在要加三列虚拟的排序变量 sort1 sort2 sort3:
ID time sort1 sort2 sort3
B 04/16 1 1 1
B 04/23 1 2 2
B 04/23 1 2 3
G 05/02 2 1 1
G 05/11 2 2 2
G 06/01 2 3 3
G 06/01 2 3 4
H 09/01 3 1 1
H ... 阅读全帖
s******r
发帖数: 1524
2
来自主题: Statistics版 - 包子再求sas code~
data new;set old;by id time;
retain sort1 sort2 sort3;
if first.id then do;
sort1=max(sort1,0)+1;
sort2=1;
sort3=1;
end;
else do;
sort3=sort3+1;
if lag(time) ne time then sort2=sort2+1;
end;
run;

式:
S****S
发帖数: 293
3
One postdoctoral scholar and one junior scientist position are available
immediately in the Division of Gastroenterology, Hepatology and Nutrition of
the Department of Medicine at the University of Minnesota, Twin Cities.
Required/Preferred Qualifications:
Ph.D. required, or M.D.
More than three years of post-graduate research experience in the fields of
liver cancer, metabolic diseases, microRNA, and RNA drug delivery.
At least one first-author publications in top-tier journals.
Skills in molec... 阅读全帖
l**c
发帖数: 65
4
来自主题: Fashion版 - 请推荐men's wallet
谢谢上面的各位了
请JJMM在看看下面的这个网站可信吗,怎么会这么便宜?有人在这个网站上买过吗?不
过好像没有男士的钱包啊
http://www.fashionales.com/Product_List.asp?id=6&sort1=6&sort2=6&all=all&price_id=0
h*******e
发帖数: 8370
5
来自主题: PhotoGear版 - 【WTB】Canon EF 35mm f/2
不是啦。。。。
他们家东西都是有名字没stock
其实现在在卖的相机只有一个sony的。其他的只有 profile,没货的。
不然我把丫所有的佳能头都给扫了,外加一个N家14-24。
http://www.mobilepc.com/Brands/Specials?search=lens&sort1=Item_
h********o
发帖数: 103
6
来自主题: Statistics版 - 包子再求sas code~
data new;
set old;
by ID time;
if first.ID then do;
sort1 + 1;
sort2 = 1;
sort3 = 1;
end;
else do;
sort3 + 1;
if lag(time) ^= time then sort2 + 1;
end;
run;
(共0页)