rename_items: Rename items

View source: R/rename_item.R

rename_itemsR Documentation

Rename items

Description

Rename items based on dic information.

Usage

rename_items(
  data,
  pattern = "{item_label}",
  max_chars = NULL,
  chars = max_chars
)

Arguments

data

A data frame

pattern

A character string with the syntax of the glue function (see example).

max_chars, chars

If not NULL, only the first n chars og the long label will be applied.

Value

A renamed data frame

Examples

ex_itrf  |>
  rename_items(pattern = "{reverse}{name}: {label}")  |>
  names()


jazznbass/scaledic documentation built on Jan. 26, 2023, 3:40 p.m.