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

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

mdmcda::create_labelDf( c( id1 = "first element", id2 = "second element" ), idCol = "example_id", labelCol = "example_label" );
#> example_id example_label #> 1 id1 first element #> 2 id2 second element