Description Usage Arguments Value See Also Examples
Function for creating a flat table of eyetracking and behavioral data from itrackR object. Can be used for gathering fixation, saccade or blink data, as well as fixation data epoched around some event. Will include all behavioral variables, or a subset of named variables.
1 2 3 |
obj |
an itrackR object |
eyedata |
type of eyetracking data to include. Can be:
|
behdata |
list of variables from |
all.rois |
whether to include hits/misses for all rois in itrackR object (default = FALSE). |
event |
the timelocking event when getting epoched fixations |
roi |
the roi when getting epoched fixations |
trialtime |
whether to convert fixation/saccade times relative to the current trial, or leave relative to whole experiment. |
condition |
subset data according to some behavioral variables. Can use unquoted variable names as in |
condition.str |
whether the condition is saved as a string ('Block <= 5'). Used internally. |
returns a data frame with the variables from obj$beh
merged with the eyetracking data requested. Merging is based on ID
, and obj$indexvars
.
This corresponds to obj$beh$eyetrial
as well.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
# itrackr.data('edfs') returns full path to 2 edf files
z <- itrackr(edfs=itrackr.data('edfs'))
#Extracts messages like "BLOCK 1", and "TRIAL 7" and creates variables "Block" and "Trial", giving them values
# 1 and 7.
z <- set_index(z,c('Block', 'Trial'), patterns=c('BLOCK [0-9]*', 'TRIAL [0-9][0-9]*), numeric.only = TRUE)
beh <- itrackr.data('beh)
z <- add_behdata(z,beh)
#get fixation data
fixes <- eyemerge(z,'fixations')
#get data only when Task==2
fixes <- eyemerge(z, 'fixations', condition = Task==2)
#saccades
saccs <- eyemerge(z,'saccades')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.