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 class 'data.frame'
extract_triggers(object, message_prefix = "TRIGGER")
# S3 method for class 'eyelinkRecording'
extract_triggers(object, message_prefix = "TRIGGER")
Arguments
- object
Either an
eyelinkRecording
object or data.frame with events, i.e.,events
slot of theeyelinkRecording
object.- message_prefix
Beginning of the message string that identifies trigger messages. Defaults to
"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.
Examples
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")