Learn R Programming

PupilPre (version 0.6.3)

interpolate_NAs: 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)

Value

An object of type data table as described in tibble.

Arguments

data

A data frame object created from auto_cleanup.

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.

Examples

Run this code
# 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")

Run the code above in your browser using DataLab