SeriesAggreg: handling diverse input time steps correctly
I tried to aggregate a 15 minutes time step time series to monthly time step and here is the result:
> d <- seq.POSIXt(from = as.POSIXct("2020-01-01 00:00:00", tz = "UTC"),
+ to = as.POSIXct("2021-12-31 23:59:59", tz = "UTC"),
+ by = "15 min")
> df <- data.frame(d = d, v = 1)
> QM <- SeriesAggreg(df, Format = "%Y%m", ConvertFun = "sum")
Warning message:
In SeriesAggreg.data.frame(df, Format = "%Y%m", ConvertFun = "sum") :
the requested time 'Format' is the same as the one in 'x'. No time-step conversion was performed
Maybe I was foolish to try to use other time steps than the ones handle by GR models... The strange thing is that yearly aggregation doesn't warn and send a bad result:
> QY <- SeriesAggreg(df, Format = "%Y", ConvertFun = "sum")
> str(QY)
'data.frame': 2 obs. of 2 variables:
$ d: POSIXct, format: "2020-01-01" "2021-01-01"
$ v: num 12 12