Skip to contents

Using this function we can define the instances from which the dimension will be generated according to the rest of its defined characteristics.

Usage

define_instances(td, start, end, values)

# S3 method for when
define_instances(td, start = NULL, end = NULL, values = NULL)

Arguments

td

A when object.

start

A string, start of the period to be included in the dimension.

end

A string, end of the period to be included in the dimension.

values

A vector of string.

Value

A when object.

Details

We must indicate dates or date components in ISO 8601 format (yyyy-mm-dd). The times in hh:mm:ss format.

Examples


td_1 <- when() |>
  define_instances(start = "2020", end = "2030")

td_1 <- when() |>
  define_instances(start = "2020-01-01", end = "2030-01-01")

td_2 <- when(type = 'time') |>
  define_instances(values = 1:5)