extract_display_coords: Extract display coordinates from an event message
Description
Extracts display coordinates from a message that adheres to a
<message_prefix> <label> format. Please note that this function called
during the read_edf call with silent = TRUE. If display_coords
are missing from the eyelinkRecording, run this method to see the warnings.
A eyelinkRecording object with an additional display_coords slot (if that was object type),
Either a four element numeric vector with display coordinates, or NULL if object was an events table of
eyelinkRecording object. 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 the DISPLAY_COORDS message.
Defaults to "DISPLAY_COORDS".
silent
Whether to suppress a warning when DISPLAY_COORDS message is missing. Default to FALSE.
data(gaze)
# by passing the recordinggaze <- extract_display_coords(gaze)
# by passing events tabledisplay_coords <- extract_display_coords(gaze$events)