Skip to contents

Map user columns to text (and optionally labels)

Usage

map_columns(data, text_col, label_col = NULL, keep_original = TRUE)

Arguments

data

A data frame.

text_col

Name of the column to become text.

label_col

Optional name of the column to become labels.

keep_original

Keep the original columns alongside the mapped ones. A pre-existing text (or labels) column that is not itself the mapped source is preserved under a .original suffix rather than overwritten.

Value

A data frame with a text column (and labels when requested), always with one row per input row.