Question: Hi I have a question about R code. I am trying to make function that 504 txt files in NASAWeather.zip with 72 files for each
Hi I have a question about R code.
I am trying to make function that 504 txt files in NASAWeather.zip with 72 files for each of seven (7) variables being measured.
The variables are
cloudhigh,
cloudlow,
cloudmid,
ozone,
pressure,
surftemp,
temperature.
and can you make data.frame that contain these info.

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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
