Question: The starter code below loads the tidyverse and the Lahman package. As a result, you have access to objects named: AllstarFull Batting People Salaries Teams

The starter code below loads the tidyverse and the Lahman package. As a result, you have access to objects named:
AllstarFull
Batting
People
Salaries
Teams
TeamsFranchises
Consider reading the documentation of these objects.
Wrangle the data made availabe by the Lahman package to create a tibble named season_ba with elements:
playerID
nameFirst
namelast
yearID
H
AB
BA
Each row of this data should contain measurements related to an MLB player batter's single season statistics. Only include rows corresponding to the 1947 season and after for batters that had at least 300 at-bats in a season. The columns playerID, namefirst, nameLast are the player's identifier, first name, and last name respectively. The year ID column is the year of the season. The columns H,AB, and BA are the number of hits, number of at bats, and the batting average for a player's season. The batting average should be rounded to three digits. The rows should be arranged from highest to lowest batting average, with ties broken first by year, then by last name.
Done correctly, the first row should be Tony Gwynn's 1994 season. Baseball fans will be quick to notice that this list does not include Teddy Ballgame's 1941 season where he averaged 0.406, but we are exluding pre-integration seasons.
submission.R
The starter code below loads the tidyverse and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!