Learn R Programming

eyelinkReader (version 1.0.3)

extract_triggers: Extract triggers, a custom message type

Description

Extracts trigger events, messages that adhere to a <message_prefix> <label> format. Their purpose is to identify the time instance of specific interest. Please note that due to a non-standard nature of this function is not called during the read_edf call and you need to call it separately.

Usage

extract_triggers(object, message_prefix = "TRIGGER")

# S3 method for data.frame extract_triggers(object, message_prefix = "TRIGGER")

# S3 method for eyelinkRecording extract_triggers(object, message_prefix = "TRIGGER")

Value

Object of the same time as input, i.e., either a eyelinkRecording object with an additional triggers slot or a data.frame with triggers' information. See eyelinkRecording for details.

Arguments

object

Either an eyelinkRecording object or data.frame with events, i.e., events slot of the eyelinkRecording object.

message_prefix

Beginning of the message string that identifies trigger messages. Defaults to "TRIGGER".

See Also

read_edf, eyelinkRecording

Examples

Run this code
data(gaze)

# by passing the recording
gaze <- extract_triggers(gaze)

# by passing events table
triggers <- extract_triggers(gaze$events)

# with an explicit message prefix
triggers <- extract_triggers(gaze$events, "TRIGGER")

Run the code above in your browser using DataLab