create_labelDf: Create data frame with identifiers and labels

Description Usage Arguments Value Examples

View source: R/create_labelDf.R

Description

Convenience function to convert a label vector to a label data frame.

Usage

1
create_labelDf(namedVector, idCol, labelCol)

Arguments

namedVector

The named vector, names should be identifiers, values should be labels.

idCol, labelCol

The names to use for the identifier column and the label column.

Value

The data frame

Examples

1
2
3
4
5
6
7
8
mdmcda::create_labelDf(
  c(
    id1 = "first element",
    id2 = "second element"
  ),
  idCol = "example_id",
  labelCol = "example_label"
);

Matherion/mdmcda documentation built on Dec. 31, 2020, 3:13 p.m.