preprocess: Preprocess Gaze Data

Description Usage Arguments Value

View source: R/preprocessing.R

Description

Prepares raw gaze data for classification by a hidden Markov model as part of gazeHMM.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
preprocess(
  x,
  y,
  t,
  unit = "px",
  res,
  dim,
  dist,
  fr,
  blink = NULL,
  b.win = 0.05,
  sg.order = 3,
  sg.length = sg.order + 3 - sg.order%%2
)

Arguments

x

Numeric vector of raw x coordinates for each gaze samples.

y

Numeric vector of raw y coordinates for each gaze samples.

t

Numeric vector of time stamps for each gaze sample.

unit

Character string indicating the unit of coordinates (either 'px' or 'va').

res

Screen resolution (in px).

dim

Screen dimensions (in mm).

dist

Distance between subject and screen (in mm).

fr

Sampling rate of the eye-tracker (in Hz).

blink

Either a numeric vector of length two indicating the x and y coordinates for blink samples or a logical vector with the same length as x, y, and t indicating blink samples.

b.win

Time window around blink samples that are to be ignored (i.e., set to NA; in s).

sg.order

Order of the Savitzky-Golay filter.

sg.length

Length of the Savitzky-Golay filter (must be odd).

Value

A data frame with x and y gaze coordinates in degrees of visual angle, time stamps, velocity, accelelration, sample-to-sample angle, and an initial label for each sample.


maltelueken/gazeHMM documentation built on Oct. 6, 2020, 11:10 a.m.