View source: R/adjust_message_time.R
adjust_message_time | R Documentation |
Uses text in the message to adjust its time. E.g.,
for a message "-50 TARGET_ONSET"
that was sent at 105600
the actual onset occurred 50 milliseconds earlier (-50
). The function
adjusts the event timing and removes the timing offset information from
the message. I.e., the example message becomes "TARGET_ONSET"
and
its time become 105550
.
adjust_message_time(object, prefix)
## S3 method for class 'data.frame'
adjust_message_time(object, prefix = "^[-+]?[:digit:]+[:space:]+")
## S3 method for class 'eyelinkRecording'
adjust_message_time(object, prefix = "^[-+]?[:digit:]+[:space:]+")
object |
An |
prefix |
String with a regular expression that defines the offset.
Defaults to |
Object of the same time as input, i.e., either a eyelinkRecording
object
with modified events
slot or a data.frame with offset-adjusted events.
data(gaze)
# by passing events table
adjusted_events <- adjust_message_time(gaze$events)
# by passing the recording
gaze <- adjust_message_time(gaze)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.