由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - find a number in a range using SAS
相关主题
[合集] 如何用SAS把几个colume的值连接在一起请教SAS LABEL问题。
问道SAS的题目About ID in sas
help-SAS 读data 问题one quick question about concatenating data in SAS
[合集] SAS一问,急~!求助, 读取大型数据的问题
I also have a SAS question.哭死,用SAS作logistic regression的coefficients为何全部和proc reg得到的相反??
[合集] 求助,怎样在SAS里读数据的column name?求助 FIND(), cat(), catx() 的用法
请教一个SAS BASE123的问题。请教 SAS import excel RANGE 的问题。
请教两道SAS变量长度的题目SAS question on find() function
相关话题的讨论汇总
话题: number话题: box话题: contents话题: range话题: find
进入Statistics版参与讨论
1 (共1页)
w********u
发帖数: 328
1
Box # Contents
1 09005332-09005344
2 09005357-09005368
3 09005783-09005795
4 09005772-09005782
5 09005842-09005833
6 09005830-09005841
7 09005310-09005320
8 09005321-09005331
9 09005345-09005356
10
11
12
of course, this list is extremely long, in the colume 'content', actually it
's a range from the first number(min) to the second number(max). now, i have
a couple of numbers, i want to find out which
b*****o
发帖数: 482
2
data a;
set a;
min=1*substrN(contents, 1, 8);
max=1*substrN(contents, 10, 18);
if min run;
l**********9
发帖数: 148
3

Oh!great code! Can it be shorter?

【在 b*****o 的大作中提到】
: data a;
: set a;
: min=1*substrN(contents, 1, 8);
: max=1*substrN(contents, 10, 18);
: if min: run;

w********u
发帖数: 328
4
i think i should use loop or sth. like that because i'm searching this
number row by row
and if i can find out which range the particular number is in, i want to
have its corresponding box # as a return, how can i do that?
only '.....then output' doesn't work. thanks.
l**********9
发帖数: 148
5
Y it doesn`n work? Do you mean you only want to out put box# without showing
Contents? Then you can try
data box(keep=box#)
....
..
.
this data set will only contain the 'box#'
w********u
发帖数: 328
6
thanks a lot!!
1 (共1页)
进入Statistics版参与讨论
相关主题
SAS question on find() functionI also have a SAS question.
工作5年半后 工资应该多少?[合集] 求助,怎样在SAS里读数据的column name?
a sas problem find function请教一个SAS BASE123的问题。
请大家进来帮我看看 这两家培训SAS的公司请教两道SAS变量长度的题目
[合集] 如何用SAS把几个colume的值连接在一起请教SAS LABEL问题。
问道SAS的题目About ID in sas
help-SAS 读data 问题one quick question about concatenating data in SAS
[合集] SAS一问,急~!求助, 读取大型数据的问题
相关话题的讨论汇总
话题: number话题: box话题: contents话题: range话题: find