| define_instances {when} | R Documentation |
Define instances
Description
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 class 'when'
define_instances(td, start = NULL, end = NULL, values = NULL)
Arguments
td |
A |
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. |
Details
We must indicate dates or date components in ISO 8601 format (yyyy-mm-dd). The times in hh:mm:ss format.
Value
A when object.
See Also
Other dimension definition:
define_characteristics(),
get_attribute_definition_function(),
get_day_part(),
get_week_date_range(),
select_date_levels(),
select_day_level(),
select_month_level(),
select_quarter_level(),
select_semester_level(),
select_time_level(),
select_week_level(),
select_year_level(),
set_attribute_definition_function(),
set_day_part(),
when()
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)