How to reshape a dataframe with “reoccurring” columns?
问题 I am new to data analysis with R. I recently got a pre-formatted environmental observation-model dataset, an example subset of which is shown below: date site obs mod site obs mod 2000-09-01 00:00:00 campus NA 61.63 city centre 66 56.69 2000-09-01 01:00:00 campus 52 62.55 city centre NA 54.75 2000-09-01 02:00:00 campus 52 63.52 city centre 56 54.65 Basically, the data include the time series of hourly observed and modelled concentrations of a pollutant at various sites in "reoccurring columns