subset_data {PupillometryR}R Documentation

Subset data to provide start and finish time windows

Description

subset_data can be used on a PupillometryR dataframe to subset the time into relevant chunks. This, ideally should be one of the first runctions run, before anything analytical. Use this to indicate a start and stop time to create a new resized dataframe.

Usage

subset_data(data, start = NULL, stop = NULL, rezero = T, remove = T)

Arguments

data

a PupillometryR dataframe

start

a single number indicating start time of new dataframe

stop

a single number indicating end time of new dataframe

rezero

logical, whether time should start from zero

remove

logical, remove observations outside of start and stop

Value

a subsetted PupillometryR dataframe

Examples

Sdata <- make_pupillometryr_data(data = pupil_data,
                               subject = ID,
                               trial = Trial,
                               time = Time,
                               condition = Type)
subset_data(Sdata, start = 100, stop = 10000, rezero = TRUE, remove = TRUE)

[Package PupillometryR version 0.0.5 Index]