MultiLine: Pre-processing of multi-line reading data

View source: R/MultiLine.R

MultiLineR Documentation

Pre-processing of multi-line reading data


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


  data_list = NULL,
  ResX = 1920,
  ResY = 1080,
  maxtrial = 120,
  tBlink = 50,
  reAlign = TRUE,
  RSpar = c(1/4, 8, 2/3),
  textStim = NULL,
  ppl = NULL,
  xOffset = NULL,
  plot = FALSE



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


Time in milliseconds for detecting blinks before or after fixation. If there is a blink x milliseconds before or after the fixation, it will be marked as having a blink. The default is 50 ms.


An optional parameter for cases when the text stimuli are not printed to the .asc files. If this is the case, please provide a directory to a txt file containing the stimuli sentences used in the experiment. Each sentences should be placed on a new line and the stimuli should be ordered in the way that they were presented in the experiment (i.e., sentence 1 should be on line 1 and so on). You will also need to provide information about the width of letters and the offset of the text on the x-axis (see below). The default is NULL for cases when the text stimuli are printed to the .asc files.


Pixels per letter in the experiment (i.e., the width of each letter on the screen). Please note that this function currently works only with fixed-width (i.e., monospaced) fonts. Not needed if the text stimuli were printed to the data.


Offset of the text in pixels on the x-axis of the screen. This should be the pixel location where the first letter of the sentence starts. Not needed if the text stimuli were printed to the data.


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 June 23, 2024, 7:38 p.m.