readELascii: Get events from SR Research ASCII data files.

Description Usage Arguments Details Value Author(s) Examples

View source: R/readELascii.R


Read data from SR Research ASCII files (samples, fixations, saccades, blinks, etc).


readELascii(file, tStartRE = "TRIALID", tEndRE = "TRIAL_RESULT",
  subjID = NULL)



A string giving path/fname to input file (ELascii file).


A string containing a regular expression that uniquely identifies beginnings of trials. It will be the first line for each trial that will be passed to link{getEyelinkTrialData} for processing.

The default value, "TRIALID", is a MSG that occurs immediately before an ET recording block. We use this as the default because it is guaranteed to be present. But, it may not capture information recorded during a trial before that point. A case in point is where a DRIFTCORRECT (drift check) event is present right before the recording block. TRIALID will occur after the drift correct event, meaning that the drift correct offset values captured during the event will not be available. We do not use DRIFTCORRECT as the default value to tStartRE, because it is not guaranteed to be present; not every experimentor chooses to include this event in each trial. Other reasonable choices for this argument may target the EB generated "PREPARE_SEQUENCE" MSG, or even a user generated MSG.


A string containing regular expression that uniquely identifies ends of trials. It will be the last line for each trial that will be passed to getEyelinkTrialData.

The default value, "TRIAL_RESULT", is always the last line to occur in a well-formed trial; the block of "TRIAL_VAR" lines appears right before it. But, if an experiment is aborted prematurely, then the the last trial in the *edf file (and so the *asc file) may not have a proper trial end event for the last trial.

TODO: Test for the case where tStarteRE and TEndRE are mismatched and handle it more gracefully, while throwing a warning.


If NULL (default), use filename as subject ID. Otherwise use specified string.


SR Research provides a utility (EDF2ASC.exe) that dumps ASCII renderings of their proprietary EDF data file format. This function reads those ASCII files and extracts eye-movement events (fixations, saccades, blinks), specified MSG events, and TRIAL_VARs from them.


List with two elements, one for session information, and one containing a list of trials. Each trial element is itself a list of 6 elements: data.frames enumerating fixations, saccades, blinks, samples, TRIAL_VARs and MSGs for the trial.


Dave Braze [email protected]

Monica Li [email protected]



infile <- system.file("extdata/1950006-RAN.asc.gz", package="FDBeye")
D <- readELascii(infile)

davebraze/FDBeye documentation built on Sept. 22, 2018, 9:39 p.m.