erp.fun.loop: Calculate several ERP measures

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This functions allow to quickly perform loops over several objects with different base or different time windows, to calculate an erp measure (i.e., erp.mean, erp.peak, or erp.latency)

Usage

1
2
3
erp.fun.loop(bases=NULL, numbers=NULL, erp.fun=NULL, intervals=NULL, 
conditions.names=NULL, erplist=NULL, startmsec=NULL, endmsec=NULL, 
others=NULL, intervals.var=TRUE, ...)

Arguments

bases

a string indicating the beginning of the name of the object the ERP data (stored in an erplist.

numbers

the numbers (indicating the subjects) of the files to be imported.

erp.fun

the name of the function to be used (no quotes, e.g, erp.fun = erp.mean)

intervals

A list of pair of values, indicating the beginning and end of time windows on which to apply the erp.fun. (e.g., list(c(100, 200), c(300,500)))

conditions.names

A vector of characters (same length of bases) that will be the name of the condition in the resulting object.

erplist

If an erplist is specified, then the imported files will be added to this erplist.

startmsec

the start time (in ms) of the ERP data frames. It can be a negative value, indicating the baseline time frame.

endmsec

the end time (in ms) of the ERP data frames.

others

the names of other variables to be included in the returned data frame. Ignored if the format is "wide".

intervals.var

logical. Should a variable indicating intervals (with characters) should be included?

...

further arguments to be passed to the erp.fun specified.

Details

This function calculates an ERP measure on several ERP data frames, stored in a single erplist. See the help for the used erp.fun (i.e.,erp.mean, erp.peak, or erp.latency) for further details.

Value

An ERP data.frame with the result of the call to the erp.fun

Author(s)

Giorgio Arcara

See Also

erp.mean, erp.peak, erp.latency

Examples

1
2
3
4
5
data(erplistExample)

datall=erp.fun.loop(bases=c("Exp1_word_subj", "Exp1_nonword_subj"), numbers=1:20, 
erp.fun=erp.mean, conditions.names=c("word", "nonword"), erplist=erplistExample, 
intervals.var=TRUE, intervals=list(c(100, 200), c(300, 500)))

erpR documentation built on June 7, 2019, 3 a.m.