Skip to contents

This function takes in a data frame and splits the provided strain and percentage columns by a semicolon (;). The resulting two lists within each row are then unnested into separate rows. This is commonly used for validating strains and their corresponding compositions.

Usage

split_and_unnest_columns(user_data, strains_col, percentage_col, append = NULL)

Arguments

user_data

A data frame with the specified strain and percentage columns.

strains_col

The column name in the data frame containing strain data.

percentage_col

The column name in the data frame containing percentage data.

Value

A data frame with unnested strain and percentage columns.

Examples

if (FALSE) { # \dontrun{
result <- split_and_unnest_columns(user_data, "strain_column_name", "percentage_column_name")
} # }