gravitas (version 0.1.2)

is_harmony: Check if two temporal granularities are harmonies

Description

Interaction of pair of granularities, categorised as harmony and clash

Usage

is_harmony(.data, gran1, gran2, hierarchy_tbl = NULL, facet_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

levels of facet variable for which faceting is allowed while plotting bivariate temporal granularities.

Value

TRUE if two granularties are harmonies.

Examples

Run this code
# NOT RUN {
library(tsibbledata)
vic_elec %>% is_harmony("hour_day", "day_week")
# }

Run the code above in your browser using DataLab