A wrapper for paste()
and interaction()
. Combines the values in two columns row-wise.
Usage
concatenate_columns(
column_names,
separator = "_",
prefix = NULL,
suffix = NULL,
output_column = "concatenated",
clean = TRUE,
...
)
Arguments
- column_names
(character) The column name(s) in the annotation_source concatenate.
- separator
(character) A string placed in between the two being joined. The default is
"_"
.- prefix
(character, NULL) A string placed at the start of the concatenated strings. The default is
NULL
.- suffix
(character, NULL) A string placed at the end of the concatenated strings. The default is
NULL
.- output_column
(character) The name of a column to store the concatenated values in. The default is
"concatenated"
.- clean
(logical) Clean old columns. Allowed values are limited to the following:
"TRUE"
: The named columns are removed after being combined."FALSE"
: The named columns are retained after being combined.
The default is
TRUE
.- ...
Additional slots and values passed to
struct_class
.
Value
A concatenate_columns
object with the following output
slots:
updated | (annotation_source) The annotation_source after concatenating the columns. |