Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Please write the followng code in R programing language. Also, can you please share code and excel results SEE EXCELL FILL BELOW TO BE

1. Please write the followng code in R programing language. Also, can you please share code and excel results

SEE EXCELL FILL BELOW TO BE USED. (PLEASE SHARE UPDAED EXCELL FILE JUST COPY AND PASTE NEW FILE).

2. SOLVE THE FOLLOWING QUESTION USING THE INFORMATION GIVEN BELOW:

Question 1 share code:. **Use control flow** to find the average (mean) number of passengers on flights from all the airports in part b.

- Your result should be 1 number: The total number of passengers from all of the specified airports, divided by the total number of performed departures from all of the specified airports.

Quetion 2: Use control flow** to find the average (mean) number of passengers on flights from all the airports in part above question.

Question 2:

--- Use R Studio output: pdf_document ---

```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ```

#This data set contains data on all 135 medium and large airports in the US in 1990.

(Dataset: "US Airport Statistics," submitted by Larry Winner, University of Florida. Dataset obtained from the Journal of Statistics Education (http://www.amstat.org/publications/jse). Accessed 3 June 2015. Used by permission of author.)```{r}

```

d. Optional: If you know a more efficient way to do parts b and c in R, that's great! Do that here and use the result to check your work. (If you don't know a more efficient way, that's fine. We'll discuss methods of writing efficient code later in the course.) ```{r}

```

.ACTUAL FILE DATA: EXCEL FILE TO BE USED.

Airport City Scheduled Departures Performed Departures Passengers Freight (tons) Mail (tons)
HARTSFIELD INTL ATLANTA 285693 288803 22665665 165668.8 93039.48
BALTO/WASH INTL BALTIMORE 73300 74048 4420425 18041.52 19722.93
LOGAN INTL BOSTON 114153 115524 9549585 127815.1 29785.72
DOUGLAS MUNI CHARLOTTE 120210 121798 7076954 36242.84 15399.46
MIDWAY CHICAGO 64465 66389 3547040 4494.78 4485.58
O'HARE INTL CHICAGO 322430 332338 25636383 300463.8 140359.4
DALLAS/FT WORTH INTL DALLAS/FT WORTH 266737 269665 22899267 142661 86706.76
LOVE FIELD DALLAS/FT WORTH 39481 40196 2882836 2216.7 242.87
STAPLETON INTL DENVER 154067 156293 11961839 67345.75 38043.73
DETROIT CITY DETROIT 6828 7162 362655 258.08 0
WAYNE COUNTY DETROIT 134929 137565 9903078 42831.24 32429.74
WILLOW RUN DETROIT 4241 4024 35 33858.26 1249
HONOLULU INTL HONOLULU 92659 96780 9002217 139496.6 19951.37
INTERCONTINENTAL HOUSTON 104249 105330 7543899 62425.36 21073.85
HOBBY HOUSTON 61387 62582 3972327 3787.82 790.44
ELLINGTON FIELD HOUSTON 1188 1253 18967 199.45 1.46
MC CARRAN INTL LAS VEGAS 92196 92072 7796218 11288.52 13132.33
HOLLYWOOD-BURBANK LOS ANGELES 30444 30968 1698739 6414.64 1673.24
LONG BEACH LOS ANGELES 14443 14712 692995 7837.98 929.96
LOS ANGELES INTL LOS ANGELES 213302 215740 18438056 352823.5 71588.84
ORANGE COUNTY LOS ANGELES 37275 38137 2203700 1163.62 173.94
MIAMI INTL MIAMI/FT LAUDERDALE 106858 105658 9226103 187247.2 33739.59
FT LAUDERDALE INTL MIAMI/FT LAUDERDALE 46584 46508 3875357 38330.43 7842.12
MINNEAPOLIS/ST PAUL MINNEAPOLIS/ST PAUL 114872 116312 8837228 68045.03 42973.8
NEWARK NEWARK/NEW YORK 130286 132817 9853925 163211.6 34065.82
JOHN F KENNEDY INTL NEW YORK 74659 74507 9687068 275998.9 70305.53
LA GUARDIA NEW YORK 129670 131310 10725465 23086.56 35713.98
ORLANDO INTL ORLANDO 84924 84328 7677769 23940.73 12083.04
INTERNATIONAL PHILADELPHIA 105830 107331 6970820 49572.7 42422.69
SKY HARBOR INTL PHOENIX 148342 149274 10727494 42604.71 23812.85
GREATER PITTSBURGH PITTSBURGH 125276 126550 7912394 21668.06 24285.06
LAMBERT-ST LOUIS ST LOUIS 135089 137711 9332091 49363.12 37674.06
SALT LAKE CITY INTL SALT LAKE CITY 77368 76754 5388178 35247.01 18788.6
SAN DIEGO INTL SAN DIEGO 70156 70893 5260907 18882.04 8822.78
BUCHANAN FIELD SAN FRANCISCO/OAKLAND 1286 1334 49532 7.95 0
OAKLAND METRO INTL SAN FRANCISCO/OAKLAND 45986 46217 2670788 69875.8 3697.09
SAN FRANCISCO INTL SAN FRANCISCO/OAKLAND 172007 187581 13474929 216259.9 55236.27
SEATTLE-TACOMA INTL SEATTLE/TACOMA 122226 124518 7385594 103409.9 34636.56
TAMPA INTL TAMPA/ST PETERSBURG 64396 64735 4781020 23048.08 17017.79
DULLES INTL WASHINGTON 80651 82588 4448592 53609.69 25349.58
WASHINGTON NATIONAL WASHINGTON 97043 98513 7034693 10470.14 27341.35
ALBUQUERQUE INTL ALBUQUERQUE 34138 34386 2384647 5286.72 6441.62
ANCHORAGE INTL ANCHORAGE 35891 35273 1362282 318663.2 62566.64
MUELLER MUNI AUSTIN 31494 31718 2054955 7549 3941.16
GREATER BUFFALO INTL BUFFALO/NIAGARA FALLS 30554 30926 1637293 8508.88 3962.18
GREATER CINCINNATI CINCINNATI 65533 66217 3907625 16808.48 14295.54
HOPKINS INTL CLEVELAND 76988 78018 3836050 19467.41 10427.55
PORT COLUMBUS INTL COLUMBUS 29986 30338 1685100 3407.81 11595.43
LOCKBURN AFB COLUMBUS 1735 1733 0 11311.08 99.03
COX/DAYTON INTL DAYTON 36966 37191 1845160 20922.76 6306.52
EL PASO INTL EL PASO 28333 28519 1673243 4824.94 1760.09
SOUTHWEST FORT MYERS 22210 22149 1712679 2435.07 1699.9
BRADLEY INTL HARTFORD/SPRINGFIELD 31850 32217 2312455 14432.08 14325.94
INDIANAPOLIS INTL INDIANAPOLIS 53471 53125 2601839 110350.6 9713.05
JACKSONVILLE INTL JACKSONVILLE 24585 24854 1266677 8073.55 5411.32
KAHULUI MAUI 29624 31427 2094390 9015.42 1605.24
INTERNATIONAL KANSAS CITY 52781 52834 3358116 18041.4 17014.09
LIHUE KAUAI 18704 19724 1264738 969.51 742.14
MEMPHIS INTL MEMPHIS 94420 95198 3887208 614223.6 13168.89
GENERAL MITCHELL MILWAUKEE 39724 40661 1915390 11747.66 8317.82
METROPOLITAN NASHVILLE 57474 58060 3404243 7453.14 7887.41
INTL/MOISANT FIELD NEW ORLEANS 49121 49606 3361062 15439.58 6139.07
NORFOLK REGIONAL NORFOLK 26495 26824 1254846 5371.22 2530.79
WILL ROGERS WORLD OKLAHOMA CITY 25347 25550 1519518 5316.15 4923.59
ONTARIO INTL ONTARIO/SAN BERNARDINO 40925 41200 2640734 8488.64 10668.98
PORTLAND INTL PORTLAND 69578 70763 3025345 33735.01 11622.95
RALEIGH-DURHAM RALEIGH/DURHAM/RTP 66211 67304 4361369 16302.95 8429.76
RENO INTL RENO 21609 22010 1343619 3361.04 1543.59
ROCHESTER-MONROE CTY ROCHESTER 25132 25585 1154747 8092.4 2910.75
SACRAMENTO METRO SACRAMENTO 39723 47086 1737096 5991.77 10284.73
SAN ANTONIO INTL SAN ANTONIO 39740 40020 2593896 10049.59 7584.84
SAN JOSE MUNI SAN JOSE 49173 50096 3128393 20971.84 3966.67
HANCOCK SYRACUSE 29514 30065 1166598 11243.51 4347.42
TUCSON INTL TUCSON 20201 20413 1263509 3709.47 2740.06
TULSA INTL TULSA 24975 25217 1483037 8241.04 5582.49
PALM BEACH INTL WEST PALM BEACH 29363 29625 2609138 3089.87 3424.48
AKRON-CANTON AKRON/CANTON 5606 5806 230249 334.41 893.32
ALBANY COUNTY ALBANY, NY 15007 15295 878372 2184.93 2712.69
ALLENTOWN-BETHEHEM ALLENTOWN/BETHLEHEM 7744 7807 349358 2017.81 350.3
AMARILLO AMARILLO 6616 6668 435297 327.14 781.19
RYAN BATON ROUGE 8837 8921 423808 526.69 1625.13
LOGAN FIELD BILLINGS 8741 8868 237699 420.69 1738.63
BIRMINGHAM MUNI BIRMINGHAM 20112 20185 1001983 5937.63 5255.4
BOISE AIR TERMINAL BOISE 16802 17121 525092 3007.15 1941.86
HARLINGEN INDUSTRIAL BROWNSVILLE 7444 7527 529042 3656.57 9.01
BURLINGTON INTL BURLINGTON, VT 7507 7689 306489 1682.98 1143.32
CEDAR RAPIDS MUNI CEDAR RAPIDS/IOWA CITY 7753 7810 341142 5937.53 1623.8
CHARLESTON AFB/MUNI CHARLESTON, SC 14215 14380 631956 2179.36 866.09
LOVELL FIELD CHATTANOOGA 5327 5388 239746 1046.56 197.31
PETERSON FIELD COLORADO SPRINGS 10903 11001 551507 638.32 671.96
COLUMBIA METRO COLUMBIA, SC 13531 13673 512759 6554.2 2009.81
CORPUS CHRISTI INTL CORPUS CHRISTI 6651 6756 423498 298.3 639.46
DAYTONA BEACH REG DAYTONA BEACH 7514 7507 490336 377.78 89.18
DES MOINES MUNI DES MOINES 12144 12256 658619 1705.15 9042.02
MAHLON SWEET FIELD EUGENE 8074 8252 224658 857.1 601
FAIRBANKS INTL FAIRBANKS 6150 6167 233809 6573.16 6431.49
MUNI/BAER FIELD FORT WAYNE 7851 8062 242000 1114.74 662.03
FRESNO AIR TERMINAL FRESNO 20879 20993 393442 887.12 963.19
KENT COUNTY GRAND RAPIDS 13086 13366 614280 4010.83 1650.33
GREENSBORO-HP-WS REG GREENSBORO/HIGH POINT 23519 23906 894532 9801.19 3841.67
GREENVILLE/SPARTANBG GREENVILLE/SPARTANBURG 11580 11739 503271 1314.55 1908.97
HARRISBURG INTL HARRISBURG/YORK 10537 10746 437341 5692.89 1579.88
GENERAL LYMAN FIELD HILO 10868 10817 651191 4522.27 1139.18
MADISON COUNTY HUNTSVILLE, AL 9880 10043 381668 734.72 457.42
PALM SPRINGS MUNI INDIO/PALM SPRINGS 9270 9456 353294 151.42 54.68
LONG ISLAND-MCARTHUR ISLIP, LONG ISLAND 7001 7203 422400 542.59 1484.22
THOMPSON FIELD JACKSON, MS 9001 9082 391018 543.63 1812.42
KE-AHOLE KAILUA-KONA 14800 15527 977274 5166.7 887.18
MCGHEE TYSON KNOXVILLE 10228 10234 477768 6192.36 1644.97
BLUE GRASS LEXINGTON/FRANKFORT 7811 7913 291634 373.87 1331.34
ADAMS FIELD LITTLE ROCK 15154 15310 950540 918.25 3616.92
STANDIFORD FIELD LOUISVILLE 21813 21944 937645 8725.02 5618.14
LUBBOCK REGIONAL LUBBOCK 11575 11691 611413 7282.66 546.74
TRUAX FIELD MADISON, WI 8926 9158 425563 4044.83 873.45
MUNICIPAL MANCHESTER/CONCORD 6344 6455 267963 7091.74 632.01
CAPE KENNEDY REG MELBOURNE 5838 5866 360126 133.58 34.15
MIDLAND REGIONAL MIDLAND/ODESSA 8675 8762 580905 559.51 300.62
BATES FIELD MOBILE/PASCAGOULA 9734 9824 380798 5438.91 646.6
QUAD CITY MOLINE 6286 6553 220093 394.09 310.27
EPPLEY AIRFIELD OMAHA 19952 19951 994132 5701.22 14391.15
PENSACOLA REGIONAL PENSACOLA 8765 8930 394222 864.82 1429.55
PORTLAND INTL JETPRT PORTLAND, ME 8712 8956 472393 2526.91 1552.77
FRANCIS GREEN STATE PROVIDENCE 16890 17113 1060719 2372.95 3402.81
BYRD FLYING FIELD RICHMOND 20443 20652 864381 5403.95 3507.87
ROANOKE MUNI ROANOKE 7143 7347 224595 257.83 587.41
TRI CITY SAGINAW/BAY CITY 3952 4036 219310 278.94 175.6
SANTA BARBARA SANTA BARBARA 9999 10263 226472 806.88 0.01
SARASOTA-BRADENTON SARASOTA/BRADENTON 15765 15990 989935 542.07 71.36
SAVANNAH INTL SAVANNAH 11089 11270 520881 1306.61 768.92
SHREVEPORT REGIONAL SHREVEPORT 7656 7639 257229 6198.18 1618.82
FOSS FIELD SIOUX FALLS 6466 6514 226436 1163.97 1556.28
MICHIANA REGIONAL SOUTH BEND 6630 7072 224050 1826 212.82
SPOKANE INTL SPOKANE 25315 25837 747329 7827.61 2283.69
TALLAHASSEE REGIONAL TALLAHASSEE 9193 9306 381840 1492.52 699.4
MID-CONTINENT WICHITA 13772 13901 561432 6905.22 2928.32

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_2

Step: 3

blur-text-image_3

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

Intelligent Information And Database Systems Second International Conference Acids Hue City Vietnam March 2010 Proceedings Part 1 Lnai 5990

Authors: Manh Thanh Le ,Jerzy Swiatek ,Ngoc Thanh Nguyen

2010th Edition

3642121446, 978-3642121449

More Books

Students also viewed these Databases questions