setPeakPeriod: Codes morning/evening peak periods using rDateTimeUTC in the...

View source: R/setPeakPeriod.R

setPeakPeriodR Documentation

Codes morning/evening peak periods using rDateTimeUTC in the data.table given

Description

'setPeakPeriod' adds a factor column 'peakPeriod' to the input data.table

Usage

setPeakPeriod(
  dt,
  dateTime = rDateTimeUTC,
  t1 = "07:00",
  t2 = "09:00",
  t3 = "16:00",
  t4 = "20:00"
)

Arguments

dt

a data table with a summary variable you want to average

dateTime

the variable which is a nice R dateTime for passing to hms::as_hms()

t1

start of morning peak in 24 hour clock e.g. "07:00" (default)

t2

end of morning peak in 24 hour clock e.g. "08:30" (default)

t3

start of morning peak in 24 hour clock e.g. "16:00" (default)

t4

start of morning peak in 24 hour clock e.g. "20:00" (default)

Author(s)

Ben Anderson, b.anderson@soton.ac.uk

See Also

Other utils: addLockdownRect(), addSeason(), alignDates(), getDuration(), gzipFile(), loadLibraries(), nzCalculateCO2e(), setup(), tidyNum()


CfSOtago/gridCarbon documentation built on April 5, 2022, 6:46 a.m.