Skip to contents

Select Time Interval Days

Usage

selectTimeIntervalDays(
  dat,
  days = 7,
  firstDay = as.character(as.Date(lastDay) - days),
  lastDay = substr(utils::tail(dat$DateTime, 1), 1, 10),
  dbg = TRUE
)

Arguments

dat

data frame with column "DateTime"

days

number of "last" days to select

firstDay

first day as text, in "yyyy-mm-dd" format

lastDay

last day as text, in "yyyy-mm-dd" format

dbg

if TRUE, debug messages are shown