由买买提看人间百态

topics

全部话题 - 话题: honglajiao
(共0页)
m****r
发帖数: 202
1
来自主题: Statistics版 - [sas] how to recode these variables
this file has 20 data sets, and every data set has 200-5000 observations, so
I write the following according to honglajiao's help
%macro recode(dr=,category=,amount=,else=);
proc sql noprint;
create table &dr as
select &dr
from .....;
quit;
data new;
set &dr;
if scan(&dr,2," ")="&category" then &dr._re=1*substr(&dr,1,2);
else if scan(&dr,2," ")="&amount" then &dr._re=6*substr(&dr,1,2);
else if &dr="1/2" then &dr._re=0.5;
else &dr._re=1*substr(&dr,1,2);
run;
proc print;run;... 阅读全帖
l*******s
发帖数: 437
2
来自主题: Statistics版 - sas code求助
lemonades,您好:
您转给 honglajiao,现金(伪币):20,收取手续费:0.2
同时附加了如下留言给 honglajiao.
thanks!
站务
l*******s
发帖数: 437
3
来自主题: Statistics版 - SAS code 求助
thank you very much!!!
lemonades,您好:
您转给 honglajiao,现金(伪币):20,收取手续费:0.2
同时附加了如下留言给 honglajiao.
thanks
m****r
发帖数: 202
4
来自主题: Statistics版 - [sas] how to recode these variables
Thank you honglajiao. You did do me a great favor.
l*******s
发帖数: 437
5
来自主题: Statistics版 - sas code求助
thank you, honglajiao!!
l***i
发帖数: 8
6
来自主题: Statistics版 - ##问一个SAS BASE 问题##
原来是这么个原因。我开始理解成,数据没读对,所以if没起作用呢。谢谢honglajiao
的解释!
(共0页)