webgazeR v0.8.3
  1. Reference
  2. smooth_gaze
  • Home
  • Articles
    • Calculating Intersubject Correlations
    • Introduction to webgazeR
  • Reference
    • analyze_sampling_rate
    • assign_aoi
    • calculate_isc
    • downsample_gaze
    • extract_aois
    • filter_sampling_rate
    • find_location
    • gaze_dispersion
    • gaze_oob
    • interpolate_gaze
    • make_webgazer
    • merge_webcam_files
    • plot_IA_proportions
    • smooth_gaze
    • time_window_isc
    • upsample_gaze
  • Citation
  1. Reference
  2. smooth_gaze

Apply a moving average smoothing function to gaze data (X and Y). This is generally recommended after up-sampling the data.

Description

Apply a moving average smoothing function to gaze data (X and Y). This is generally recommended after up-sampling the data.

Usage

smooth_gaze(
  x,
  n = 5,
  x_col = "Gaze_X",
  y_col = "Gaze_Y",
  trial_col = "Trial",
  subject_col = "Subject"
)

Arguments

x A data frame containing gaze data.
n The window size (in samples) for the moving average.
x_col The name of the X gaze column (as string).
y_col The name of the Y gaze column (as string).
trial_col The name of the trial column used for grouping (default = "Trial").
subject_col The name of the subject column used for grouping (default = "Subject").

Value

A tibble with smoothed gaze X and Y columns (replacing originals).