paraFix: Main function for pre-processing fixations and vertical...

View source: R/paraFix.R

paraFixR Documentation

Main function for pre-processing fixations and vertical re-alignment


This function reads in data from .asc files and performs the pre-processing.


paraFix(data_list = "preproc/files.txt", ResX = 1920, ResY = 1080,
  maxtrial = 120, align = TRUE, RSpar = c(1/4, 8, 2/3),
  plot = FALSE, tBlink = 50, keepLastFix = TRUE)



Input of data files to be processed. This can be specified in three ways: 1) a directory that contains all the files (it will select all files ending with ".asc", and order them by participant number, if present). 2) Directory to a txt file that contains all the .asc data file names inside: e.g., data_list= "C:/My Data/data_list.txt". In the .txt file, the directory for each .asc data file should appear on a separate row, e.g.: C:/My Data/subject1.asc /n C:/My Data/subject2.asc 3) A directory to a single .asc file: e.g., data_list= "C:/My Data/subject1.asc".


X screen resolution in pixels


Y screen resolution in pixels


Maximum number of trials in the experiment


A logical indicating whether to perform re-alignment of fixations. The default is TRUE. If set to FALSE, the script will return a data frame with only the raw fixations extracted from the data.


A vector of parameter values (n=3) for detecting return sweeps in the data. It's usually best not to change this unless you know what you are doing. The default values have been tested to work well in most cases. 1). Minimum Y-distance travelled as a function of line height (1= saccade has to travel the height of one line of text) 2). Minimum X-distance travelled in characters to the left 3). How much the saccade went down compared to the y postion of the previous fixation. This is again measured in line heights (1= the eye travelled 1 line height below the previous fixation). Use= c(1/4, 8, 2/3)


A logical indicating whether to plot the raw and re-aligned fixations as an image file. The default is TRUE. If set to FALSE, no images will be plotted. Note that plotting images will generally take longer time to pre-process the data. The images are saved in the current working directory in the folder "img".


A data frame containing the data


Martin R. Vasilev

martin-vasilev/EMreading documentation built on Jan. 31, 2023, 3:23 p.m.