rename_dimension_attributes: Rename dimension attributes

View source: R/star_schema_rename.R

rename_dimension_attributesR Documentation

Rename dimension attributes

Description

Set new names of some attributes in a dimension.

Usage

rename_dimension_attributes(st, name, attributes, new_names)

## S3 method for class 'star_schema'
rename_dimension_attributes(st, name, attributes, new_names)

Arguments

st

A star_schema object.

name

A string, name of the dimension.

attributes

A vector of attribute names.

new_names

A vector of new attribute names.

Value

A star_schema object.

See Also

Other rename functions: get_dimension_attribute_names(), get_measure_names(), rename_dimension(), rename_fact(), rename_measures()

Examples


st <-
  st_mrs_age |> rename_dimension_attributes(
    name = "when",
    attributes = c("week", "year"),
    new_names = c("w", "y")
  )


josesamos/starschemar documentation built on May 6, 2024, 5:57 a.m.