Hello everyone,
I have a database in long format and 4 columns (date, hour, site, pm25).
The "date" column ranges from 2020-01-01 to 2020-12-31, and for each day, the "hour" column ranges from 1 to 24 (which are the 24 hours of each day and are repeated for each day), and the "site" column corresponds to three different sites (groups: "PGO ", "PMNO", and "TEC"), each with a different "pm25" value for each hour and day of 2020 (some values in the "pm25" column may be repeated and others may be NA).
The problem is that not all sites (groups) have the complete series from 2020-01-01 to 2020-12-31.
I need 26352 rows of data to match to the 366 days (February has 29 days in 2020) * the 24 hours of the day * the three different sites, yet I only have 24887 rows.
My issue is, how do I complete the series while ensuring that the values added equal NA?
thanks,
Luis E