View source: R/PreprocessingFunctions.R
| calculate_rms | R Documentation |
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 in degrees 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. The result is expressed in degrees of the visual field. Specify this unit by changing the parameter one_degree. The default value is 40 and assumes that the X and Y coordinates are expressed in pixels on the built-in screen of a Tobii Pro Spectrum Eye tracker. This value should be adapted to the set up and unit of the X and Y coordinates in the data set. Note that RMS values for each fixation are also returned by all fixation detection algorithms in kollaR, calculate_rms can be used to calculate the RMS for a whole recording or a specific data segment.
calculate_rms(gaze_in, xcol = "x.raw", ycol = "y.raw", one_degree = 40)
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' |
sample-to-sample RMS
rms <- calculate_rms(sample.data.unprocessed)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.