Skip to contents

When the dimension is defined as a date type, using this function we can select the semester level and its attributes to include in it: semester number and the combination of the year with it.

Usage

select_semester_level(td, include_all, exclude_all, semester, year_semester)

# S3 method for when
select_semester_level(
  td,
  include_all = FALSE,
  exclude_all = FALSE,
  semester = NULL,
  year_semester = NULL
)

Arguments

td

A when object.

include_all

A boolean, include all fields of the level.

exclude_all

A boolean, exclude all fields of the level.

semester

A boolean, include the semester field.

year_semester

A boolean, include the semester field.

Value

A when object.

Details

The include_all and exclude_all parameters allow us to include or exclude all attributes, and then specifically exclude or include the ones we need.

Examples


td <- when() |>
  select_semester_level(semester = FALSE)