Exercise 1
Create a data set that contains the following variables:
Bank: Bank of America
Rate: 3.23
Year: 5
Name the data set as RATE.
Answer:
Data Rate;
Bank = "Bank of America";
Rate = 3.23;
Year = 5;
Run;
Exercise 2
Create a data set that contains the following variables:
Save the data set as DEMO.
Answer:
Data Demo;
Length ID $6 Race $9 Gender $6;
Input ID $ Race $ Gender $ Age;
Datalines;
APP001 Black Male 30
APP002 Caucasian Female 25
APP003 Asian Male 24
APP004 Black Female 32
APP005 Caucasian Female 26
;
Run;
Exercise 3
Locate the FISH data set from the SASHelp library.
Create a subset of the FISH data set and name it as PERCH. PERCH should contain only the observations where SPECIES is reported as "Perch". Save the data set in the WORK library.
Answer:
Data Perch;
Set SASHelp.Fish;
If Species = "Perch";
Run;
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |