Question: The assignment requires reading data that are in a very structured format but which can not be directly read using regular functions such as read.

 The assignment requires reading data that are in a very structuredformat but which can not be directly read using regular functions such

The assignment requires reading data that are in a very structured format but which can not be directly read using regular functions such as read. cav (), read. table (), etc. It also requires writing a function to read each file as there are 504 files. You also need to combine the data from the 504 files into a single data.frame, first verifying that the values from the files correspond to the same dates and locations. There are 504 txt files in NASAWeather.zip with 72 files for each of seven (7) variables being measured. These variables are . cloudhigh, cloudlow, cloudmid, ozone pressure, surftemp, temperature. For a given variable, each of the 72 files corresponds to a different date - month and year. Each file has a "header" containing meta-information, e.g., VARIABLE : Mean high cloud amount (%) FILENAME : ISCCPMonthly_avg . nc FILEPATH : /usr/local/fer_data/data/ SUBSET : 24 by 24 points (LONGITUDE-LATITUDE) TIME : 16-JAN-1995 00:00 The values for the variable for that date are arranged in a rectangular table based on latitude (rows) and longitude (columns). The location details are provided in additional information - two rows for longitude and two columns for the latitude, as in the following example: 113.8W 111.2W 108.8W 106.2W 103.8W 101.2W 98.8W 96.2W 93.8W 91.2W 88.8W 86.2W 83.8W . ... 27 28 29 30 31 32 33 34 35 36 37 38 39 36.2N / 51: 26.00 23.00 23.00 17.00 19.50 17.00 16.00 16.00 16.00 19.00 18.00 19.00 19.50 . . . . For each file, create a data.frame that contains . one column for the values, . a column for each of the latitude and longitude - as numbers, i.e. with the North, South, East and West converted. . the date (which will be the same for each observation with the data.frame.) Having read each file, you need to verify that the latitude and longitude values correspond across files and also match the dates of the files. Your overall task is to create a single data.frame with columns for . date . latitude and longitude each of the 7 variables Of course, the values for the 7 variables in each row must correspond to the same date and latitude and longitude.VARIABLE : Mean high cloud amount (%) FILENAME : ISCCPMonthly_avg . nc FILEPATH : /usr/local/fer_data/data/ SUBSET : 24 by 24 points ( LONGITUDE-LATITUDE) TIME : 16-FEB-1995 00:00 113. 8W 111. 2W 108. 8W 106. 2W 103.8W 101.2W 98.8W 96.2W 93.8W 91.2W 88.8W 86. 2W 83.8W 81. 2W 78.8W 76.2W 73.8W 71. 2W 68. 8W 66.2W 63. 8W 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 36. 2N / 51: 9.50 9.50 9.50 10.50 9.00 9.50 9.00 9.00 9.50 12.00 14.50 18.50 21.00 21.00 22.50 21.50 21.50 21.00 21.00 21.00 18.50 33. 8N / 50: 9.50 9.50 10.50 11.50 10.50 10.00 11.00 11.00 14.50 17.50 18.50 20.50 21.00 21.00 19.50 16.00 16.50 17.00 15.50 15.50 15.50 31. 2N / 49: 11.00 11.00 12.00 13.50 15.00 16.00 17.50 20.00 20.00 18.50 18.00 17.00 15.50 12.50 12.00 12.00 11.00 11.50 11.50 11.50 13.00 28.8N / 48: 12.00 16.00 16.00 20.00 25.00 25.00 23.50 18.50 14.50 13.50 13.50 12.00 10.00 9.00 9.50 10.00 10.00 9.50 9.50 10.00 12.50 26.2N / 47: 15.50 19.50 24.50 24.50 31.50 30.00 2 24.00 14.50 8.50 7.00 5.50 6.00 6.00 5.50 5.50 6.00 5.50 5.00 6.50 8.50 10.50 23.8N / 46: 17.00 21.50 24.50 28.00 28.00 27.50 16.50 8.50 4.00 3.00 2.00 1.50 2.00 2.50 2.50 1.50 1.50 2.00 3.00 4.50 7.50 21. 2N / 45: 15.50 17.00 18.00 14.00 13.00 8.00 4.00 1.50 1.00 0.50 0.50 1.00 0.50 1.00 1.00 1.00 0.50 1.50 2.50 4.50 4.00 18. 8N / 44: 12.50 12.50 10.50 6.00 3.50 4.50 4.00 2.50 1.00 1.50 1.00 0. 50 0.50 0.00 0.00 0.00 0.50 1.00 1.00 1.00 1.00 16. 2N / 43: 12.00 9.00 5.00 2.50 3.50 3.00 3.00 1.00 1.00 1.00 1.00 1.00 0. 50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.50 13. 8N / 42: 12.50 10.50 7.50 7.50 5.00 5.00 2.50 1.00 0.50 1.00 1.00 0.50 0.00 0.00 0.00 0.50 0.50 0.00 0.00 0.00 0.00 11. 2N / 41: 10.50 7.00 7.50 4.50 3.50 5.00 3.00 1.50 1.50 1.00 1.00 1.00 0.00 0.00 1.00 1.50 0. 50 2.50 1.50 0.00 0.00 8. 8N / 40: 7.50 6.00 3.50 1.00 3.50 5.00 4.00 4.00 4.00 3.00 3.00 3.50 2.50 1.00 1.00 2.00 1.00 3.00 4.00 1.50 0.50 6. 2N / 39: 9.50 9.00 6.50 5.00 4.50 5.50 7.50 7.00 8.00 8.50 6.50 6.00 3.00 1.00 3.50 7.00 5.00 5.00 4.50 4.00 2.00 3.8N / 38: 7.00 8.50 7.00 9.00 7.00 5.00 7.00 7.00 9.00 10.50 7.00 4.50 3.50 3.00 7.50 9.00 7.50 8.00 13.50 13.00 6.50 1. 2N / 37: 1.00 1.50 2.50 2.00 1.50 2.00 2.50 3.00 4.00 2.50 1.50 1.50 3.50 9.00 12.50 15.50 13.00 18.50 26.00 21.00 9.50 1. 25 / 36: 0.00 0.50 1.00 1.50 1.50 1.00 1.50 1.50 1.50 1.50 2.00 2.00 2.00 10.50 20.50 19.00 25.50 33.00 32.50 22.00 19.00 3.85 / 35: 1.50 2.00 1.50 0.50 0.50 1.00 1.50 3.00 3.00 3.00 3.50 1.50 1.50 10.00 30.50 33.00 34.50 39.00 35.00 30.50 31.50 6.25 / 34: 0.50 1.50 1.50 0.50 0.00 1.50 3.00 3.50 4.00 3.00 2.00 1.00 1.00 4.50 26.50 40.00 40.00 42.50 43.50 41.50 37.50 8.85 / 33: 1.50 1.00 1.00 0.50 2.50 5.00 5.50 3.00 3.00 1.50 1.50 0.50 0. 50 2.50 11.00 44.00 45.00 46.50 47.00 44.50 44.50 11. 25 / 32: 1.00 1.50 1.00 1.50 4.00 6.00 7.50 4.00 2.00 1.50 1.00 0.50 1.00 4.00 18.00 42.00 44.50 42.50 37.50 41.00 45.00 13.85 / 31: 1.00 2.00 2.00 2.00 4.00 6.50 8.00 5.00 2.50 2.00 1.50 0.50 0.50 1.00 1.50 19.00 39.00 47.00 35.00 34.00 35.00 16. 25 / 30: 0.50 2.00 2.50 1.00 5.00 6.50 7.50 4.50 2.50 2.00 2.00 2.50 1.00 0.50 0.50 0.50 4.00 21.00 30.00 30.50 27.50 18. 85 / 29: 0.50 0.50 1.50 1.50 0. 50 2.50 5.00 4.50 3.00 2.00 2.00 2.00 1.50 0.50 0.00 0.50 2.00 9.50 23.00 23.00 21.00 21. 25 / 28: 1.00 0.50 1.00 0.50 0. 50 1.50 2.50 2.00 2.00 1.50 1.50 1.50 1.50 1.00 0. 50 0.00 0.00 0.50 5.00 16.50 13.00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!