楼主: 是风啊
27475 26

[学习分享] if和where在SAS中的区别 [推广有奖]

11
amnesia_yu 发表于 2014-7-16 16:10:54
多谢楼主~~

12
ivan.liuyanfeng 发表于 2014-7-17 14:50:29 来自手机
厉害。学习了

13
thchn 发表于 2014-7-17 23:05:35
搂住心细啊,

14
liweineng0304 发表于 2015-1-24 17:00:20
barbararan 发表于 2014-2-8 15:43
楼主这里一个问题,
data a;
input id x@@;
那是因为你在用merge合并的时候没有根据指定变量合并,你在merge语句后面加一个by id;语句就好了。

15
Bridgenc 发表于 2015-1-24 19:30:37
good one.

16
berry_li 发表于 2015-1-24 21:06:51
barbararan 发表于 2014-2-8 15:43
楼主这里一个问题,
data a;
input id x@@;
这里关键是要搞清楚没有by的merge是什么意思,它是one-to-one merging,而不是match-merging。 还是看原版的解释吧。注意同名变量的变量值替代。
One-to-one merging combines observations from two or more SAS data sets into a single observation in a new data set. To perform a one-to-one merge, use the MERGE statement without a BY statement. SAS combines the first observation from all data sets that are named in the MERGE statement into the first observation in the new data set, the second observation from all data sets into the second observation in the new data set, and so on. In a one-to-one merge, the number of observations in the new data set is equal to the number of observations in the largest data set named in the MERGE statement.
已有 1 人评分论坛币 收起 理由
admin_kefu + 50 热心帮助其他会员

总评分: 论坛币 + 50   查看全部评分

17
teqel 发表于 2015-1-25 11:06:57
barbararan 发表于 2014-2-8 15:43
楼主这里一个问题,
data a;
input id x@@;
看来merge和set效果差不多,都是在编译阶段读入where

18
wpfwxn 发表于 2015-1-25 11:39:23
恩,不错

19
panstrgh 在职认证  发表于 2015-11-30 11:53:45
谢谢楼主分享,收获多多

20
5傻小不点 发表于 2016-4-26 16:45:56
不错,O(∩_∩)O谢谢~

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 16:50