rename_attributes: Rename data columns according to metadata.

Description Usage Arguments Value

View source: R/rename_attributes.R

Description

Rename data columns according to metadata.

Usage

1
2
3
4
5
6
7
8
9
rename_attributes(
  meta_list,
  dataset_id,
  entity,
  file_dir = getwd(),
  filename = "",
  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.

filename

(character) Filename. Defaults to "", in which case the entity metadata will be read to find filename.

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 Sept. 9, 2020, 7:49 p.m.