Merge and Process Webcam Eye-Tracking Files

Description

This function reads, merges, and processes webcam eye-tracking files. It standardizes column names (subject, trial, time, x, y) for universal use. Supports .csv, .tsv, and .xlsx formats.

Usage

merge_webcam_files(
  file_paths,
  screen_index = NULL,
  kind = "gorilla",
  col_map = list(subject = "participant_id", trial = "spreadsheet_row", time =
    "time_elapsed", x = "x", y = "y")
)

Arguments

file_paths A list of file paths to webcam files.
screen_index Optional. If provided, filters data by one or more screen indices (for Gorilla).
kind The data collection platform. Options: "gorilla" (default), "labvanced".
col_map A named list mapping your current columns to WebGazer names: ‘subject’, ‘trial’, ‘time’, ‘x’, ‘y’.

Value

A dataframe with standardized columns depending on the platform.