simulate_eye_table: Generate a Simulated Eye-Movement Data Frame

View source: R/eye_frame.R

simulate_eye_tableR Documentation

Generate a Simulated Eye-Movement Data Frame

Description

The 'simulate_eye_table' function generates a simulated 'eye_table' object containing eye-movement data with columns for x and y coordinates, fixation duration, onset time, and an optional grouping variable.

Usage

simulate_eye_table(
  n_fixations,
  n_groups,
  clip_bounds = c(0, 1280, 0, 1280),
  relative_coords = TRUE
)

Arguments

n_fixations

The number of fixations to simulate.

n_groups

The number of groups to simulate.

clip_bounds

A numeric vector of length 4 representing the clip bounds for the field of view in the form c(xmin, xmax, ymin, ymax). Default is c(0, 1280, 0, 1280).

relative_coords

A logical value indicating whether to compute relative coordinates (TRUE by default). If TRUE, x and y coordinates will be transformed based on the clip_bounds.

Value

A 'data.frame' of class "eye_table" with simulated data.

Examples

sim_eye_table <- simulate_eye_table(n_fixations = 100, n_groups = 10)

bbuchsbaum/eyesim documentation built on May 9, 2023, 3:29 a.m.