combine.eyedata: Combine the results from edf.batch

View source: R/utilities.R

combine.eyedataR Documentation

Combine the results from edf.batch

Description

combine.eyedata can be used to take the results from edf.batch and stack into large data frames for fixations, saccades, etc.

Usage

combine.eyedata(batchdata, fields = c("fixations", "saccades", "blinks",
  "messages", "header"))

Arguments

batchdata

output from edf.batch

fields

character array of the particular fields you want to combine (default is c('fixations', 'saccades','blinks','messages')). Warning: combining samples will result in extremely large data frames (millions of rows per subject)

Details

edf.batch returns a list where each element has fields fixations, saccades, blinks, and (optionaly) samples. This function takes that result and creates a single data frame for all subjects' eye data

Value

a list with each of the requested fields. Each one is a data frame with all subjects' data. Subjects will be identified by the "ID" varaiable.

Author(s)

Jason Hubbard, hubbard3@uoregon.edu

Examples

## Not run: 

#first load everything:
allbatch <- edf.batch('~/Desktop/edfs','*.edf')

alldata <- combine.eyedata(allbatch)

all_fixations <- alldata$fixations
all_saccades <- alldata$saccades


## End(Not run)

jashubbard/edfR documentation built on Aug. 4, 2022, 5:18 p.m.