Returns vector of booleans indicating whether the timestamps at corresponding positions in a vector of timestamps lie within a time interval, specified by first and/or last timestamp of the interval.
timestampIn( tstamps, tsFirst = NULL, tsLast = NULL, firstIncluded = TRUE, lastIncluded = FALSE, dbg = FALSE )
tstamps | vector of timestamps, either as character strings in ISO-format (yyyy-mm-dd HH:MM:SS), as Date objects or as POSIXt-objects |
---|---|
tsFirst | first timestamp ( |
tsLast | last timestamp ( |
firstIncluded | if |
lastIncluded | if |
dbg | should debug messages be shown? |
tstamps <- sequenceOfTimestamps("2017-11-03", "2017-11-04") table(timestampIn(tstamps, "2017-11-03 12:00:00", "2017-11-03 13:00:00"))#> #> FALSE TRUE #> 1381 60