clean_emotiv: Clean emotive EEG data

Description Usage Arguments Value Author(s) Examples

View source: R/clean_emotiv.R

Description

Loads EEG data and writes cleaned data to an output directory

Usage

1
2
3
clean_emotiv(datadir, metadatafile,  outputdir, knownerrors, protocoltimes,
referencegroup, condition_start_closed, protocolvariable, outputdir_clean,
sf=128, gyrothreshold=30, mindur=4)

Arguments

datadir

data directory

metadatafile

file with meta

outputdir

directory where output will be stored

knownerrors

data frame with 3 columns for the person identifier, start time and end time corresponding to the data that needs to be ignored Time format is minute:seconds

protocoltimes

vector of length 3 with start times of first and second experiment and end time of last experiment

condition_start_closed

protocol label corresponding to the protocol where the start was with eyes closed, e.g. "closed-3min-then-open-2min"

referencegroup

diagnosis label corresponding to the reference group, e.g. "Control"

protocolvariable

Name of column in metadata that indicates the experimental protocol, e.g. "Eyes.condition"

outputdir_clean

Directory for storage of cleaned data

sf

sample frequency

gyrothreshold

threshold for gyroscope signal above which data is considered not clean

mindur

required minimum duration (minutes) of the EEG time series

Value

matrix with overview of how much data was available per participant id

Author(s)

Vincent T van Hees

Examples

1
2
3
4
5
6
7
8
## Not run: 
datafile = "C:/myfolder/example.csv"
clean_emotiv(datadir = "C:/mydatafolder", metadatafile="C:/metadata.csv",
  outputdir="C:/output", sf=128, gyrothreshold=30, mindur=4,
  knownerrors=list(1,"1:10","1:20"), protocoltimes=c(60,180,300),
  referencegroup="Control", condition_start_closed="closed-3min-then-open-2min")

## End(Not run)

NLeSC/EEG-epilepsy-diagnosis documentation built on May 7, 2019, 6:02 p.m.