getlabel: Obtain label of variable(s) based on metadata information

Description Usage Arguments Value

View source: R/getlabel.R

Description

A function to obtain label of one vector or each variable in one data frame based on pre-defined metadata information.

Usage

1
getlabel(x, meta = NULL, unit = TRUE, fit = FALSE)

Arguments

x

a vector or data frame to get label.

meta

a data frame contains metadata of the dataset. This data frame should have the following variables: varname (character variable specifies name of each variable), label (character variable specifies label of each variables), type (character variable specifies type of each variable [numeric, factor, character, datetime], unit (character variable specifies units of each continuous variable), scale (numeric variable specifies how each variable will be scaled).

unit

a logical value specifies whether unit will be appendded in the label of continous variables.

fit

a logical value specifies whether the label will use presentation as in model fitting.

Value

vector of character of label


lampk/C306 documentation built on Sept. 11, 2019, 8:03 a.m.