SingleLine: Pre-processing of single-line reading data

View source: R/SingleLine.R

SingleLineR Documentation

Pre-processing of single-line reading data

Description

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

Usage

SingleLine(data_list = NULL, ResX = 1920, ResY = 1080,
  maxtrial = 999, tBlink = 50, textStim = NULL, ppl = NULL,
  xOffset = NULL, plot = FALSE)

Arguments

data_list

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".

ResX

X screen resolution in pixels

ResY

Y screen resolution in pixels

maxtrial

Maximum number of trials in the experiment

tBlink

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.

textStim

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.

ppl

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.

xOffset

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.

plot

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".

Value

A data frame containing the data

Author(s)

Martin R. Vasilev


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