Learn R Programming

erpR (version 0.2.0)

create.diff: create an ERP data frame with differential values

Description

This function creates a new set of data frames from two sets of paired ERP data frames. The values are obtained by subtracting the values of the second set from the first set. All data frames must be in the same erplist.

Usage

create.diff(base1, base2, numbers, outname = NULL, erplist, fileinfo = 1)

Arguments

base1
a vector of strings indicating the beginning of the name of the first series of data frames containing ERP data.
base2
a vector of strings indicating the beginning of the name of the second series of data frames containing ERP data.
numbers
the numbers of the subjects to be subtracted by the function.
outname
the base of the names of the returned data frames.
erplist
a list containing the ERP data frames specified in base and numbers.
fileinfo
a number indicating from which set of objects specified in the argument bases the information of the data frame is retrieved.

Value

A series of ERP data frames obtained by subtracting one specified set from the other.

Details

For more information on the fileinfo argument, see Details section of import.erp.

See Also

create.mean

Examples

Run this code

data(ERPsets)

ERPsetsdiff=create.diff("Exp1_word_subj", "Exp1_nonword_subj", 1:20,
outname="Exp1_diff_subj", erplist=ERPsets)

ERPsets=c(ERPsets, ERPsetsdiff)


Run the code above in your browser using DataLab