rm_sparse_events {PupilPre}R Documentation

Removes events with excessive missing data

Description

rm_sparse_events removes events with less data than the specified amount.

Usage

rm_sparse_events(data = data, BaselineWindow = NULL,
  CriticalWindow = NULL, BaselineRequired = NULL,
  CriticalRequired = NULL)

Arguments

data

A data table object output after having run ppl_select_recorded_eye.

BaselineWindow

A numeric vector of length 1 or 2 specifying the time points of the baseline window to be examined. Providing two values indicates the start time and the end time of the baseline, respectively. Providing a single value (i.e., time point) assumes that every preceding time point is part of the baseline (N.B. trials may vary in the size of the baseline window and will result in an error).

CriticalWindow

A numeric vector of length 1 or 2 specifying the time points of the critical (i.e., post-stimulus) window to be examined. Providing two values indicates the start time and the end time of the window, respectively. Providing a single value (i.e., time point) assumes that every subsequent time point is part of the window.

BaselineRequired

A number indicating the percentage of data required in the baseline to be included (i.e., drop events with less than this amount of data).

CriticalRequired

A number indicating the percentage of data required in the critical window to be included (i.e., drop events with less than this amount of data).

Value

An object of type data table as described in tibble.

Examples

# Load example data
data("Pupilex3")

dat <- rm_sparse_events(data = Pupilex3, BaselineWindow = c(-500, 0),
                        CriticalWindow = c(200, 2000),
                        BaselineRequired = 50,
                        CriticalRequired = 50)

# Please see the vignettes for detailed example usage.
# vignette("PupilPre_Basic_Preprocessing", package="PupilPre")


[Package PupilPre version 0.6.2 Index]