read_vhdr: Read a BrainVision file into R

View source: R/read.R

read_vhdrR Documentation

Read a BrainVision file into R

Description

Creates an eeg_lst object from BrainVision exported files.The function reads metadata from the .vhdr BrainVision file, which draws on the .vmrk and .dat/.eeg files. All three files must be in the same directory.

Usage

read_vhdr(
  file,
  .sep = .type == "New Segment",
  .zero = .type == "Time 0",
  .recording = file
)

Arguments

file

A vhdr file in a folder that contains a .vmrk and .dat files

.sep

Segment separation marker. By default: .type == "New Segment"

.zero

Time zero marker. By default: .type == "Time 0"

.recording

Recording name (file name, by default).

Value

An eeg_lst object with signal_tbl and event from file_name.dat, file_name.vhdr, and file_name.vmrk.

See Also

Other reading and writing functions: read_edf(), read_fif(), read_ft(), read_set()

Examples

## Not run: 
# load a single subject
s1 <- read_vhdr("./faces.vhdr", .recording = "1")

# load multiple subjects using purrr::map, extracting subject IDs from file names
faces_list <- purrr::map(list.files("./", "vhdr"), ~
read_vhdr(.x))
faces <- bind(faces_list)

## End(Not run)


bnicenboim/eeguana documentation built on March 16, 2024, 7:21 a.m.