erplist.offset {erpR} | R Documentation |
Remove offset (i.e. perform baseline correction) on all the objects of an erplist.
erplist.offset(base, numbers, win.ini, win.end, erplist=NULL, startmsec=NULL, endmsec=NULL)
base |
a string indicating the beginning of the name of |
numbers |
the numbers of the subjects to be averaged by the function. |
win.ini |
the initial edge (in ms) of the window on which the offset should be calculated. |
win.end |
the final edge (in ms) of the window on which the offset should be calculated. |
erplist |
a list containing the ERP data frames specified in |
startmsec |
the start time (in ms) of the ERP vector |
endmsec |
the end time (in ms) of the ERP vector |
The function perform a DC offset (or baseline) correction in all he objects of an erplist.
It simply calcualte (separately for each object and each electrode), the mean value in the window specified
with win.ini
, and win.end
and subtract from all the vector.
A new erplist with the data modified according to the offset correction.
Giorgio Arcara
data(ERPsets) erplist_res=erplist.offset(base="Exp1_word_subj", numbers=1:20, win.ini=-200, win.end=0, erplist=ERPsets, startmsec=-200, endmsec=1500) # original data are now baseline corrected according to the time window going from -200 to 0.