label_data: Create a string or factor vector based on value labels in...

Description Usage Arguments Value Author(s) Examples

View source: R/label_data.R

Description

Create a string or factor vector based on value labels in matching metadata

Usage

1
2
label_data(data = d, variable.data = varcode,
  variable.meta = variable.data, metadata = meta, into.factor = TRUE)

Arguments

data

A data.frame including the source variable to be labeled

variable.data

Code of the source variable in data.frame

variable.meta

Code of the source variable in the matching metadata

metadata

A tidy metadata

into.factor

Whether the output variable should be converted into a factor or not

Value

vector

Author(s)

Markus Kainu <markuskainu@gmail.com>

Examples

1
2
3
4
 ## Not run: 
 label_data(data=d, variable.data="sex", variable.meta=variable.data, metadata=meta, into.factor=TRUE)
 
## End(Not run)

muuankarski/tidymetadata documentation built on May 23, 2019, 10:53 a.m.