rename_measures: Rename measures

Description Usage Arguments Value See Also Examples

View source: R/star_schema_rename.R

Description

Set new names of some measures in facts.

Usage

1
2
3
4
rename_measures(st, measures, new_names)

## S3 method for class 'star_schema'
rename_measures(st, measures, new_names)

Arguments

st

A star_schema object.

measures

A vector of measure names.

new_names

A vector of new measure names.

Value

A star_schema object.

See Also

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

Examples

1
2
3
4
5
library(tidyr)

st <-
  st_mrs_age %>% rename_measures(measures = c("deaths"),
                                 new_names = c("n_deaths"))

starschemar documentation built on Jan. 13, 2021, 7:33 p.m.