My question is about how to manage the dates and times in an air quality database, which saved data every ten minutes all day, every day from 2002 through 2008.
I want to generate several analysis and plots, but referring only to the morning peak hours which go from 6:00 through 8:00 a.m. I have tried to generate the diagrams in the needed interval but the R tool always plots the 24 hours in a day distorting, therefore, the available data for the peak hours.
I would hugely appreciate your guidance on how to select and plot interval in the peak hour only and how to generate the several diagrams.
I have the next script to generate a date interval, but I want to agregate hour interval (6-8 am) and plot only the interval data:
# select interval
start.date = as.POSIXct("2007-03-27 05:00", tz = "GMT")
end.date = as.POSIXct("2007-05-27 05:00", tz = "GMT")
subdata = subset(mydata, date >= start.date & date <= end.date,
select = c(date, nox, co))
#
#plot the variables