gran_obs {gravitas}R Documentation

Cross tabulation of granularities useful for validating if number of observations are sufficient to compute probability distributions

Description

Cross tabulation of granularities useful for validating if number of observations are sufficient to compute probability distributions

Usage

gran_obs(.data, gran1, gran2, hierarchy_tbl = 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 for non-temporal case.

Value

A tibble with number of observations for each granularity.

Examples

library(tsibbledata)
vic_elec %>% gran_obs("hour_day", "day_week")

[Package gravitas version 0.1.3 Index]