Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with an assignment in R # Use the nycflights13 package and the flights data frame to answer the following questions: to get the

Need help with an assignment in R

# Use the nycflights13 package and the flights data frame to answer the following questions:

to get the package install the mdsr and nycflights13 packages into r with the following code:

install.packages("mdsr")

install.packages("nycflights13")

**Q1) What month had the highest proportion of cancelled flights? What month had the lowest? Interpret any seasonal patterns**

**Q2) What plane (specified by the tailnum variable) traveled the most times from New York City airports in 2013? Plot the number of trips per week over the year. **

**Q3) Using the planes dataframe inside nycflights13, find the oldest plane that flew from New York City airports. How many airplanes that flew from New York City are included in the planes table? **

**Q4) Use the weather table from the nycflights13 package to answer the following question: On how many days was there precipitation in the New York area in 2013? Were there differences in the mean visibility based on the day of the week and / or month of the year? **

# Install the Lahman package to answer the following questions

**Q5) Define two new variables in the Teams data frame from the Lahman package: batting average and slugging percentage. Batting average is the ratio of hits (H) to at-bats (AB), and slugging percentage is total bases divided by at-bats. To compute total bases, you get 1 for a single, 2 for a double, 3 for atriple, and 4 for a home run. **

**Q6) Display the top 15 teams ranked in terms of slugging percentage in MLB history.Repeat using teams since 1969 **

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago