load_asc: Load and parse SR Research EyeLink '.asc' files

View source: R/pipeline-loadasc.R

load_ascR Documentation

Load and parse SR Research EyeLink .asc files

Description

This function builds upon the eyelinker::read.asc() function to parse the messages and metadata within the EyeLink .asc file. After loading and additional processing, this function returns an S3 eyeris class for use in all subsequent eyeris pipeline steps and functions.

Usage

load_asc(file, block = "auto")

Arguments

file

An SR Research EyeLink .asc file generated by the official EyeLink edf2asc command.

block

Optional block number specification. The following are valid options:

  • "auto" (default): Automatically handles multiple recording segments embedded within the same .asc file. We recommend using this default as this is likely the safer choice then assuming a single-block recording (unless you know what you're doing).

  • NULL: Omits block column. Suitable for single-block recordings.

  • Numeric value: Manually sets block number based on the value provided here.

Value

An object of S3 class eyeris with the following attributes:

  1. file: Path to the original .asc file.

  2. timeseries: Dataframe of all raw timeseries data from the tracker.

  3. events: Dataframe of all event messages and their timestamps.

  4. blinks: Dataframe of all blink events.

  5. info: Dataframe of various metadata parsed from the file header.

  6. latest: eyeris variable for tracking pipeline run history.

See Also

eyelinker::read.asc() which this function wraps.

Examples

# Basic usage (no block column specified)
system.file("extdata", "memory.asc", package = "eyeris") |>
  eyeris::load_asc()

# Manual specification of block number
system.file("extdata", "memory.asc", package = "eyeris") |>
  eyeris::load_asc(block = 3)

# Auto-detect multiple recording segments embedded within the same file
system.file("extdata", "memory.asc", package = "eyeris") |>
  eyeris::load_asc(block = "auto")


eyeris documentation built on April 12, 2025, 2:05 a.m.