View source: R/filter_within_timeframe.R
filter_within_timeframe | R Documentation |
Find and filter all events within a certain time of a specific event For example, find all events 5 seconds prior to and including a shot Right now only looks works for seconds before (lead), need to have a solution that looks after and between two times
filter_within_timeframe(.data, condition, time, lead_time = 0, lag_time = 0)
.data |
The data frame |
condition |
The event to find in dplyr fashion. Such as event == 'A' |
time |
The column/data that contains the timestamp |
lead_time |
The number of seconds before the event occurs |
lag_time |
The number of seconds after an event occurs (needs to be implemented) |
time_filter |
The number of seconds before the event occurs |
A plot of a pitch
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.