plot_difference: Difference Plots for 9 ROI

View source: R/plot_difference.R

plot_differenceR Documentation

Difference Plots for 9 ROI

Description

This function creates a plot file with 9 electrodes of interests displaying ERPs for different conditions. It will need a loaded dataframe with your EEG data and a column indicating the condition to display. It assumes that there is a column named Voltage with your voltage values. Default values are provided for electrodes but it can be customized.

Usage

plot_difference(
  data,
  plotname = "auto",
  conditionToPlot = MM_RAW,
  levelA = semMM_RAW,
  levelB = consistent,
  custom_colors = list(c("levelA", "#000000"), c("levelB", "#4DAF4A"), c("difference",
    "#595959"), c("t-test", "#EA2721")),
  output_type = "pdf",
  ant_levels = Anteriority.Levels,
  med_levels = Mediality.Levels,
  vary = Voltage,
  group_var = Subject,
  show_group_obs = FALSE,
  labels_vertical_position = "auto",
  labels_height = "auto",
  baseline = c(-500, -200),
  topoplots_data = "voltage_difference",
  topoplots_time_windows = list(c(-250, -150), c(-150, 50), c(50, 200), c(200, 300),
    c(300, 500), c(500, 700), c(700, 900)),
  topoplots_scale = "auto",
  time_labels_interval = 200,
  custom_labels = list(),
  electrodes_to_display = c(),
  show_t_test = FALSE,
  t_test_threshold = 0.05,
  line_thickness = 0.75,
  background = "grid",
  adjusted_baseline = FALSE
)

Arguments

data

dataframe containing eeg data

plotname

'auto' or custom string for plot title and plot file name

conditionToPlot

column of the dataframe with the condition to plot

levelA

level to be substracted from

levelB

level to substract

custom_colors

list of colors lists

output_type

file type of the output

vary

variable that is used for the y-axis

group_var

group variable, usually Subject

show_group_obs

to show Subject data

labels_vertical_position

'auto' or custom position for the center of the label (in microVolts)

labels_height

'auto' or custom height (in microVolts)

topoplots_time_windows

list defining the time-windows for the voltage maps

topoplots_scale

'auto' or vector defining the limits of the scale for voltage maps

custom_labels

list of custom label list. Each custom labels should have the structure: list(start_time, end_time, "label")

line_thickness

single value (numeric, e.g. 0.75) or a vector of numerics such as: c(0.75, 1 , 1.25, 1.5)

background

string that defines the color of the background : "grid" (default), "white" and "dark"

adjusted_baseline

boolean to indicate if the baseline should be simulated on the time-window provided in

line_type

single value (string, e.g. 'solid') or a vector of strings such as: c('solid', 'dotted , 'dashed','longdash','F1')

Value

A PDF file containing the Difference plots by electrodes or region


aherbay/erpscope documentation built on Feb. 1, 2024, 7:56 p.m.