全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学
24468 74
2010-06-18
作者将常见的sas 处理分为不同的task,分别用两种不同的方法program,并比较,给出最佳及最有效的解决方法。

此书适合初学者或中级sas programmer.

全书共409页,共10个segment,每个segment平均有十个task.

For Example:
Task 3.7
Multiple Input Data Sets: Identifying the Source Data Set
Scenario:
You need to combine a group of data sets whose names are similar.
The combined data set must contain a variable that indicates which input data set contributed that
observation.

The old way:
Conditional Logic using IN= Variables
The identification of the input data set is performed by checking the IN= variables
defined for each input data set in the SET statement.
data combined;
set sashelp.prdsale(in=in_prdsale)
sashelp.prdsal2(in=in_prdsal2)
sashelp.prdsal3(in=in_prdsal3);
length Source $ 32;
if in_prdsale then source="PRDSALE";
else if in_prdsal2 then source="PRDSAL2";
else if in_prdsal3 then source="PRDSAL3";
run;
proc freq data=combined;
tables Source;
title1 "Source Data Sets for Combined Data";
run;



The new way: INDSNAME= Option in the SET Statement
(available in SAS 9.2)
An alternate approach is to use the INDSNAME= option in the SET statement, available starting in SAS
9.2.
The variable defined by the INDSNAME= option contains the complete input data set including the
libref, for a maximum length of 41 characters.
This technique is particularly valuable when combined with the data set list syntax introduced in SAS
9.2.
data combined;
set sashelp.prdsal: indsname=DataSetName;
length Source $ 32;
Source=scan(DataSetName,2);
run;
proc freq data=combined;
tables Source;
title1 "Source Data Sets for Combined Data";
run;
附件列表

t be a sas dinosaur.pdf

大小:1.24 MB

只需: 10 个论坛币  马上下载

二维码

扫码加我 拉你入群

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

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

全部回复
2010-6-18 05:43:35
Can you sell it for 1?
二维码

扫码加我 拉你入群

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

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

2010-6-18 07:38:28
cjulianan 发表于 2010-6-18 05:43
Can you sell it for 1?
你这么多论坛币还嫌贵?!
二维码

扫码加我 拉你入群

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

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

2010-6-18 21:38:41
Thanks for your sharing.
二维码

扫码加我 拉你入群

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

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

2010-6-19 10:55:59
Thank you very much.
二维码

扫码加我 拉你入群

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

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

2010-6-20 09:52:10
我来支持一下楼主这文件还是很不错的哈
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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