create_harmony_tbl_data: Create data for all harmony pairs in a harmony table

View source: R/create_harmony_tbl_data.R

create_harmony_tbl_dataR Documentation

Create data for all harmony pairs in a harmony table

Description

Create data for all harmony pairs in a harmony table

Usage

create_harmony_tbl_data(.data, harmony_tbl = NULL, response = NULL)

Arguments

.data

a tsibble

harmony_tbl

harmony table

response

univariate response variable

Value

a list with each element containing a tibble with the harmony pair and response variable

Examples

library(dplyr)
sm <- smart_meter10 %>%
  dplyr::filter(customer_id %in% c("10017936"))
harmonies <- sm %>%
  harmony(
    ugran = "month",
    filter_in = "wknd_wday",
    filter_out = c("hhour", "fortnight")
  )
# harmonies <- harmonies %>% mutate(facet_variable = NA)
all_harmony <- create_harmony_tbl_data(sm,
  harmony_tbl = harmonies[1:7, ],
  response = general_supply_kwh
)

Sayani07/gravitas documentation built on June 18, 2022, 2:40 a.m.