merge_columns()

merge_columns()

merge_columns(*column_names)

Combines multiple columns together and returns a new column containing all the codes from the given columns (plus an ordinal number code for each column).

Behaves similar to create_mutually_exclusive, however, identical results are not guaranteed.

Returns

New RColumn object on success. Nil value on failed merge.

Example

The following example creates a column called “merged” from three source columns: gesture_mom, gesture_child, gesture_dad.

merged_column = merge_columns('merged', 'gesture_mom', 'gesture_child', 'gesture_dad')
set_column(merged_column) # save to spreadsheet.