find_messages: Find messages sent to Eyelink

Description Usage Arguments Value See Also Examples

Description

General function for finding messages sent to Eyelink and extracting information from them. Useful if you want timestamps of particular events merged with behavioral data. Also used by set_index to extract information for index variables (for merging).

Usage

1
2
find_messages(obj, varnames, patterns, numeric.only = FALSE,
  timestamp = FALSE)

Arguments

obj

an itrackR object

varnames

a list specifying what we want the variable names to be called

patterns

search strings for the messages of interest (can use regular expressions)

numeric.only

return only numeric information from the messages (default = FALSE). Useful for indexing variables (e.g., "Trial 5" is converted to 5).

timestamp

return the timestamp of the message, not the message itself (default = FAlSE)

Value

all messages are stored in obj$header, based on the varnames specified. When calling eyemerge, these will be appended to the data frame.

See Also

set_index

Examples

1
2
3
4
5
6
7
8
## Not run: 
# itrackr.data('edfs') returns full path to 2 edf files
z <- itrackr(edfs=itrackr.data('edfs'))

#Loads all edf
z <- find_messages(z,c("STIMONSET"), patterns=c('STIMONSET'), timestamp = TRUE)

## End(Not run)

jashubbard/itrackR documentation built on May 18, 2019, 4:53 p.m.