Accepts columns from a dataframe and vectorizes/parallel maps a function across them, returning the result in a new column. Function must return a character vector because purrr::pmap_char enforces type-safety.

combine(df, col, ..., .f, remove = TRUE)

Arguments

df

A dataframe

col

Bare/unquoted name of results column

...

Bare/unquoted names of argument columns

.f

A function that accepts as many arguments as provided argument columns. Gets passed to purrr::pmap_chr so formula-style lambda specification also works.

remove

Whether or not to remove the argument columns (defaults to true)

Value

Dataframe with new column generated by applying fun to argument columns element-wise