Helper function that takes an eye tracker data frame and adds a new column `R` with the rotation matrices.

add_rot_eye(df, direction = c(0, 0, 1))

Arguments

df

Movement data frame. Expected columns: `gaze_direction_x`, `gaze_direction_y`, `gaze_direction_z`

direction

Reference gaze direction. Default: forward.

Value

Same df with rotation matrices added