GetDateTable: Get Date Table

Description Usage Arguments Examples

Description

Given dates, it returns a data frame with peak and off-peak information.

Usage

1
2
3
GetDateTable(dates, market = "PNW", col.names = c("Date", "Month", "Year",
  "DOW", "FDOM", "Peak", "nHours_HLH", "nHours_LLH", "weight_HLH",
  "weight_LLH"))

Arguments

dates

an array of date objects

market

"PNW", "CAISO" or "MISO"

col.names

A list of columns included in the returned table. Default returns all columns: c("Date","Month","Year", "DOW", "Peak", "nHours_HLH","nHours_LLH", "weight_HLH", "weight_LLH")

Examples

1
2
3
4
5
6
7
dates <- seq(as.Date("2015-1-1"), length.out = 10, by=1)
GetDateTable(dates, market = "CAISO")

# Calculate number of on-peak and off-peak hours
dates <- seq(as.Date("2015-1-1"),as.Date("2020-1-1"), by=1)
date.df <- GetDateTable(dates, "MISO",c("Date", "nHours_HLH", "nHours_LLH"))
aggregate(date.df[,-1], by=list("Date"=FirstDayOfMonth(date.df$Date)), sum)

einaooka/tea.datetime documentation built on May 16, 2019, 1:25 a.m.