downsample_gaze {kollaR} | R Documentation |
Downsample gaze
Description
This function downs-samples gaze by a specified factor. Data are down-sampled by splitting the data in bins and calculating the mean of each bin.
Usage
downsample_gaze(data_in, ds.factor, xcol = "x", ycol = "y")
Arguments
data_in |
Data frame which must contain the variables specified by the parameters xcol and ycol. |
ds.factor |
The factor to down-sample by. For example, setting ds.factor to 10 down-samples data recorded at 1000 HZ to 100 HZ. |
xcol |
Name of the column where raw x values are stored. Default: x |
ycol |
Name of the column where raw y values are stored. Default: y |
Value
Data frame with downsampled gaze data. The output variables are x, y, and the numbers of the first and last samples of the original data frame included in the bin.
[Package kollaR version 1.1.1 Index]