Skip to contents

Extracts and formats sample-level metadata (colData) from a MultiAssayExperiment or SummarizedExperiment object.

Usage

pivot_sample(x, ...)

Arguments

x

A MultiAssayExperiment or SummarizedExperiment object.

...

Additional arguments passed to tidybulk::pivot_sample() for SummarizedExperiment objects.

Value

A tibble containing sample metadata with an added .sample column.

Details

This function:

  • Extracts sample metadata from MultiAssayExperiment using colData(), converting it to a tibble.

  • Calls tidybulk::pivot_sample() when applied to a SummarizedExperiment object.

  • Error Handling: Returns an error if x is not a MultiAssayExperiment or SummarizedExperiment.

Examples

if (FALSE) { # \dontrun{
sample_data <- pivot_sample(expom)
} # }