starschemar (version 1.2.0)

rename_dimension_attributes: 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 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

Run this code
# NOT RUN {
library(tidyr)

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

# }

Run the code above in your browser using DataLab