Read eyetracking data from a datawiz file

read_datawiz(filename, sampling_rate = 33.3333)

Arguments

filename

a txt file generated by datawiz

sampling_rate

the rate of the video recording in ms. By default, the value is 33.3 for 1 frame every 33.3 ms.

Value

a dataframe containing the cleaned-up eyetracking data

Details

The files exported by DataWiz are a series of tab-separated data files all combined into a single file. This means that the header row (with the column names separated by tabs) will be repeated throughout the file. These repeated header rows are removed.

The header rows indicate the time of eyetracking samples by columns named "F0", "F33", "F67", etc. There are also columns with blank names before column "F0". These are also looking samples before "F0". This function back-fills the column names so that the first column before "F0" changes from " " to "X33", where the X indicates a negative time sample.