b*f 发帖数: 3154 | 1 看那个little sas的书说,macro的好处就是可以reuse,那procedure难道不也是为了
reuse么?这两者的区别是什么?
初学者,请大拿指导。 |
b*f 发帖数: 3154 | 2 这个。。。大家都不愿意回答么...回答的发包子... |
o*********h 发帖数: 6 | 3
procedure 现成的, macro 得自己写
【在 b*f 的大作中提到】 : 看那个little sas的书说,macro的好处就是可以reuse,那procedure难道不也是为了 : reuse么?这两者的区别是什么? : 初学者,请大拿指导。
|
b*f 发帖数: 3154 | 4 procedure不能自己写么?
俺就是不知道有什么macro能做的procedure不能做
【在 o*********h 的大作中提到】 : : procedure 现成的, macro 得自己写
|
l*********s 发帖数: 5409 | 5 bao zi plz
//
macro is built on the top of procedure;so if procedures cannot do it, macro
won't do it either.
Macro is to help you simplify tasks/minize keystrokes.
【在 b*f 的大作中提到】 : procedure不能自己写么? : 俺就是不知道有什么macro能做的procedure不能做
|
b*f 发帖数: 3154 | 6 So what is the advantage of macros? Whatever macros can do, a procedure can
be written to do the same, correct? If the answer to this question is "YES",
then what is the point of having macros? I have difficulty explaining this
question to my LD who is learning SAS.
Baozi is sent, BTW.
macro
【在 l*********s 的大作中提到】 : bao zi plz : // : macro is built on the top of procedure;so if procedures cannot do it, macro : won't do it either. : Macro is to help you simplify tasks/minize keystrokes.
|
s*r 发帖数: 2757 | |
b*f 发帖数: 3154 | 8 40
【在 s*r 的大作中提到】 : 100wb
|
D******n 发帖数: 2836 | 9 39.999
【在 b*f 的大作中提到】 : 40
|
s*r 发帖数: 2757 | 10 ok you take it
【在 D******n 的大作中提到】 : 39.999
|
|
|
a*****3 发帖数: 601 | 11 20 伪币firm. 我问问题有人回答的,一律30伪币。
my answer is: "macro facility" generates sas language or build-in procs/data
step. there are several 'units' in the macro facility, like input stack,
scanner, tokenizer, catalogues, that understand only 'sas macro language'.
Anything other than macro is treated as 'text'in the facility. the output of
the facility is 'sas language'.
【在 b*f 的大作中提到】 : 40
|
l**********9 发帖数: 148 | 12 Of course you can do everything in SAS without using macro. It is just a
matter of efficiency. For instance, you wan to write a SAS code:
proc print data=whywemustusethegoddamnmacor.itisjustatest;
run;
If you want to print this data set many times, then every time you must
input so long a data name. However,if you use a macro like:
%macro printit
proc print data=whywemustusethegoddamnmacor.itisjustatest;
run;
%mend printit;
Then next time you want to print, just use %printit. It is much easier, isn'
t it? |
D******n 发帖数: 2836 | 13 I think lz's question comes from the lack of understanding of programming. |
l**********9 发帖数: 148 | 14
I think it comes from the lack of experience in programming, rather than the
understanding=v=
【在 D******n 的大作中提到】 : I think lz's question comes from the lack of understanding of programming.
|
R*********i 发帖数: 7643 | 15 Say if you want to perform the same analyses on 10 variables, instead of
copying and pasting the same SAS procedures for 9 times with modifications,
you can write a macro and call the macro 10 times. Later on in case you want
to modify your analyses you can update the macro, instead of changing your
procedure 10 times. |
b*f 发帖数: 3154 | 16 In fact I just realized that, you can not write your own procedure (At least
not that easy). So if you want to implement any logic, you will have to use
macro. I came from other background so I thought SAS procedures are like
functions in other programming languages that you can write easily.
Am I understanding it correctly now? |
a*****3 发帖数: 601 | 17 yes, you understand 80% correctly. 给个伪币吧。
least: not that easy). So if you want to implement any logic, you will have
to use: macro. I came from other background so I thought SAS procedures
are like: functions in other programming languages that you can write easily
.: Am I understanding it correctly now?
【在 b*f 的大作中提到】 : In fact I just realized that, you can not write your own procedure (At least : not that easy). So if you want to implement any logic, you will have to use : macro. I came from other background so I thought SAS procedures are like : functions in other programming languages that you can write easily. : Am I understanding it correctly now?
|
l*********s 发帖数: 5409 | 18 co ask
have
easily
【在 a*****3 的大作中提到】 : yes, you understand 80% correctly. 给个伪币吧。 : : least: not that easy). So if you want to implement any logic, you will have : to use: macro. I came from other background so I thought SAS procedures : are like: functions in other programming languages that you can write easily : .: Am I understanding it correctly now?
|
a*****3 发帖数: 601 | 19 嘻嘻 楼主给了20刀。谢楼主。
【在 l*********s 的大作中提到】 : co ask : : have : easily
|
s*r 发帖数: 2757 | 20 check the history of the macro %glmmix and proc glmmix |
|
|
n***p 发帖数: 508 | 21 ft,看你在这发帖,我还以为自己走错了版。
我的sas太滥了,回答不了你的吻体,只能帮你顶了。。
【在 b*f 的大作中提到】 : 看那个little sas的书说,macro的好处就是可以reuse,那procedure难道不也是为了 : reuse么?这两者的区别是什么? : 初学者,请大拿指导。
|
b*f 发帖数: 3154 | 22 hehe
【在 n***p 的大作中提到】 : ft,看你在这发帖,我还以为自己走错了版。 : 我的sas太滥了,回答不了你的吻体,只能帮你顶了。。
|
D******n 发帖数: 2836 | |
d******e 发帖数: 7844 | 24 这玩艺比bioinformatics多了哪些东西?
【在 D******n 的大作中提到】 : 有前途,一直想搞,没搞成。
|
D******n 发帖数: 2836 | 25 少了bio,没多多少。主要是图像分析和电子病历相关,对后者我得理解就是,
database+textmining,统计不多吧。 |
d*******1 发帖数: 854 | 26 大傻根好像总是回错帖啊。呵呵
【在 D******n 的大作中提到】 : 有前途,一直想搞,没搞成。
|
P****D 发帖数: 11146 | 27 You are right about that SAS procedure cannot be created by user. However, a
macro is just a bunch of procedures. It does not NECESSARILY help you
implement any logic.
I suggest you find a sample macro and a sample procedure and show them to
your LD. These two concepts are truly straightforward once you see examples,
but also impossible (I think) to explain just with words...
least
use
【在 b*f 的大作中提到】 : In fact I just realized that, you can not write your own procedure (At least : not that easy). So if you want to implement any logic, you will have to use : macro. I came from other background so I thought SAS procedures are like : functions in other programming languages that you can write easily. : Am I understanding it correctly now?
|
a*****3 发帖数: 601 | 28 if you have only one chance to 'show them to your LD', the last chance in
the world, what would you like to show?
your LD. These two concepts are truly straightforward once you see examples,
【在 P****D 的大作中提到】 : You are right about that SAS procedure cannot be created by user. However, a : macro is just a bunch of procedures. It does not NECESSARILY help you : implement any logic. : I suggest you find a sample macro and a sample procedure and show them to : your LD. These two concepts are truly straightforward once you see examples, : but also impossible (I think) to explain just with words... : : least : use
|