calculate_rms: Calculate sample-to-sample root mean square distance (RMS) of...

View source: R/PreprocessingFunctions.R

calculate_rmsR Documentation

Calculate sample-to-sample root mean square distance (RMS) of a data segment

Description

Calculate the RMS of a gaze segment with X and Y coordinates. RMS is inversely related to precision, so that lower RMS indicates higher precision calculate_rms calculates the root mean square of the Euclidean distance between subsequent samples Adjust the parameters 'xcol' and 'ycol' to specify the data you want to work with. For example, it is possible to calculate the RMS of the left and right eye separately by specifying appropriate columns.

Usage

calculate_rms(gaze_in, xcol = "x.raw", ycol = "y.raw", one_degree = 40)

Arguments

gaze_in

data frame with gaze to process. Must contain the variables specified in the parameters 'xcol' and 'ycol'

xcol

Name of column containing x coordinates

ycol

Name of column containing y coordinates

one_degree

One degree of the visual field in the units of the X and Y coordinates as specified in 'xcol' and 'ycol'

Value

sample-to-sample RMS

Examples

rms <- calculate_rms(sample.data.unprocessed)

kollaR documentation built on Nov. 5, 2025, 7:42 p.m.