The Road to Mathematics-sas (12)

Source: Internet
Author: User
Data student1;
Input name$ age score;
Datalines;
Wangwu 29 68
Lisi 30 85
Wangxi 28 79
Lixingxun 32 91
Wufang 27 56
;
Run
Data student;
Set student1;
Run
Data student2;
Input name$ age score;
Datalines;
WANGWU 29 88
Lisi 30 89
Wangxi 28 85
Lixingxun 32 93
Wufang 27 76
;
Run
/* Display the original data set */
Proc Print data=student;
Title "Original data Set";
Run
/*remove Removal Observation */
Data student1;
Modify Student1;
If score <80 then remove;
Run
Proc Print data=student1;
Title "Remove";
Run
/*replace Replacement Observations */
Data student;
Modify student Student2;
by name;
If score >85 then replace;
Run
Proc Print data=student;
Title "Replace";

Run

This blog all content is original, if reprint please indicate source http://blog.csdn.net/myhaspl/






The Road to Mathematics-sas (12)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.