- 1、本文档共96页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
lecture10数据循环处理
Chapter 10 Processing of Data Iteratively 10、数据循环处理 Contents Section 10.1 Using a Simple DO Loop to Process Data Section 10.2 Performing Operations on Similar Variables Section 10.3 Performating Calculation Until a Condition is met Section 10.4 Sampling a SAS Data Set at Random Section 10.1 Using a Simple DO Loop to Process Data Objectives Understand DO loop processing. Eliminate redundant code. Introduction DO loops can be used in a variety of ways. You can perform repetitive calculations generate data eliminate redundant code execute SAS code conditionally read data. Scenario The MIS Department wants to reduce the amount of written code that produces a data set showing the employees’ 5% raises over the next three years. Original Program for WORK.RAISES DO Loop Syntax General form of a simple iterative DO loop: DO Loop Syntax DO Loop Syntax Expressions: do z = k to n/10; Dates: do date = 01JAN2002d to 31JAN2002d; DO Loop Syntax General form of a DO loop with a value list: The values in the list can be numeric or character. DO Loop Syntax Discrete numeric values separated by commas: do n = 1,5,15,30,60; Character values enclosed in quotes and separated by commas: do month = JAN,FEB,MAR; Modified Program for WORK.RAISES Generating Random Number Repetitively This demonstration illustrates how to use a random number generator to produce random weekday, month, and year by using DO LOOP and OUTPUT statement. Section 10.2 Performing Operations on Similar Variables Objectives Create arrays. Use arrays to perform operations on similar variables. Use arrays to create new variables. Scenario An employee contributes to a charity every month. International Airlines contributes an additional 25% of the employee’s contribution. Calculate the company’s contribution to the employee’s charity. Determine the company’s percentage of each quarterly contribution. IA.EMP_CONTRIB WORK.COMP_CONTRIB Need for Array Processing Uses for SAS Arra
您可能关注的文档
最近下载
- LEGO乐高积木拼砌说明书42126,Ford®F-150Raptor皮卡,LEGO®Technic(年份2021)安装指南_第2份共2份.pdf
- 继电保护和安全自动装置技术规程.pdf VIP
- 2023版反假考试复习题库-上(单选题部分).pdf VIP
- (完整)2018年严重精神障碍知识技能竞赛题库.pdf VIP
- 诗词大会网络答题竞赛题库200题(含答案).pdf
- 弗洛姆的人本主义精神分析理论.ppt VIP
- 整本书阅读 会飞的教室(课件)四年级上册语文部编版.pptx
- 2024年江西司法警官职业学院单招数学考试题库及答案解析.docx
- HAIER 海尔 海尔Haier冷柜 BC BD-519HCZ 说明书.pdf
- 消防安全标志设置要求.docx VIP
文档评论(0)