View source: R/att_definition.R
| set_attribute_definition_function | R Documentation |
Each attribute is defined by a function that adds a column to a table based on the parameter that contains the date or time. This function sets the definition function for the attribute whose name is given.
set_attribute_definition_function(td, name, f)
## S3 method for class 'when'
set_attribute_definition_function(td, name = NULL, f = NULL)
td |
A |
name |
A string, attribute name. |
f |
A function. |
A when object.
Other dimension definition:
define_characteristics(),
define_instances(),
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_day_part(),
when()
f <- function(table, values, ...) {
table[['year']] <- 'Not defined'
table
}
wd <- when() |>
set_attribute_definition_function(name = "year", f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.