AOI_seq {eyetools} | R Documentation |
Analyses the sequence of entries into defined AOI regions across trials. Can only be used with fixation data with a "fix_n" column denoting fixation events.
AOI_seq(
data,
AOIs,
AOI_names = NULL,
sample_rate = NULL,
long = TRUE,
participant_ID = "participant_ID"
)
data |
A dataframe with fixation data (from fixation_dispersion). Either single or multi participant data |
AOIs |
A dataframe of areas of interest (AOIs), with one row per AOI (x, y, width_radius, height). |
AOI_names |
An optional vector of AOI names to replace the default "AOI_1", "AOI_2", etc. |
sample_rate |
Optional sample rate of the eye-tracker (Hz) for use with raw_data. If not supplied, the sample rate will be estimated from the time column and the number of samples. |
long |
Whether to return the AOI fixations in long or wide format. Defaults to long |
participant_ID |
the variable that determines the participant identifier. If no column present, assumes a single participant |
a dataframe containing the sequence of entries into AOIs on each trial.
If long is TRUE, then each AOI entry is returned on a new row, if FALSE, then a row per trial is returned with all AOI entries in one character string
data <- combine_eyes(HCL)
fix_d <- fixation_dispersion(data, participant_ID = "pNum")
AOI_seq(fix_d, AOIs = HCL_AOIs, participant_ID = "pNum")