Learn R Programming

eyetools (version 0.9.2)

smoother: Smoothing of raw data

Description

A wrapper for the stats::loess function, with default parameters suitable for smoothing raw eye data

Usage

smoother(data, span = 0.05, plot = FALSE)

Value

a dataframe of the same shape as the input data

Arguments

data

A dataframe with raw data (time, x, y, trial) for one participant

span

From stats::loess. The parameter alpha which controls the degree of smoothing.

plot

whether to plot the raw and smoothed plot for inspection

Details

Analyses data separately for each unique combination of values in pID and trial.

Examples

Run this code
data <- combine_eyes(HCL)

smoother(data)

#with an inspection plot
smoother(data, span = .02, plot = TRUE)

Run the code above in your browser using DataLab