grandaverage: Plot the grand average waveform for all loaded conditions
Description
grandaverage plots the grand average waveform for each condition present in the
data frame you provide. A color-coded and labeled legend is generated with the plot
for ease of identification of each condition.
Usage
grandaverage(data, electrodes, window = NULL)
Arguments
data
A data frame in the format returned from load.data
electrodes
A single value or concatenation of several values (to be averaged)
indicating which electrodes to include in generating the plot. At this time, if the
raw data files imported using load.data) do not have a header, you
must include a capital "V" in front of the number and enclose each electrode in quotes.
(For example, electrodes = "V78", or electrodes = c("V78", "V76").)
window
The beginning and end points of a time window of interest; this is different
from the beginning and ending times epoch.st and epoch.end defined in
load.data (you only need to define the epoch once upon importing the data).
The purpose of the window argument in this function is merely to highlight a
window of interest; its default value is NULL.
Value
A single plot of grand average waveforms for each condition. Includes a
color-coded and labeled legend.
Details
grandaverage will return a plot of the grand average waveform for each
condition present in the data frame you provide. For ease of use, colors are
automatically assigned. The legend displays the value provided in the condition
argument of load.data.
Single electrodes can be passed to the package functions, or several electrodes
can be provided (i.e., when using dense arrays) and those electrodes will be
averaged together as a single electrode.