mt_update_meta_tbl: Update metadata table

Description Usage Arguments Value

Description

Update the metadata table of a dataset. The function will identify variable columns in df for which rows are missing in meta_tbl and append new rows for each. It will also remove any deprecated rows which do not match columns in the dataset.

Usage

1
mt_update_meta_tbl(df, meta_tbl, factor_cols = NULL, sep = ";")

Arguments

df

a dataframe or tibble to which the metadata table relates to

meta_tbl

a metadata table associated with df

factor_cols

character string or vector of names of columns containing factors (will only apply to new columns)

sep

separator used to separate codes and definitions for each level in the metadata table (must be the same used throughout meta_tbl)

Value

an updated meta_tbl with rows added for new df columns and any deprecated rows trimmed.


annakrystalli/metadatar documentation built on May 14, 2019, 6:09 a.m.