Skip to contents

Converts predictions from nested list-column format to Chap wide CSV format (one column per sample). This is the format expected by the Chap platform.

Usage

predictions_to_wide(nested_df)

Arguments

nested_df

A tibble with a 'samples' list-column containing numeric vectors of samples

Value

A data frame with columns: time_period, location, sample_0, sample_1, ..., sample_N

Examples

if (FALSE) { # \dontrun{
# Convert nested predictions to wide format for Chap
wide_preds <- predictions_to_wide(nested_preds)
write.csv(wide_preds, "predictions.csv", row.names = FALSE)
} # }