Does this, like I above, make the most efficient way to do this, or are there better ways to manipulate time series with data tables in R?
( ) between . , , , , . , devel CRAN- ( ). between , , , /, . , , .
library(data.table)
d = data.table(Time = as.POSIXct("2016-09-18 06:00:00") + 1:86400, runif(86400))
dn = as.POSIXct('2016-09-18 08:00:00')
up = as.POSIXct('2016-09-18 09:00:00')
d[Time > dn & Time < up]
d[between(Time, dn, up, incbounds=FALSE)]
d[.(dn=dn, up=up), on=.(Time>dn, Time<up)]
data.table IDate ITime, , . ?
. I Integer. , , , POSIXct , . . , .
datetime: date/datetime ( ns..) https://github.com/Rdatatable/data.table/issues/1451
: - https://github.com/Rdatatable/data.table/issues/3453, , data.table , , , xts, .