rename_attributes: Rename data columns according to metadata.

View source: R/rename_attributes.R

rename_attributesR Documentation

Rename data columns according to metadata.

Description

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.


atn38/BLE-LTER-utils documentation built on March 4, 2024, 9:13 p.m.