create_harmony_data: Create data for one harmony pair

Description Usage Arguments Value Examples

View source: R/create_harmony_data.R

Description

Create data for one harmony pair

Usage

1
create_harmony_data(.data, harmony_tbl_row, response)

Arguments

.data

a tsibble

harmony_tbl_row

a row from the harmony table

response

univariate response variable

Value

a tibble with the harmony pair and response variable

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(gravitas)
library(dplyr)
sm <- smart_meter10 %>%
  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)
panel_data <- create_harmony_data(
  sm,
  harmonies[3, ], general_supply_kwh
)

Sayani07/hakear documentation built on Sept. 14, 2021, 10:59 a.m.