is_harmony: Check if two temporal granularities are harmonies

Description Usage Arguments Value Examples

View source: R/is_harmony.R

Description

Interaction of pair of granularities, categorised as harmony and clash

Usage

1
2
3
4
5
6
7
8
is_harmony(
  .data,
  gran1,
  gran2,
  hierarchy_tbl = NULL,
  facet_h = NULL,
  x_h = NULL
)

Arguments

.data

A tsibble object.

gran1

One of the temporal granularities to check for harmonies.

gran2

The second temporal granularity in the pair.

hierarchy_tbl

A hierarchy table specifying the hierarchy of units and their relationships.

facet_h

highest level of facet variable that can be considered in harmony pair.

x_h

highest level of x-axis variable that can be considered in harmony pair.

Value

TRUE if two granularties are harmonies.

Examples

1
2
library(tsibbledata)
vic_elec %>% is_harmony("hour_day", "day_week")

gravitas documentation built on July 2, 2020, 4:01 a.m.