Skip to contents

Subset a Trial to a Time Window

Usage

pr_filter_time(trial, from = 0, to = Inf)

Arguments

trial

A pr_trial object.

from

Numeric. Start time (s). Default 0.

to

Numeric. End time (s). Default Inf.

Value

A pr_trial containing only frames with time in [from, to].

Examples

tr <- pr_filter_time(pr_example_trial("insole"), from = 1, to = 3)
tr$duration
#> [1] 1.987952