set_table_attribute_names {when} | R Documentation |
Set table attribute names
Description
Rename the attributes of the dimension table. It is especially useful if we want to export the table, for example, to a database.
Usage
set_table_attribute_names(td, names)
## S3 method for class 'when'
set_table_attribute_names(td, names = NULL)
Arguments
td |
A |
names |
A string vector. |
Value
A when
object.
See Also
Other obtaining results:
generate_table()
,
get_level_attribute_names()
,
get_level_names()
,
get_table_attribute_names()
Examples
wd <- when() |>
generate_table()
wd |>
get_table_attribute_names()
wd <- wd |>
set_table_attribute_names(
c(
'id_when',
'date',
'month_day',
'week_day',
'day_name',
'day_num_name',
'year_week',
'week',
'year_month',
'month',
'month_name',
'month_num_name',
'year'
)
)
[Package when version 1.0.0 Index]