Skip to contents

This function processes a dataframe to combine the separate columns (Label, Index, and LegacyLabel) back into a single composition ID column based on their format.

Usage

denormalize_composition_ids(
  user_data,
  in_label_col,
  in_index_col,
  in_legacy_col,
  out_composition_id_col
)

Arguments

user_data

A dataframe containing user data with split composition IDs.

in_label_col

A string specifying the column name of the labels in user_data. Default is "Label".

in_index_col

A string specifying the column name of the indexes in user_data. Default is "Index".

in_legacy_col

A string specifying the column name indicating if the composition ID is legacy in user_data. Default is "LegacyLabel".

out_composition_id_col

A string specifying the name of the new column where the combined composition IDs will be stored.

Value

A dataframe with a new column (specified by composition_id_col) containing the combined composition ID.