add_scanpath.eye_table: Add Scanpath to an Eye Table

View source: R/saccades.R

add_scanpath.eye_tableR Documentation

Add Scanpath to an Eye Table

Description

This function adds a scanpath to an eye table.

Usage

## S3 method for class 'eye_table'
add_scanpath(x, outvar = "scanpath", fixvar = "fixgroup")

Arguments

x

An eye table object.

outvar

The output variable name for the scanpath. Defaults to "scanpath".

fixvar

The fixation group variable name. Defaults to "fixgroup".

Value

An eye table object with the added scanpath.

Examples

# Create an eye table with a fixation group
df <- data.frame(x = 1:5, y = 6:10, fixgroup = rep(1, 5))
eye_table_df <- as_eye_table(df)
# Add a scanpath to the eye table
eye_table_df <- add_scanpath.eye_table(eye_table_df)

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