Description Usage Arguments Details Value Author(s) Examples
An utility function to create a factor that collapses other factor levels (typically electrode names) in a new variable vector with the new ROI (region of interest) variable. It can be used only with data.frame in long format.
1  | create.roi(datall, electrode="electrode", groups=NULL, roi.levels=NULL )
 | 
datall | 
 a data frame containing ERP data in long format.  | 
electrode | 
 name of the column in datall containing electrode names.  | 
groups | 
 a list containing (in separate vectors) electrode names to create the ROI.  | 
roi.levels | 
 a vector with the names of the newly created factor variable.  | 
All levels of the variable electrode that are not specified in groups will be coded as NA in the returned vector.
The function returns a vector with the new coded ROI variable.
Giorgio Arcara
1 2 3 4 5 6 7 8 9 10 11  | data(erplistExample)
datall=erp.mean(base = "Exp1_word_subj", numbers = 1:20,
 win.ini = 400, win.end = 600, startmsec= -200, endmsec=1500, erplist=erplistExample)
datall$caudality=create.roi(datall, "electrode", 
groups=list(c("Fp1", "Fp2"), c("P3", "P4")), 
roi.levels=c("Frontopolar", "Parietal"))
table(datall$caudality, datall$electrode)
	
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.