Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this question, we will use flights dataset from nycflights 1 3 package. Using flight dataset, ( 6 0 points ) a ) write a
In this question, we will use flights dataset from nycflights package. Using flight
dataset, points
a write a script to find all flights that Had a departure delay of or more hours and arrival
delay of or more hours. points
b write a script to find all Summer flights with Departure in July, August, or September
that are operated by JetBlue Airways B that flew from JFK and arrived at MIA or
BQN points
c write a script, using select function, to select subset of data that include all columns but
the following: distance, hour, minute, timehour points
d write a script, using mutate function, to add a new column representing flight operation
costs. In here, the cost of operation for each flight is considered as the sum of airtime
cost $ per hour of air time and fly distance cost $ per mile traveled points
e write a script that calculates the correlation between every numerical column in flights
dataset. points
Hint: you need to
i remove all nonnumerical columns from the dataset using select function,
ii you need to remove all missing values NA from your dataset. This can be achieved
by either removing all columns from remaining set that contains missing values NA
or removing all rows from dataset that contains missing values NA
iii use cor function with the trimmed dataset to calculate all pairwise correlations.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started