Skip to contents

Set new names of some attributes in a dimension.

Usage

rename_dimension_attributes(st, name, attributes, new_names)

# S3 method for 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.

Examples


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