readELascii | R Documentation |
Read data from SR Research ASCII files (samples, fixations, saccades, blinks, etc).
readELascii(file, tStartRE = "TRIALID", tEndRE = "TRIAL_RESULT", subjID = NULL)
file |
A string giving path/fname to input file (ELascii file). |
tStartRE |
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
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. |
tEndRE |
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
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. |
subjID |
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 davebraze@gmail.com
Monica Li monica.yc.li@gmail.com
library(FDBeye) infile <- system.file("extdata/1950006-RAN.asc.gz", package="FDBeye") D <- readELascii(infile) str(D)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.