Learn R Programming

erpR (version 0.2.0)

erp.add: add an ERP waveform to a plot

Description

Add a waveform to a ERP plot created with erp, erp.t, or butterfly functions.

Usage

erp.add(el, startmsec=-200, endmsec=1200, interval=c(startmsec, endmsec), smo = NULL, col = "black", lty = 1, lwd = 1, ...)

Arguments

el
the electrode to be plotted.
startmsec
the start time (in ms) of the ERP vector.
endmsec
the end time (in ms) of the ERP vector.
smo
the smoothing parameter to apply (see smooth.spline). Default is NULL and no smoothing is applied.
interval
a vector with a pair of values indicating the interval (in milliseconds) to be plotted.
col
the color of the waveform.
lty
line type of the waveform .
lwd
line width of the waveform.
...
further parameters passed to lines

Value

The specified waveform is added to an existing plot.

See Also

erp, butterfly, erp.t, erp.infl

Examples

Run this code

data(ERPsets)

word=grandaverage("Exp1_word_subj", 1:20, erplist=ERPsets) 
nonword=grandaverage("Exp1_nonword_subj", 1:20, erplist=ERPsets) 

erp(word$Fp1, col="blue", startmsec=-200, endmsec=1500)
erp.add(nonword$Fp1, col="red", startmsec=-200, endmsec=1500)

Run the code above in your browser using DataLab