This function is modified from Cohen's paper

mark_oob(data, xy_bounds, trial_num, cur_trial)

Arguments

data

A data.frame containing the fixation data

xy_bounds

A mtraix containing the boundaries of fixations. If it has only one row, all trials use the same boundary. If it has many rows, the number of row should be equal to the number of trials, and each row corresponds to the boundary of the corresponding trial. In each row, it has four columns:

  1. x_min: Left boundary (minimum x value within the boundary).

  2. x_max: Right boundary (maximum x value within the boundary).

  3. y_min: Top boundary (minimum y value within the boundary).

  4. y_max: Bottom boundary (maximum y value within the boundary).

trial_num

Integer indicating the total number of trials

cur_trial

Integer indicating the current trail

Value

A copy of data with out of boundary fixations marked as 'oob' in column type

Details

This function marks fixations outside boundary as 'oob'

Author

Tao Gong gtojty@gmail.com