interpolate_NAs {PupilPre} | R Documentation |
Interpolation for missing data.
Description
interpolate_NAs
performs interpolation of missing data for
the pupil and gaze coordinates (if desired).
Usage
interpolate_NAs(data = data, Method = "linear", XandY = TRUE,
MinData = 2)
Arguments
data |
A data frame object created from |
Method |
A character string indicating type of interpolation ("linear" or "spline") as implemented in na.approx. |
XandY |
A logical specifying if interpolation should also be done on gaze coordinates |
MinData |
A number indicating the minimum number of data points required in order for interpolation to be applied to the event. |
Value
An object of type data table as described in tibble.
Examples
# Load example data
data("Pupilex4")
dat <- interpolate_NAs(Pupilex4, Method = "linear",
XandY = TRUE, MinData = 2)
# Please see the vignettes for detailed example usage.
# vignette("PupilPre_Interpolation_and_Filtering", package="PupilPre")
[Package PupilPre version 0.6.2 Index]