[R] Coda: On the efficiency of unsplit() for Rolf Turner's recent post

2024-10-06 Thread Bert Gunter
(only of interest -- maybe! -- to those who followed this thread of a couple of weeks ago) Just for the heckuva it, I compared the timing of Deepayan's unsplit(x,f) solution to my as.vector(do.call(rbind, x)) approach to the query for a list of 3 vectors each of length 1000 (the original toy examp

Re: [R] Time series data decomposition from by minute data

2024-10-06 Thread roslinazairimah zakaria
Peter, Thank you very much for your help. On Fri, Oct 4, 2024 at 9:19 PM Petr Pikal wrote: > Hallo > > you can extract POSIX object > > tv <- as.POSIXct(index(dt_train)) > > and use cut together with aggregate > cut(tv, "hour") > > aggregate(dt_train, list(cut(tv, "hour")), mean) > > 2014-10-06