StatisticalServicesCentre / ClimateObject

This R code
GNU General Public License v3.0
0 stars 7 forks source link

Filling Missing dates functionality #16

Open volloholic opened 9 years ago

volloholic commented 9 years ago

missing_dates_check in the climate_data object is currently only functional for Daily data needs to be implemented for other time periods.

rposn commented 9 years ago

"date_col_check" method in "climate_data_refclass.R" is also only functional for Daily (see attached). It converts the date/time column into a date column, since uses the "as.Date" function. This function takes into account only the dates and discards the times. This should be modified for "subdaily" data... date_col_check

dannyparsons commented 9 years ago

The section below that (see attached) creates the date_time column for subdaily data. So subdaily data has a date column with "Date" class (no time) and a date_time column with "POSIXct" class. So only the date column discards the time. I think David mentioned before the reasons we decided to have a separate date and date_time column because of rare issues with time zones. For subdaily data, the date column may not be needed, since this information is already contained in the date_time column, but for consistency we decided that every climate data data frame must have a date column stored in a consistent format. We should however, have an else if statement, below the if statement in your screen shot, that creates the date column if a date_time column is present and the date column does not already exist. This should be separate issue now I think, as this issue started by David is about missing dates. clipboard01

rposn commented 9 years ago

Thanks for the reply. I will open then a new issue under the title "subdaily dataset"