全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2580 2
2015-06-26
Item 42
The NOTSORTED option on the BY statement cannot be used with which other statement or option?
A. SET
B. MERGE
C. IF FIRST.by-variable
D. BY GROUPFORMAT by-variable
这题选B。
是因为merge the transposed dataset不用 merge statement吗?
请大家帮忙解答谢谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2015-6-29 14:06:03
这个跟transpose木有关系
notsorted的作用是强迫by语句在有可能并没有排序的情况下执行
set纵向拼接 跟排序关系不大
if first是取第一次观测,不排序依旧可以执行(注意的是这里不排序和排序的功能完全不同。排序是取所有重复观测的第一个,不排序则是取所有连续重复观测第一个)
by groupformat的作用是by format之后的变量 not sorted依旧可用(结果和sort之后的可能不一样)
merge横行拼接 本身可以不用by 此时是按照行号拼接  如果用了by 就是按照by变量按顺序拼接,此时如果数据没有sort则会导致无法按顺序拼接

希望能帮到你
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-5-15 09:41:58
Merge也可以用,但是只是针对单一的satement. 多个就不行了。
可以看看这个http://www.lexjansen.com/nesug/nesug06/po/po14.pdf
The BY statement applies only to the SET, MERGE, MODIFY, or UPDATE statement that immediately precedes it in the DATA step, and only one BY statement can accompany each of these statements in a data step.

Consequently, NOTSORTED cannot be used with the MERGE statement, UPDATE statement, or when the SET statement lists more than one data set.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群