Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please add the solution and R codes using R Markdown. Use group_by () and summarize () to create a data frame with the following columns

Please add the solution and R codes using R Markdown.

image text in transcribed
Use group_by () and summarize () to create a data frame with the following columns . Count of the number of flights to each destination. . Mean arrival delay for each destination. . Standard deviation of arrival delays for each destination. Your R code should recreate the following table: ## N A tibble: 105 x 4 dest count arr_delay mean arr_delay_ad 1 ABQ 254 4.38 42.0 2 ACK 265 4. 85 30 .0 3 ALB 14.4 50.5 # # 4 ANC -2.5 26.4 5 ATL 17215 11.3 47.0 # # 6 AUS 2439 6.02 43.5 7 AVL 275 8.00 33.6 B BOL 443 7.05 42.1 9 BGR 375 8 . 03 46.4 ## 10 BHM 297 16.9 56. ## # . .. with 95 more rows b Use left_join () to combine the data frame of grouped summary statistics from part (a) with the airports data frame. The combined data frame should contain additional columns with information about the destination airport. Your code should should recreate the following table: ## # A tibble: 105 x 11 dest count arr_delay_mean arr_delay_ed name lat lon alt tz dat 1 ABU 254 4.38 42.0 Albuq- 35.0 -107. 6355 -7 A 2 ACK 265 4.85 30.0 Nantu- 41.3 -70.1 48 -5 A 3 ALB 439 14.4 50.5 Alban- 42.7 -73.8 285 -5 A 4 ANC -2.5 26.4 Tod S- 61.2 -150. 152 -9 A 5 ATL 17215 11.3 47 .0 Harts- 33.6 -84.4 1026 -5 A 6 AUS 243 6.02 43.5 Austi- 30.2 -97.7 542 -6 A # # 7 AVL 275 8.00 33.6 Ashev- 35.4 -82.5 2165 -5 A 8 BOL 443 7.06 42.1 Bradl- 41.9 -72.7 173 -5 A ## 9 BGR 375 8.03 46.4 Bango- 44.8 -68.8 192 -5 A ## 10 BHM 297 16.9 56.2 Birmi- 33.6 -86.8 644 -6 A of # ... with 95 more rows, and 1 more variable: tzone Which airports had the longest average arrival delays? Which airports had the greatest variability in their arrival delays? [Hint: use arrange ()] rows represent? In the combined data set from part (b), how many rows have NA values for the airport name? What do these

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

Calculus

Authors: Jon Rogawski, Colin Adams

3rd Edition

1319116442, 9781319116446

More Books

Students also viewed these Mathematics questions