Take BVA exports and return large csv file with eveyrthing summarised.

BVA_to_R(
  path,
  ERP_list,
  var_labs,
  sep,
  full_window_bounds,
  filename_returned = NULL
)

Arguments

path

Full path to all .vhdr, .vmrk and .dat files. Of the form "path/to/file/" with the final forward slash. If unspecified, defaults to current working directory.

ERP_list

Named list of ERP components and their lower/upper bounds.

var_labs

Variable labels to assign to filename parts separated by underscores e.g. c("subject", "condition").

sep

Separation in the filename e.g. "_"

full_window_bounds

Bounds of time window is ms e.g. c(-200, 1198).

filename_returned

"filename.csv" if you want a .csv returned/

Value

Formatted data.table

Examples

if (FALSE) { path <- "path/to/file/" ERPs <- list( "baseline" = c(-200, -2), "test_ERP" = c(0, 498), "ERP1" = c(500, 1198) ) obj <- BVA_to_R( path = path, sep = "_", ERP_list = ERPs, var_labs = c("subjID", "comp", "base", "cogn", "congr", "viol"), full_window_bounds = c(-200, 1198) ) }