Question

Write a SAS program to import the tips.xls data. Name the resulting SAS dataset "tips" and...

Write a SAS program to import the tips.xls data. Name the resulting SAS dataset "tips" and store it in the temporary work library.

Examine the table (dataset) properties and then specify the informat of the variable DELIVERY.

Homework Answers

Answer #1

Sol:

proc import in sas is used to import a excel file.

datafile= tells SAS where to find the Excel file that you want to import

out=work.tips tells sas to create a dataset named tips stored in work library

dbms=xls tells sas the excel format file to read

replace is used to overwrite the tips dataset if it exists already

sheet="sheet1" tells SAS to import data from sheet1

getnames="yes"tells SAS to use the first row of data as variable names.

Write a SAS program to import the tips.xls data. Name the resulting SAS dataset "tips" and store it in the temporary work library.

SAS Code is:

proc import datafile="C:\tips.xls" out=work.tips

dbms=xls

replace;

sheet="sheet1";

getnames=yes;

run:

Examine the table (dataset) properties

SAS Code is

Proc contents data=work.tips;

run:

and then specify the informat of the variable DELIVERY.

SAS Code is

proc format

library=work.formats fmtlib;

select DELIVERY.;

run;

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Subject Name: Data Management for Analytics Software used: SAS Choose the best single option. Q10. Consider...
Subject Name: Data Management for Analytics Software used: SAS Choose the best single option. Q10. Consider a categorical variable LOCATION with 10 levels: “location1”- “location10”. In order to create a new numeric variable which has only the numeric value extracted from each level name, which of the following SAS code will work? a. location_num = input(substr(location,2,2),2.); b. location_num = substr(location,2,2); c. location_num = substr(location,9,2); d. location_num = input(substr(location,9,1),1.); e. location_num = input(substr(location,9,2),2.);
Fix the error and execute the program again in sas. DATA height; *** This is an...
Fix the error and execute the program again in sas. DATA height; *** This is an example of column input; INPUT name $ 1-7 sex $ 10 age 12-13 height 15-18 weight 20-24 ** the following 2 statements are "sum statements" look at output to see how they work; count+1; totalwt+weight; CARDS; john m 12 59.0 99.5 james m 12 57.3 83.0 alfred m 14 69.0 112.5 william m 15 66.5 112.0 jeffrey m 13 62.5 84.0 mary f 15...
Write a 4-6 sentence summary explaining how you can use STL templates to create real world...
Write a 4-6 sentence summary explaining how you can use STL templates to create real world applications. In your summary, provide an example of a software project that you can create using STL templates and provide a brief explanation of the STL templates you will use to create this project. After that you will implement the software project you described . Your application must be a unique project and must incorporate the use of an STL container and/or iterator and...
You will write a program that loops until the user selects 0 to exit. In the...
You will write a program that loops until the user selects 0 to exit. In the loop the user interactively selects a menu choice to compress or decompress a file. There are three menu options: Option 0: allows the user to exit the program. Option 1: allows the user to compress the specified input file and store the result in an output file. Option 2: allows the user to decompress the specified input file and store the result in an...
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT