Skip to contents

Flattens an epoched or longitudinal PhysioExperiment into a long data.frame(subject, time, channel, value) suitable for fitMixedModel(), fitMMRM() and the marginal-means helpers.

Usage

peToLong(pe, assay = NULL, value_name = "value", subjects = NULL)

Arguments

pe

A PhysioExperiment. A 2D assay is treated as time x channel for a single subject; a 3D assay as time x channel x subject/trial.

assay

Assay name (default the first).

value_name

Name for the value column (default "value").

subjects

Optional character/factor labels for the third dimension (subjects/trials); defaults to the colnames/index.

Value

A long data.frame with columns subject, time, channel and the value column.