edf.trials: Load trial-based data from an EDF file

View source: R/edf_api.R

edf.trialsR Documentation

Load trial-based data from an EDF file

Description

edf.trials loads information from an EDF file in a trial-by-trial manner. A "trial" is determined by starting and stopping recording from the eye tracker during an experiment

Usage

edf.trials(EDFfile, samples = FALSE, eventmask = FALSE,
  event.fields = c("time", "type", "read", "eye", "sttime", "entime", "gstx",
  "gsty", "genx", "geny", "gavx", "gavy", "avel", "pvel"),
  sample.fields = c("time", "gxL", "gyL", "paL", "gxR", "gyR", "paR"))

Arguments

EDFfile

path to an EDF file

samples

logical indicating whether to import samples (default=FALSE)

eventmask

logical indicating whether to add an eventmask to samples (default=FALSE)

Details

edf.trials will load fixations, saccades, blinks, and (optionally) samples from an EDF similarly to edf.all. The difference is that data are loaded based on separate trials within the recording session. A trial is determined by stopping and starting recording. This is most useful for merging with behavioral data recorded elsewhere. Each data frame has an eyetrial variable that corresponds to the recording number.

Value

The output will be a list with 5 named elements (headers,fixations, saccades, blinks, and samples) each element being a data frame. Headers indicate the starting and stopping point for each trial. Each data frame will have the variable eyetrial that indicates the trial number for that event/sample.

Author(s)

Jason Hubbard, hubbard3@uoregon.edu

Examples

## Not run: 
output <- edf.trials('/path/to/file.edf',samples=TRUE)
output$fixations #data frame
output$saccades #another data frame


## End(Not run)

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