Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#Dplyr In Class Exercise Produce a screen shot for every answer so we can go over towards the end or just keep the naswer in

#Dplyr In Class Exercise Produce a screen shot for every answer so we can go over towards the end or just keep the naswer in the r script file #Follow the below steps

#first create a new R file in Rstudio #then install the below package install.packages("hflights") #then load the dplyr library library("dplyr") # convert to local data frame flights <- hflights # test the filter using the below filter(flights, Month==1, DayofMonth==1)

#Question 1 # filter flights dataset by uniquecarrier equal to 'AA' or flightnum equal to 460 and Arrdelay > 5 # use | for OR condition

#Question 2 # select flights dataset the following variables year,month,dayofmonth and any other column that CONTAINS # the 'Taxi' and 'Delay' using the contains function

#Question 3 # Using pipe method to select UniqueCarrier and DepDelay columns and then filter for delays over 60 minutes

#Question 4 #Using pipe method to select UniqueCarrier and DepDelay columns and then sort by DepDelay

#Question 5 # using pipe method select distance and airtime, create a new variable Speed(calculation of Distance divided by Airtime *60) # Also filter where Airtime is Null 'NA'

#Question 6 #using nesting and pipe and summarise for each carrier, calculate the percentage of flights cancelled or diverted

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

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions

Question

Prove that cosine is a continuous function.

Answered: 1 week ago

Question

Determine the purpose of disability insurance.

Answered: 1 week ago

Question

5. Recognize your ability to repair and let go of painful conflict

Answered: 1 week ago