由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - sas help, how to manipulating on the format value
相关主题
请教一个SAS问题问一个很简单的R问题
请教一道sas 题Help! proc sql;cout not null value.
急 SAS问题sas help!!
How to use Proc formatSAS问题求教
请教一sas code请教一个proc transpose的问题
a question about proc format关于SAS里面 PROC MODEL 的output,急!!
求教一个简单的data step 牛肉包y = a + b * (c ^ x)
sas读入数据时的一个问题请教SAS问题求助
相关话题的讨论汇总
话题: format话题: others话题: fmt话题: value
进入Statistics版参与讨论
1 (共1页)
p***r
发帖数: 920
1
a simplified case:
format
value fmt
1= 'one'
...
111= 'one'
2= 'two'
...
299= 'two'
...
other = 'Others'
;
run;
when applied this format on the variable A, i want to subset the data
set which A values are 'others'. such as
data new;
set old;
format A fmt.;
run;
data sub
set new;
if A = "Others"; /*Where the error happens*/
run;
This seems cannot be done. A and "Other" are not of the same data
type. How can I do this ?
h********o
发帖数: 103
2
proc format;
value fmt 1 = "one" 11 = "one" 111 = "one"
2 = "two" 22 = "two" 222 = "two"
other = "Others";
run;
data one;
input A @@;
format A fmt.;
cards;
1 11 111 2 22 222 123 432
;
data two;
set one;
if(put(A,fmt.)) = "Others";
run;
proc print;
run;
Obs A
1 Others
2 Others
p***r
发帖数: 920
3
thanks
1 (共1页)
进入Statistics版参与讨论
相关主题
SAS问题求助请教一sas code
help for sas codea question about proc format
[SAS] number of missing values for character vars求教一个简单的data step 牛肉包
help:data manipulationsas读入数据时的一个问题请教
请教一个SAS问题问一个很简单的R问题
请教一道sas 题Help! proc sql;cout not null value.
急 SAS问题sas help!!
How to use Proc formatSAS问题求教
相关话题的讨论汇总
话题: format话题: others话题: fmt话题: value