Skip to contents

Convenience function to paste together multiple columns into one. Thin wrapper around tidyr::unite

Usage

setunite(data, col, ..., sep = "_", remove = TRUE, na.rm = FALSE)

Arguments

data

data.table to act on

col

The name of the new column, as a string or symbol.

...

<tidy-select> Columns to unite

sep

Separator to use between values.

remove

If TRUE, the default, remove input columns from output data frame.

na.rm

If TRUE, missing values will be removed prior to uniting each value.