Skip to contents

Rename data columns according to metadata.

Usage

rename_attributes(
  meta_list,
  dataset_id,
  entity,
  file_dir = getwd(),
  file_name = "",
  x,
  append_units = T
)

Arguments

meta_list

(character) A list of dataframes containing metadata returned by get_meta.

dataset_id

(numeric) A dataset ID.

entity

(numeric) An entity number.

file_dir

(character) Path to directory containing flat files (data files). Defaults to current R working directory.

file_name

(character) File name to

x

R object. If specified, will skip looking for entity file altogether.

append_units

(logical) If TRUE, will append abbreviated units (see vw_custom_units) to column names as specified in metabase. Defaults to TRUE.

Value

The data table entity with renamed columns.