Skip to content
Prev 275747 / 398506 Next

Simple time series question with zoo

Le 27/10/11 22:18, Vinny Moriarty a ?crit :
> strsplit("2006-04-09 10:20:00", " ")[[1]][1]
[1] "2006-04-09"
 > strsplit("2006-04-09 10:20:00", " ")[[1]][2]
[1] "10:20:00"

Then replace with

z<-zoo(LTER6$temp, chron(strsplit(chron(LTER6$DateTime, " ")[[1]][1], strsplit(LTER6$DateTime, " ")[[1]][2]))
Don't know
Explanation (but not still a solution for month aggregate)
The numerical coding format for date-time is that integer part is the 
number of days since a reference and the decimal part is the time. Then 
if you use trunc, two different times of the same day will be identical.