Question: how to get the sas code of this question The dataset Musial.s 4 1 contains information about the baseball games that Musial played from September
how to get the sas code of this question The dataset Musial.s contains information about the baseball games that Musial played from September through in
tableObsDate,Opp,GameResult,PlateAppearances,Runs,Hits,HomeRuns,RunsBattedInFieldPositionBoston Braves,WRFBoston Braves,LRFChicago Cubs,WRFChicago Cubs,LPHChicago Cubs,WLFChicago Cubs,WRFPittsburgh Pirates,LRFPittsburgh Pirates,WRFPittsburgh Pirates,WRFPittsburgh Pirates,LRFChicago Cubs,LLFChicago Cubs,WLF
Write a SAS data step no more than lines of code that incorporates each of the following.
a Creates a new dataset in the WORK library called "Musial beginning with the dataset above.
b The new dataset should have these five variables Date, Opp, FieldPosition, Scoring which should be the total number of Runs and RunsBattedIn and Ratio which should be the Scoring dived by the number of PlateAppearances for each game.
c Shortens the Opp variable to the City name using an appropriate function to do so
d Displays the Date in the form SEP and the Ratio to decimal places.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
