detect_blinks_by_velocity: detect blinks by a change in velocity

View source: R/detect_remove_blinks.R

detect_blinks_by_velocityR Documentation

detect blinks by a change in velocity

Description

This allows the user to set a threshold for velocity and remove anything classed as a blink as a result

Usage

detect_blinks_by_velocity(
  data,
  pupil,
  threshold = 0.1,
  extend_forward = 0,
  extend_back = 0
)

Arguments

data

dataset of class PupillometryR

pupil

column name for pupil data

threshold

velocity threshold for blink detection

extend_forward

number of observations to remove forward of blink

extend_back

number of obervations to remove behind blink

Value

returns dataframe with blinks removed including forward and back, and data in blink column.

Examples

Sdata <- make_pupillometryr_data(data = pupil_data,
subject = ID,
trial = Trial,
time = Time,
condition = Type)

Sdata2 <- detect_blinks_by_velocity(data = Sdata,
pupil = LPupil,
threshold = 0.1,
extend_forward = 0,
extend_back = 0)


PupillometryR documentation built on Sept. 15, 2023, 5:13 p.m.