I have data provided in the form of a date telling the day (format "YYYY-MM-DD", e.g. "2015-03-11" and the hours of the day numbered (0-23).
What is the most convenient way to produce time objects of the form
"2015-03-11" and hour = 0 -> "2015-03-11 00:00"
"2015-03-11" and hour = 1 -> "2015-03-11 01:00"
"2015-03-11" and hour = 2 -> "2015-03-11 02:00"
I could use the Date function from Base or something from xts or timeDate. Should be easy but I am sure someone out there knows it quickly.
EDIT: the data is provided in 2 columns, one for the date and one numerical.
"2015-03-11" and hour = 0"
or is it two columns withdate
and numeric values form 0-23 in another? – Trefor