select_date_levels {when} | R Documentation |
Configure date levels
Description
When the dimension is defined as date type, using this function we can select the levels to include in it: day, week, month, quarter, semester and year.
Usage
select_date_levels(
td,
include_all,
exclude_all,
day_level,
week_level,
month_level,
quarter_level,
semester_level,
year_level
)
## S3 method for class 'when'
select_date_levels(
td,
include_all = FALSE,
exclude_all = FALSE,
day_level = NULL,
week_level = NULL,
month_level = NULL,
quarter_level = NULL,
semester_level = NULL,
year_level = NULL
)
Arguments
td |
A |
include_all |
A boolean, include all levels. |
exclude_all |
A boolean, exclude all levels. |
day_level |
A boolean, include day level. |
week_level |
A boolean, include week level. |
month_level |
A boolean, include month level. |
quarter_level |
A boolean, include quarter level. |
semester_level |
A boolean, include semester level. |
year_level |
A boolean, include year level. |
Value
A when
object.
See Also
Other dimension definition:
define_characteristics()
,
define_instances()
,
get_attribute_definition_function()
,
get_day_part()
,
get_week_date_range()
,
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 <- when() |>
select_date_levels(week_level = FALSE)