O kgeme: ot Co htioseeningodmataorkconlaundh Readng r Excel File I/O The attached Distances xlsx file contains a spreadsheet with the pairwise distances in mies of the top 100 US cities by population....

helpO kgeme: ot Co<br>htioseeningodmataorkconlaundh<br>Readng r<br>Excel File I/O<br>The attached Distances xlsx file contains a spreadsheet with the pairwise distances in mies of the top 100 US cities by population. A preview of the<br>spreadsheet is shown below. The first row and first column contain the city names using the following format: city name comma space capitalized<br>state abbreviation, e.g, Nashville, TN. Note that the very first cell of the spresheet, A1, is blank.<br>Write a function called get_distance that accepts two character vector inputs representing the names of two cities. The functian returns the distance<br>between them as an output argument called distance. For example, the cali get_distance('Seattle, WA', Miami, FL') should return 3723. If one ar<br>both of the specified cities are not in the file, the function returns 1.<br>Your function should load the data only once. File VO is a time consuming operation. Loading the date multiple times is will likely cause a time-out<br>error when submitting your function.<br>Preview of the first five cities of Distances.xisx<br>A<br>Abilene, TX<br>Akron, OH<br>Albuquerque, NM Alexandria, VA<br>Allentown, PA<br>2 Abilene, TX<br>3 Akron, OH<br>4 Albuquerque, NM<br>5 Nlexandria, VA<br>6 Allentown, PA<br>1481<br>724<br>1615<br>1730<br>1481<br>2185<br>382<br>5S2<br>724<br>2185<br>2331<br>2447<br>1615<br>382<br>2331<br>195<br>1730<br>552<br>2447<br>195<br>P Type tee to search<br>18-07-3021<br>

Extracted text: O kgeme: ot Co htioseeningodmataorkconlaundh Readng r Excel File I/O The attached Distances xlsx file contains a spreadsheet with the pairwise distances in mies of the top 100 US cities by population. A preview of the spreadsheet is shown below. The first row and first column contain the city names using the following format: city name comma space capitalized state abbreviation, e.g, Nashville, TN. Note that the very first cell of the spresheet, A1, is blank. Write a function called get_distance that accepts two character vector inputs representing the names of two cities. The functian returns the distance between them as an output argument called distance. For example, the cali get_distance('Seattle, WA', Miami, FL') should return 3723. If one ar both of the specified cities are not in the file, the function returns 1. Your function should load the data only once. File VO is a time consuming operation. Loading the date multiple times is will likely cause a time-out error when submitting your function. Preview of the first five cities of Distances.xisx A Abilene, TX Akron, OH Albuquerque, NM Alexandria, VA Allentown, PA 2 Abilene, TX 3 Akron, OH 4 Albuquerque, NM 5 Nlexandria, VA 6 Allentown, PA 1481 724 1615 1730 1481 2185 382 5S2 724 2185 2331 2447 1615 382 2331 195 1730 552 2447 195 P Type tee to search 18-07-3021

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here