If RStudio asks you to install packages with a yellow warning sign at the top of this document accept to install the packages.

After the installations, I recommend you to Knit this document and read the questions after knitting.

Question 1

Write your name as the author on this file. Knit this document.

Data

The flights data is from 2013 and has information on all the flights leaving NYC airports (JFK, EWR, LGA).

Question 2

How many flights are there in the dataset? Answer using inline code.

There are 8500 in the data set.

Question 3

How many variables are there in the dataset? Answer using a chunk and appropriate code.

summary(flights)

variables <- "19"

There are 19.

Question 4

sna_flights <- flights %>% 
  filter(dest == "SNA")

Run the code above The data frame sna_flights has information on all the flights leaving NYC airports and arriving in Santa Ana (SNA) airport. How many flights from NYC arrived in SNA airport in 2013?

nrow(sna_flights)
## [1] 825

There was 825 flights from NYC to SNA in 2013.

Question 5

What does the variable distance represent? Copy and paste whatever you see in the Help pane after asking for help.

Distance between airports, in miles.

Question 6

What is the mean and the median departure delay of flights from NYC to SNA in the year 2013?

summary(sna_flights)

The mean and median departure delay of flights from NYC to SNA in the year 2013 is 1081 and 1162 respectively.


Remember that in order for us to grade your homework, you have to write everything in this R Markdown document. We will not be able to see your Console or Environment. Make sure your document knits, follows tidyverse style guide.