smoother | R Documentation |
A wrapper for the stats::loess function, with default parameters suitable for smoothing raw eye data
smoother(data, span = 0.1, plot = FALSE, participant_ID = "participant_ID")
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 |
participant_ID |
the variable that determines the participant identifier. If no column present, assumes a single participant |
It can take either single participant data or multiple participants where there is a variable for unique participant identification.
The function looks for an identifier named participant_ID
by default and will treat this as multiple-participant data as default,
if not it is handled as single participant data, or the participant_ID needs to be specified
a dataframe of the same shape as the input data
data <- combine_eyes(HCL)
smoother(data, participant_ID = "pNum")
#with an inspection plot
smoother(data, span = .02, participant_ID = "pNum", plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.