View source: R/make_smoothed_data.R
interpolate_data | R Documentation |
Once data is smoothed, it is important to deal with missing observations, such as blinks. This allows simple interpolation over missing values, either linear, or cubic. Depending on the analysis planed, this may not be a necessary option, but it is strongly recommended for the functional analyses planned in this package.
interpolate_data(data, pupil, type = c("linear", "cubic"))
data |
a PupillometryR dataframe |
pupil |
Column name for pupil data to be interpolated |
type |
string indicating linear or cubic interpolation to be performed. |
interpolated pupillometry data
Sdata <- make_pupillometryr_data(data = pupil_data,
subject = ID,
trial = Trial,
time = Time,
condition = Type)
mean_data <- calculate_mean_pupil_size(data = Sdata,
pupil1 = RPupil, pupil2 = LPupil)
filtered_data <- filter_data(data = mean_data,
pupil = mean_pupil,
filter = 'hanning',
degree = 11)
int_data <- interpolate_data(data = filtered_data,
pupil = mean_pupil,
type = 'linear')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.