boxplot_epoch: Plot interactive boxplots of epochs

View source: R/boxplots.R

boxplot_epochR Documentation

Plot interactive boxplots of epochs

Description

Function for plotting interactive boxplots of EEG amplitude in individual epochs for selected subject and channel within the chosen time interval. The interactive plotly output enables to easily determine the epoch number from which outliers come and also allows to easily edit the image layout.

Usage

boxplot_epoch(
  data,
  amplitude = "signal",
  subject,
  channel,
  time_lim,
  use_latex = TRUE
)

Arguments

data

A data frame or a database table with EEG dataset. Required columns: subject, sensor, epoch, time and the column with EEG amplitude named as in amplitude parameter.

amplitude

A character specifying the name of the column from input data with an EEG amplitude values. Default is "signal".

subject

An integer or character ID of selected subject to plot.

channel

An integer or character ID of channel to plot.

time_lim

A numeric vector with time range to plot.

use_latex

A logical value indicating whether to use LaTeX formatting for the y-axis title. The default is TRUE.

Details

The input data frame or database table must contain at least following columns: subject - a column with subject IDs, sensor - a column with sensor labels, epoch - a column with epoch numbers, time - a column with time point numbers, and a column with measured EEG signal values (or their averages) called as in amplitude.

Value

A plotly object with boxplots of EEG amplitude for individual epochs.

Examples

# Interactive boxplots of signal from channel E34 for subject 1 (health control)
# in chosen time points
boxplot_epoch(epochdata, amplitude = "signal", subject = 1, channel = "E34",
 time_lim = c(10:20))


diegr documentation built on Nov. 5, 2025, 5:25 p.m.